summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel.bbclass26
-rw-r--r--meta/lib/oe/rootfs.py2
-rw-r--r--meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb12
3 files changed, 18 insertions, 22 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 . => +
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 72d32f7899..420c0b9623 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -209,7 +209,7 @@ class Rootfs(object):
'new', '-v'])
def _generate_kernel_module_deps(self):
- kernel_abi_ver_file = oe.path.join(self.d.getVar('STAGING_DIR_TARGET', True), self.d.getVar('datadir', True), "kernel-depmod",
+ kernel_abi_ver_file = oe.path.join(self.d.getVar('PKGDATA_DIR', True), "kernel-depmod",
'kernel-abiversion')
if not os.path.exists(kernel_abi_ver_file):
bb.fatal("No kernel-abiversion file found (%s), cannot run depmod, aborting" % kernel_abi_ver_file)
diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 83a382a2cd..44b7650e4e 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -19,21 +19,21 @@ if [ "\$1" != "-a" -o "\$2" != "-b" ]; then
echo "Usage: depmodwrapper -a -b rootfs KERNEL_VERSION" >&2
exit 1
fi
-if [ ! -r ${STAGING_DIR_TARGET}${datadir}/kernel-depmod/kernel-abiversion ]; then
- echo "Unable to read: ${STAGING_DIR_TARGET}${datadir}/kernel-depmod/kernel-abiversion" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion" >&2
else
- kernelabi=\$(cat ${STAGING_DIR_TARGET}${datadir}/kernel-depmod/kernel-abiversion)
+ kernelabi=\$(cat ${PKGDATA_DIR}/kernel-depmod/kernel-abiversion)
if [ "\$kernelabi" != "\$4" ]; then
echo "Error: Kernel version \$4 does not match kernel-abiversion (\$kernelabi)" >&2
exit 1
fi
fi
-if [ ! -r ${STAGING_DIR_TARHET}${datadir}/kernel-depmod/System.map-\$4 ]; then
- echo "Unable to read: ${STAGING_DIR_TARGET}${datadir}/kernel-depmod/System.map-\$4" >&2
+if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ]; then
+ echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
exec env depmod "\$1" "\$2" "\$3" "\$4"
else
- exec env depmod "\$1" "\$2" "\$3" -F "${STAGING_DIR_TARGET}${datadir}/kernel-depmod/System.map-\$4" "\$4"
+ exec env depmod "\$1" "\$2" "\$3" -F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
fi
EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper