Problem while compiling my module on downloaded kernel source

Aruna Hewapathirane aruna.hewapathirane at gmail.com
Sat Mar 15 00:42:02 EDT 2014


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 at 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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



More information about the Kernelnewbies mailing list