aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-29 14:35:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-29 15:35:47 +0000
commit6cccae3ca54c1177a1d91d23c3e151d74e735ee9 (patch)
tree07be17bfb829c2a68bc1e12d3994960e6bc08fbd /meta/classes/kernel.bbclass
parent41f0f86ec0a3e0b6f6c9bb4ef71a4215c00bf66c (diff)
downloadopenembedded-core-contrib-6cccae3ca54c1177a1d91d23c3e151d74e735ee9.tar.gz
openembedded-core-contrib-6cccae3ca54c1177a1d91d23c3e151d74e735ee9.tar.bz2
openembedded-core-contrib-6cccae3ca54c1177a1d91d23c3e151d74e735ee9.zip
kernel: Fix depmod for multilib
Using populate_sysroot for this data was a nice idea but flawed as it doesn't work in multilib builds. Instead we can use PKGDATA_DIR since this is consistent over multilib builds. It also turns out to be slightly neater code too. Hopefully this resolves the problem once and for all. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass26
1 files changed, 11 insertions, 15 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 29498b4faf..125ed88406 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -231,16 +231,20 @@ kernel_do_install() {
[ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
install -d ${D}${sysconfdir}/modules-load.d
install -d ${D}${sysconfdir}/modprobe.d
-
- # Stash data for depmod
- install -d ${D}${datadir}/kernel-depmod/
- echo "${KERNEL_VERSION}" > ${D}${datadir}/kernel-depmod/kernel-abiversion
- cp System.map ${D}${datadir}/kernel-depmod/System.map-${KERNEL_VERSION}
}
do_install[prefuncs] += "package_get_auto_pr"
addtask shared_workdir after do_compile before do_install
+emit_depmod_pkgdata() {
+ # Stash data for depmod
+ install -d ${PKGDESTWORK}/kernel-depmod/
+ echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion
+ cp System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION}
+}
+
+PACKAGEFUNCS += "emit_depmod_pkgdata"
+
do_shared_workdir () {
cd ${B}
@@ -285,21 +289,13 @@ do_shared_workdir () {
fi
}
-# Only stage the files we need for depmod, not the modules/firmware
+# We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware
sysroot_stage_all () {
- sysroot_stage_dir ${D}${datadir}/kernel-depmod ${SYSROOT_DESTDIR}${datadir}/kernel-depmod
+ :
}
KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig"
-PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess"
-
-kernel_package_preprocess () {
- rm -rf ${PKGD}${datadir}/kernel-depmod
- rmdir ${PKGD}${datadir}
- rmdir ${PKGD}${exec_prefix}
-}
-
kernel_do_configure() {
# fixes extra + in /lib/modules/2.6.37+
# $ scripts/setlocalversion . => +