Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] New Kernel Module
@ 2014-01-07 13:25 makowski.pawel
  2014-01-07 15:52 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: makowski.pawel @ 2014-01-07 13:25 UTC (permalink / raw)
  To: buildroot

Hello everyone,
I'm trying to add a new kernel module. In my ?understanding, the best way to do that is to add it into the Sample?Kernel Code?section in Kernel configuration (linux-menuconfig). I performe following steps:
> 1. I put?an example?c file with well know hello_world example?to?/output/build/linux_xyz/samples/mykmod directory.
> 2. I create Makefile for it: obj-$(CONFIG_SAMPLE_MYKMOD) += mykmod.o
> 3. I add the new section to KConfig in samples directory.
?
When I run the make linux-menuconfig a new module is visible. So, I check it to the build.
After issued the make command there is visible that my module is built.
I download Kernel image and RootFs to the target and I can't find the?module file.
Where can I find this file ? How can I menage this module ?
--
Regards/Pozdrawiam
Pawe? Makowski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140107/c667c8e5/attachment-0001.html>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] New Kernel Module
  2014-01-07 13:25 [Buildroot] New Kernel Module makowski.pawel
@ 2014-01-07 15:52 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2014-01-07 15:52 UTC (permalink / raw)
  To: buildroot

Pawel,

On Tue, 07 Jan 2014 14:25:31 +0100, makowski.pawel wrote:

> &gt; 1. I put?an example?c file with well know hello_world example?to?/output/build/linux_xyz/samples/mykmod directory.

Don't do this. output/build is a temporary directory created only for
the duration of the build. The next time you will do "make clean", it
will be completely removed, and you will loose your changes.

Doing changes in output/build is OK is those are just for quickly
testing if a change fixes something. But any sort of development should
*NOT* be done by changing stuff in output/build.

> &gt; 2. I create Makefile for it: obj-$(CONFIG_SAMPLE_MYKMOD) += mykmod.o
> &gt; 3. I add the new section to KConfig in samples directory.
> ?
> When I run the make linux-menuconfig a new module is visible. So, I check it to the build.
> After issued the make command there is visible that my module is built.
> I download Kernel image and RootFs to the target and I can't find the?module file.
> Where can I find this file ? How can I menage this module ?

Check in output/target/lib/modules/<version>/ if it is there.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-07 15:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-07 13:25 [Buildroot] New Kernel Module makowski.pawel
2014-01-07 15:52 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox