Problem while compiling my module on downloaded kernel source

Rahul Garg rahul.lnmiit at gmail.com
Sat Mar 15 00:29:38 EDT 2014


Hi,

Being newbie to kernel, I downloaded the source code of stable kernel
code[3.13.6].
Then I build it using make oldconfig && make prepare.

Now when I am trying build my kernel module against this source code.
But I am unable to do so, Here is the error I am getting

make -C /home/rahul/linux-3.13.6 M=/home/rahul/KerenelTryouts modules
make[1]: Entering directory `/home/rahul/linux-3.13.6'

  WARNING: Symbol version dump /home/rahul/linux-3.13.6/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /home/rahul/KerenelTryouts/test.o
/bin/sh: 1: /home/rahul/linux-3.13.6/scripts/recordmcount: not found
make[2]: *** [/home/rahul/KerenelTryouts/test.o] Error 127
make[1]: *** [_module_/home/rahul/KerenelTryouts] Error 2
make[1]: Leaving directory `/home/rahul/linux-3.13.6'
make: *** [all] Error 2


Here is my make file for your reference

KERNELDIR=/home/rahul/linux-3.13.6

obj-m += test.o


all:
ifneq ($(KERNELDIR), )
make -C $(KERNELDIR) M=$(PWD) modules
else
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
endif

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


Please help me out with this.

Regards
Rahul



More information about the Kernelnewbies mailing list