Problem in compiling a kernel module
Niamathullah sharief
newbiesha at gmail.com
Sun Jul 10 12:39:26 EDT 2011
Dear Kumaran,
Try to compile with the below makefile
*"
obj-m += hello-1.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean"
*
Regards
Sharief
On Sun, Jul 10, 2011 at 12:24 PM, Ponkumaran Annadurai <aspkumaran at gmail.com
> wrote:
>
>
> On Sun, Jul 10, 2011 at 12:15 PM, Prashant Shah <pshah.mumbai at gmail.com>wrote:
>
>> Hi,
>>
>> On Sun, Jul 10, 2011 at 11:36 AM, Ponkumaran Annadurai
>> <aspkumaran at gmail.com> wrote:
>> >
>> > Also I couldn't understand the script (particularly $(MAKE) - what does
>> the
>> > variable stands for? also the rest of the code after
>> "depend.depend.dep").
>> > If you can explain the script, I shall know how to edit the script for
>> my
>> > file.
>>
>> Edit the Makefile and add the following echo's
>>
>> `default:
>> echo $(MAKE)
>> echo $(KERNELDIR)
>> echo $(PWD)
>> $(MAKE) -C $(KERNELDIR) M=$(PWD)
>>
>> You can try echoing the values of the variables. The $(MAKE) is the
>> make command used.
>>
>
> Thanks sir, It worked. But still I couldn't understand what is the wrong in
> the makefile given in TLDP.org, also the if statements as said in the
> previous mail.
> One more thing can I install the new kernel in a virtual machine like
> virtual box? if so how can I do it? coz I can't access Internet from that
> kernel. Suggesting some measures will be helpful.
>
> --
> thanks,
> kumaran
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110710/267e14ab/attachment.html
More information about the Kernelnewbies
mailing list