how to compile additional module?

loody miloody at gmail.com
Tue Aug 23 08:11:28 EDT 2011


hi:
Thanks for your help.


2011/8/23 Mirco Tischler <mt-ml at gmx.de>:
> 2011/8/23 loody <miloody at gmail.com>:
>> hi all:
>> I found if kernel want to build usb modules it will show below:there is
>> make -f scripts/Makefile.build obj=drivers/usb
>>
>> if I have a folder in drivers/miloodytest
>> how could I generate
>> make -f scripts/Makefile.build obj=drivers/miloodytest
>>
>> BR,
>>
>> 2011/8/23 loody <miloody at gmail.com>:
>>> Dear all:
>>> I make a module under kernel tree and adding Kconfig for that.
>>> But I have no idea where I should add that when I type "make modules",
>>> the modules I add will be compiled.
>>> Would anyone tell me where the modules list located?
>>>
>>>
>>> --
>>> Regards,
>>>
> Hi
> It seems you forgot to edit the Makefiles. Take a look at
> Documentation/kbuild/makefiles.txt for a detailed explanation. Section
> 3 is probably the most interesting.

I put Makefile in drivers/miloodytest
I have no idea how to let kbuild jump to there and make modules.
I guess the secret should be in scripts folder, since it seems some
tool or shell will generate command as below:
make -f scripts/Makefile.build obj=drivers/usb
make -f scripts/Makefile.build obj=drivers/block
make -f scripts/Makefile.build obj=drivers/cdrom
make -f scripts/Makefile.build obj=drivers/char
make -f scripts/Makefile.build obj=drivers/clocksource
make -f scripts/Makefile.build obj=drivers/firmware

but there is no Makefile in drivers, right?
Yours,



-- 
Regards,



More information about the Kernelnewbies mailing list