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 ...
- 04-08-2011 #1Just 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,
Here is my Makefile definitionroot-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
Kindly help me in this regard.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
- 04-08-2011 #2Linux Newbie
- Join Date
- Mar 2010
- Posts
- 121
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.
- 04-08-2011 #3Just Joined!
- Join Date
- Apr 2009
- Location
- Chennai
- Posts
- 15
Yes I do have space. But trying the option u told, doesnt work it out.
- 04-08-2011 #4Just 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


Reply With Quote