Problem while compiling my module on downloaded kernel source
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
try: cd /home/rahul/linux-3.13.6 make [wait a few minutes as it builds some scripts and starts building kernel code...] hit <Ctrl-C> then go back and try building your module. I had the exact same issue and little penguin came to the rescue :) On Sat, Mar 15, 2014 at 12:29 AM, Rahul Garg <rahul.lnmiit@gmail.com> wrote:
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
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
2014-03-15 10:12 GMT+05:30 Aruna Hewapathirane <aruna.hewapathirane@gmail.com>:
try: cd /home/rahul/linux-3.13.6 make [wait a few minutes as it builds some scripts and starts building kernel code...] hit <Ctrl-C>
You can also do just a `make modules` in your kernel sources directory instead of interrupting the build iirc. Sankar
then go back and try building your module.
I had the exact same issue and little penguin came to the rescue :)
On Sat, Mar 15, 2014 at 12:29 AM, Rahul Garg <rahul.lnmiit@gmail.com> wrote:
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
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Sankar P http://psankar.blogspot.com
2014-03-15 9:59 GMT+05:30 Rahul Garg <rahul.lnmiit@gmail.com>:
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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Sankar P http://psankar.blogspot.com
participants (3)
-
Aruna Hewapathirane -
Rahul Garg -
Sankar P