LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Error while compiling module for kernel 2.6.15-1 (https://www.linuxquestions.org/questions/linux-newbie-8/error-while-compiling-module-for-kernel-2-6-15-1-a-601081/)

pathak_ashish 11-20-2007 05:17 AM

Error while compiling module for kernel 2.6.15-1
 
Hi,

I am new to Linux. I am trying to build sample module having "Hello, world" for precompiled kernel 2.6.15-1.2054_FC5 (Fedora Core 5). I am not able get .ko file. I have written Makefile as :

obj-m += hello.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

So when I do make I get error as:

make -C /lib/modules/2.6.15-1.2054_FC5 M=/root modules
make[1]: Entering directory 'lib/modules/2.6.15-1.2054_FC5'
make[1]: ***No rule to make target 'modules'. Stop.
make[1]: Leaving directory 'lib/modules/2.6.15-1.2054_FC5'
make: *** [all] Error 2

Can anybody help me in sorting out this problem......

Waiting for reply....
ashish


All times are GMT -5. The time now is 02:00 AM.