Find the answer to your Linux question:
Results 1 to 4 of 4
I have developed a sample network driver for Realtek 8139. When I compile the with the Makefile, encounters the following problem, root-ami:/home/ami/Driver/Sample Network Driver# make make -C /lib/modules/2.6.32-30-generic-pae/build M=/home/ami/Driver/Sample Network ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    15

    Problem in Sample Network driver


    I have developed a sample network driver for Realtek 8139. When I compile the with the Makefile, encounters the following problem,
    root-ami:/home/ami/Driver/Sample Network Driver# make
    make -C /lib/modules/2.6.32-30-generic-pae/build M=/home/ami/Driver/Sample Network Driver
    make[1]: Entering directory `/usr/src/linux-headers-2.6.32-30-generic-pae'
    make[1]: *** No rule to make target `Network'. Stop.
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-30-generic-pae'
    make: *** [all] Error 2
    Here is my Makefile definition
    Code:
    obj-m   := netdrv.o
    
    KERNELDIR ?= /lib/modules/$(shell uname -r)/build
    PWD       := $(shell pwd)
    
    all:
            $(MAKE) -C $(KERNELDIR) M=$(PWD)
    
    clean:
            rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
    Kindly help me in this regard.

  2. #2
    Linux Newbie
    Join Date
    Mar 2010
    Posts
    152
    You have spaces in your directory's name. Try using M="$(PWD)" in your makefile in the "all" rule - or better still, don't use directory names with spaces in. It'll save you some bother.

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    15
    Yes I do have space. But trying the option u told, doesnt work it out.

  4. #4
    Just Joined!
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    15
    Sorry man..I had done wrongly, itz working perfect after changing the directory name without spaces...
    thanx man

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •