summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2011-03-01 14:17:55 -0800
committerSaul Wold <sgw@linux.intel.com>2011-03-04 11:37:08 -0800
commite807fc977770cb64a217768672c18437ea8f3057 (patch)
tree4a3b7b268bdfc7e093356aba0df03caa7a595811
parentaa60f178d9f6b4ebdf03bbfcf2b46e94bf4e78d3 (diff)
downloadopenembedded-core-e807fc977770cb64a217768672c18437ea8f3057.tar.gz
openembedded-core-e807fc977770cb64a217768672c18437ea8f3057.tar.bz2
openembedded-core-e807fc977770cb64a217768672c18437ea8f3057.tar.xz
openembedded-core-e807fc977770cb64a217768672c18437ea8f3057.zip
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. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Gary Thomas <gary@mlbassoc.com>
-rw-r--r--meta/classes/module.bbclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index d16d46208..bbceaf721 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -3,6 +3,13 @@ DEPENDS += "virtual/kernel"
inherit module-base
+# Ensure the hostprogs are available for module compilation
+module_do_compile_prepend() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
+ -C ${STAGING_KERNEL_DIR} scripts
+}
+
module_do_compile() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
@@ -15,7 +22,10 @@ module_do_compile() {
module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
- oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" modules_install
+ oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
+ KERNEL_SRC=${STAGING_KERNEL_DIR} \
+ CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
+ modules_install
}
pkg_postinst_append () {