]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bootimg.bbclass: take initramfs into consideration
authorChen Qi <Qi.Chen@windriver.com>
Wed, 21 May 2014 08:14:26 +0000 (04:14 -0400)
committerChen Qi <Qi.Chen@windriver.com>
Mon, 16 Jun 2014 10:35:58 +0000 (18:35 +0800)
It's a reasonable assumption that if INITRAMFS_IMAGE is set, the user
wants to do something with it. So the bootimg.bbclass should not just
ignore the existence of INITRAMFS_IMAGE.

This patch fixes the bootimg.bbclass to ship the initramfs image or
the bundled kernel for later use.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
meta/classes/bootimg.bbclass

index 76785676009111cbe0dfbaa01c61741ef3b45400..b92526563391ea992177ae209bf0f50fbbf0a179 100644 (file)
@@ -66,6 +66,11 @@ populate() {
 
        # Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
        install -m 0644 ${STAGING_KERNEL_DIR}/bzImage ${DEST}/vmlinuz
+       if [ -n "${INITRAMFS_IMAGE}" ] && [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then
+               install -m 0644 ${STAGING_KERNEL_DIR}/bzImage-initramfs-${MACHINE}.bin ${DEST}/vmlinuz-initramfs
+       elif [ -n "${INITRAMFS_IMAGE}" ]; then
+               install -m 0644 ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz ${DEST}/initrd.img
+       fi
 
        if [ -n "${INITRD}" ] && [ -s "${INITRD}" ]; then
                install -m 0644 ${INITRD} ${DEST}/initrd
@@ -237,4 +242,4 @@ IMAGE_TYPEDEP_iso = "ext3"
 IMAGE_TYPEDEP_hddimg = "ext3"
 IMAGE_TYPES_MASKED += "iso hddimg"
 
-addtask bootimg before do_build
+addtask bootimg before do_build after do_bundle_initramfs