Problem while compiling my module on downloaded kernel source

Sankar P sankar.curiosity at gmail.com
Sat Mar 15 10:27:09 EDT 2014


2014-03-15 10:12 GMT+05:30 Aruna Hewapathirane <aruna.hewapathirane at 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 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
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Sankar P
http://psankar.blogspot.com



More information about the Kernelnewbies mailing list