Commit Graph

9 Commits

Author SHA1 Message Date
Anders Darander 795843df09 module.bbclass: add lock to prevent error bulding ext modules
When external modules are built, files in $STAGING_KERNEL_DIR/scripts/basic will/can get
rebuilt.
This raises a potential race condition. Prevent this by adding a lock around the
do_make_scripts() function. Further, make sure that the kernel has been installed
to the sysroot, prior to executing this new task.

(From OE-Core rev: 8681b82e8b466929205edde7ba479f3ac1a6143e)

(From OE-Core rev: 694e3016e25dff3f573291830d79982c8b8793a2)

Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:38:03 +00:00
Darren Hart 3b49416fc7 kernel/bbclass: rework kernel and module classes to allow for building out-of-tree modules
The existing infrastructure uses an external build tree which references the
kernel source in the work dir. If run with rm work, building external modules
will fail.

This patch places a configured source tree in sysroots. Striking a balance
between minimal size and minimal maintenance is difficult. A fully configured
tree is about 500MB after a clean. This version leans on the side of caution and
removes only the obviously unecessary parts of the source tree to conserve
space, resulting in about 170MB. The arch directories would be some additional
pruning we could do. Given examples from the devel package from distributions, I
suspect this size could be reduced to 75MB or so, but at the cost of a much more
complex recipe which is likely to require a great deal more maintenance to keep
current with kernel releases.

Care is also taken to clean the hostprogs in scripts, and the modules are
responsible for building them as needed. Although it is unclear to me if this is
really necessary, especially considering that modules put these bits back as
soon as they compile. If we are not generating an sstate package, I suspect we
can ignore these.

Please try this with your modules and let me know how it does. I tried to take
non linux-yocto kernel recipes into account, but I have only tested with
linux-yocto and the hello-mod recipe so far.

(From OE-Core rev: a9d41062e24a6b99661b3a5256f369b557433607)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Koen Kooi <koen@dominion.thruhere.net>
Acked-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-23 15:43:46 +00:00
Darren Hart 5c0df11a69 module: build hostprogs for each module
This fixes [BUGID #241]

The kernel hostprogs are built for the host architecture. They should not be
deployed to the target, and they should not be included in an sstate package
which might get reused on a host of a different architecture.

As we don't build many out-of-tree modules, this patch takes the approach of
building the hostprogs as part of the module compile process with a
do_compile_prepend() routine in module.bbclass.

We don't have to clean the hostprogs as modules depend on the kernel being
populate_staging, so its done with the staging directory by the time we run.

(From OE-Core rev: e807fc977770cb64a217768672c18437ea8f3057)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-04 22:26:36 +00:00
Richard Purdie 37f3bbaa41 module.bbclass: Fix external module version dependencies
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4518 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-05-21 09:35:53 +00:00
Marcin Juszkiewicz 5b9ecbad73 module*.bbclass: set AR to KERNEL_AR during building of kernel modules
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3422 311d38ba-8fff-0310-9ca6-ca027cbcb966
2008-01-08 14:40:51 +00:00
Richard Purdie 0ea0986a59 module.bbclass: PARALLEL_INSTALL_MODULES is dead code
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2639 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-09-01 23:02:27 +00:00
Marcin Juszkiewicz dcb5ef2fcd module.bbclass: make all modules depend on update-modules
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1925 311d38ba-8fff-0310-9ca6-ca027cbcb966
2007-06-13 12:44:52 +00:00
Richard Purdie 93a8d0662e classes: Sync with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@651 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-08-27 16:01:33 +00:00
Richard Purdie b2f192faab Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
2006-07-21 10:10:31 +00:00