summaryrefslogtreecommitdiffstats
path: root/meta
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 14:34:31 -0800
commit101ce7109eee3af44d2e4999085d6dfcfd782587 (patch)
treea15c309428ce5cecc4a7821527bd7c732c6693d1 /meta
parent7caf083ebe12224b70e4a27d2bc1c41533216cec (diff)
downloadpoky-101ce7109eee3af44d2e4999085d6dfcfd782587.tar.gz
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>
Diffstat (limited to 'meta')
-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 d16d462080..bbceaf7219 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -3,6 +3,13 @@ DEPENDS += "virtual/kernel"
3 3
4inherit module-base 4inherit module-base
5 5
6# Ensure the hostprogs are available for module compilation
7module_do_compile_prepend() {
8 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
9 oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
10 -C ${STAGING_KERNEL_DIR} scripts
11}
12
6module_do_compile() { 13module_do_compile() {
7 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 14 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
8 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ 15 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
@@ -15,7 +22,10 @@ module_do_compile() {
15 22
16module_do_install() { 23module_do_install() {
17 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 24 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
18 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" modules_install 25 oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
26 KERNEL_SRC=${STAGING_KERNEL_DIR} \
27 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
28 modules_install
19} 29}
20 30
21pkg_postinst_append () { 31pkg_postinst_append () {