[OE-core] [PATCH] Add the output of depmod into kernel module .tgz file
Mark Hatle
mark.hatle at windriver.com
Wed Nov 19 02:41:02 UTC 2014
From: Yue Tao <Yue.Tao at windriver.com>
[ Sent for Yocto Project compliance, not believed to be generally applicable ]
do_rootfs() runs depmod on the final rootfs, so the depmod files are
in the rootfs image. But the kernel module .tgz doesn't have the files.
If you un-tar the new version of the kernel module .tgz on the board,
it will need to re-run depmod. The avoid this we are running depmod in
kernel_do_deploy() before generating the kernel .tgz.
Signed-off-by: Yue Tao <Yue.Tao at windriver.com>
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
meta/classes/kernel.bbclass | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index e0c3a2e..f0e2a28 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -489,9 +489,15 @@ addtask uboot_mkimage before do_install after do_compile
kernel_do_deploy() {
install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
if [ ${MODULE_TARBALL_DEPLOY} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
+ # Generate modules.* files in order to adding the modules.* into kernel module tar ball
+ # after making the tar ball, remove the modules.* files to avoid unnecessary QA warnings.
mkdir -p ${D}/lib
- tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${D} lib
+ cp -r ${D}/lib ${DEPLOYDIR}
+ (cd ${D}; cp --parent boot/System.map-${KERNEL_VERSION} ${DEPLOYDIR})
+ depmodwrapper -a -b ${DEPLOYDIR} ${KERNEL_VERSION}
+ tar -cvzf ${DEPLOYDIR}/${MODULE_TARBALL_BASE_NAME} -C ${DEPLOYDIR} lib boot/System.map-${KERNEL_VERSION}
ln -sf ${MODULE_TARBALL_BASE_NAME} ${DEPLOYDIR}/${MODULE_TARBALL_SYMLINK_NAME}
+ rm -rf ${DEPLOYDIR}/lib ${DEPLOYDIR}/boot
fi
ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${DEPLOYDIR}/${KERNEL_IMAGE_SYMLINK_NAME}.bin
--
1.9.3
More information about the Openembedded-core
mailing list