All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] RFC: enable building of out-of-tree modules
@ 2011-03-02 18:00 Darren Hart
  2011-03-02 23:34 ` Darren Hart
  0 siblings, 1 reply; 3+ messages in thread
From: Darren Hart @ 2011-03-02 18:00 UTC (permalink / raw)
  To: poky; +Cc: Darren Hart

From: Darren Hart <dvhart@linux.intel.com>

The following patches provide a mechanism to address [BUGID #241] through
two additions to module.bbclass which build and clean the hostprogs. The
second patch adds an example kernel module.

When building with the hello-world-mod, the resulting rootfs is missing
all the other kernel modules (/lib/modules/KERNEL_VER/extras contains
hello-world.ko, but /lib/modules/KERNEL_VER/kernel is missing). The
sysroots has all the modules, but the rootfs generated by the image
recipe only has the hello-world module. This is the last wrinkle to
iron out, any ideas on how to address this would be appreciated.

Gary, can you try the module.bbclass with your module to see if it
builds successfully?

Thanks,

Darren Hart (2):
  module: build and clean hostprogs for each module
  hello-world-mod: add a module for testing module.bbclass

 meta/classes/module.bbclass                        |   21 ++-
 meta/recipes-kernel/hello-world-mod/files/COPYING  |  340 ++++++++++++++++++++
 meta/recipes-kernel/hello-world-mod/files/Makefile |   14 +
 .../hello-world-mod/files/hello_world.c            |   33 ++
 .../hello-world-mod/hello-world-mod.bb             |   15 +
 5 files changed, 422 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-kernel/hello-world-mod/files/COPYING
 create mode 100644 meta/recipes-kernel/hello-world-mod/files/Makefile
 create mode 100644 meta/recipes-kernel/hello-world-mod/files/hello_world.c
 create mode 100644 meta/recipes-kernel/hello-world-mod/hello-world-mod.bb



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

* Re: [PATCH 0/2] RFC: enable building of out-of-tree modules
  2011-03-02 18:00 [PATCH 0/2] RFC: enable building of out-of-tree modules Darren Hart
@ 2011-03-02 23:34 ` Darren Hart
  2011-03-03  9:28   ` Saul Wold
  0 siblings, 1 reply; 3+ messages in thread
From: Darren Hart @ 2011-03-02 23:34 UTC (permalink / raw)
  To: poky; +Cc: Wold, Saul

On 03/02/2011 10:00 AM, Darren Hart wrote:
> From: Darren Hart<dvhart@linux.intel.com>
> 
> The following patches provide a mechanism to address [BUGID #241] through
> two additions to module.bbclass which build and clean the hostprogs. The
> second patch adds an example kernel module.
> 
> When building with the hello-world-mod, the resulting rootfs is missing
> all the other kernel modules (/lib/modules/KERNEL_VER/extras contains
> hello-world.ko, but /lib/modules/KERNEL_VER/kernel is missing). The
> sysroots has all the modules, but the rootfs generated by the image
> recipe only has the hello-world module. This is the last wrinkle to
> iron out, any ideas on how to address this would be appreciated.

CC'ing Saul and Mark hoping they may have some packaging insight into why this
might be happening.

These patches are now available in my contrib/dvhart/modules branch.

I've tried with both rpm and ipk root_fs packaging and get the same result. If
I include hello-world-mod in the image, the /lib/modules/KERNELVER/kernel
directory isn't present in the final rootfs, for example:

BUILDING WITHOUT hello-world-mod in the image:

dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+
build  extra  kernel  modules.builtin  modules.order  source
dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+/kernel/fs
autofs4  binfmt_misc.ko  cifs  configfs  jbd2  minix  nls  ocfs2  quota  reiserfs  romfs
dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+
kernel             modules.ccwmap   modules.devname      modules.isapnpmap  modules.seriomap  modules.symbols.bin
modules.alias      modules.dep      modules.ieee1394map  modules.ofmap      modules.softdep   modules.usbmap
modules.alias.bin  modules.dep.bin  modules.inputmap     modules.pcimap     modules.symbols
dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+/kernel/fs/
nls
dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+/kernel/fs/nls/
nls_utf8.ko


BUILDING WITH hello-world-mod in the image:

dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+
build  extra  kernel  modules.builtin  modules.order  source
dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+/extra/
hello_world.ko
dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+/kernel/fs
autofs4  binfmt_misc.ko  cifs  configfs  jbd2  minix  nls  ocfs2  quota  reiserfs  romfs
dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+
extra              modules.ccwmap   modules.devname      modules.isapnpmap  modules.seriomap  modules.symbols.bin
modules.alias      modules.dep      modules.ieee1394map  modules.ofmap      modules.softdep   modules.usbmap
modules.alias.bin  modules.dep.bin  modules.inputmap     modules.pcimap     modules.symbols


Still digging, but I'm mostly just stumbling around in the dark.

--
Darren

> Gary, can you try the module.bbclass with your module to see if it
> builds successfully?
> 
> Thanks,
> 
> Darren Hart (2):
>    module: build and clean hostprogs for each module
>    hello-world-mod: add a module for testing module.bbclass
> 
>   meta/classes/module.bbclass                        |   21 ++-
>   meta/recipes-kernel/hello-world-mod/files/COPYING  |  340 ++++++++++++++++++++
>   meta/recipes-kernel/hello-world-mod/files/Makefile |   14 +
>   .../hello-world-mod/files/hello_world.c            |   33 ++
>   .../hello-world-mod/hello-world-mod.bb             |   15 +
>   5 files changed, 422 insertions(+), 1 deletions(-)
>   create mode 100644 meta/recipes-kernel/hello-world-mod/files/COPYING
>   create mode 100644 meta/recipes-kernel/hello-world-mod/files/Makefile
>   create mode 100644 meta/recipes-kernel/hello-world-mod/files/hello_world.c
>   create mode 100644 meta/recipes-kernel/hello-world-mod/hello-world-mod.bb
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


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

* Re: [PATCH 0/2] RFC: enable building of out-of-tree modules
  2011-03-02 23:34 ` Darren Hart
@ 2011-03-03  9:28   ` Saul Wold
  0 siblings, 0 replies; 3+ messages in thread
From: Saul Wold @ 2011-03-03  9:28 UTC (permalink / raw)
  To: Darren Hart; +Cc: poky@yoctoproject.org

On 03/02/2011 03:34 PM, Darren Hart wrote:
> On 03/02/2011 10:00 AM, Darren Hart wrote:
>> From: Darren Hart<dvhart@linux.intel.com>
>>
>> The following patches provide a mechanism to address [BUGID #241] through
>> two additions to module.bbclass which build and clean the hostprogs. The
>> second patch adds an example kernel module.
>>
>> When building with the hello-world-mod, the resulting rootfs is missing
>> all the other kernel modules (/lib/modules/KERNEL_VER/extras contains
>> hello-world.ko, but /lib/modules/KERNEL_VER/kernel is missing). The
>> sysroots has all the modules, but the rootfs generated by the image
>> recipe only has the hello-world module. This is the last wrinkle to
>> iron out, any ideas on how to address this would be appreciated.
>
> CC'ing Saul and Mark hoping they may have some packaging insight into why this
> might be happening.
>
Darren,

I messed around with your branch tonight (after my migraine went away 
finally).  I set in my local.conf

MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += " hello-world-mod "

I tried it at first and it seemed to fail, but I cleanall'ed both 
hello-world-mod and task-poky-boot and that seemed to do the trick. 
Might have been a stale task-poky-boot was not getting rebuilt properly. 
  I saw both a /lib/modules/<KERNELVER>/extra and 
/lib/modules/<KERNELVER>/kernel in my images.

Sau!

> These patches are now available in my contrib/dvhart/modules branch.
>
> I've tried with both rpm and ipk root_fs packaging and get the same result. If
> I include hello-world-mod in the image, the /lib/modules/KERNELVER/kernel
> directory isn't present in the final rootfs, for example:
>
> BUILDING WITHOUT hello-world-mod in the image:
>
> dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+
> build  extra  kernel  modules.builtin  modules.order  source
> dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+/kernel/fs
> autofs4  binfmt_misc.ko  cifs  configfs  jbd2  minix  nls  ocfs2  quota  reiserfs  romfs
> dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+
> kernel             modules.ccwmap   modules.devname      modules.isapnpmap  modules.seriomap  modules.symbols.bin
> modules.alias      modules.dep      modules.ieee1394map  modules.ofmap      modules.softdep   modules.usbmap
> modules.alias.bin  modules.dep.bin  modules.inputmap     modules.pcimap     modules.symbols
> dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+/kernel/fs/
> nls
> dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+/kernel/fs/nls/
> nls_utf8.ko
>
>
> BUILDING WITH hello-world-mod in the image:
>
> dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+
> build  extra  kernel  modules.builtin  modules.order  source
> dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+/extra/
> hello_world.ko
> dvhart@rage:build$ ls tmp/sysroots/qemux86/lib/modules/2.6.37.2-yocto-standard+/kernel/fs
> autofs4  binfmt_misc.ko  cifs  configfs  jbd2  minix  nls  ocfs2  quota  reiserfs  romfs
> dvhart@rage:build$ ls tmp/work/qemux86-poky-linux/poky-image-sato-1.0-r0/rootfs/lib/modules/2.6.37.2-yocto-standard+
> extra              modules.ccwmap   modules.devname      modules.isapnpmap  modules.seriomap  modules.symbols.bin
> modules.alias      modules.dep      modules.ieee1394map  modules.ofmap      modules.softdep   modules.usbmap
> modules.alias.bin  modules.dep.bin  modules.inputmap     modules.pcimap     modules.symbols
>
>
> Still digging, but I'm mostly just stumbling around in the dark.
>
> --
> Darren
>
>> Gary, can you try the module.bbclass with your module to see if it
>> builds successfully?
>>
>> Thanks,
>>
>> Darren Hart (2):
>>     module: build and clean hostprogs for each module
>>     hello-world-mod: add a module for testing module.bbclass
>>
>>    meta/classes/module.bbclass                        |   21 ++-
>>    meta/recipes-kernel/hello-world-mod/files/COPYING  |  340 ++++++++++++++++++++
>>    meta/recipes-kernel/hello-world-mod/files/Makefile |   14 +
>>    .../hello-world-mod/files/hello_world.c            |   33 ++
>>    .../hello-world-mod/hello-world-mod.bb             |   15 +
>>    5 files changed, 422 insertions(+), 1 deletions(-)
>>    create mode 100644 meta/recipes-kernel/hello-world-mod/files/COPYING
>>    create mode 100644 meta/recipes-kernel/hello-world-mod/files/Makefile
>>    create mode 100644 meta/recipes-kernel/hello-world-mod/files/hello_world.c
>>    create mode 100644 meta/recipes-kernel/hello-world-mod/hello-world-mod.bb
>>
>> _______________________________________________
>> poky mailing list
>> poky@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/poky
>
>



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

end of thread, other threads:[~2011-03-03  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 18:00 [PATCH 0/2] RFC: enable building of out-of-tree modules Darren Hart
2011-03-02 23:34 ` Darren Hart
2011-03-03  9:28   ` Saul Wold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.