2014-03-15 9:59 GMT+05:30 Rahul Garg <rahul.lnmiit@xxxxxxxxx>: > Hi, > > Being newbie to kernel, I downloaded the source code of stable kernel > code[3.13.6]. I am curios to know why you are doing a source build of the stable kernel in the first place when your code is going to be a kernel module. You can just install the kernel-devel or similar RPM provided by your distro and develop your kernel module against the running kernel. It will make your life a lot simpler. The only reason that I could think of when you may want to build a source build of the kernel and then build a KMP against this kernel build is when you have some changes in the kernel source tree itself. But I believe that stable will be a wrong choice for that if you want to upstream you changes and the master may be a better fit. > 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 > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@xxxxxxxxxxxxxxxxx > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- Sankar P http://psankar.blogspot.com _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies