]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: skip installing fitImage when using Initramfs bundles
authorAbdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Tue, 19 Jan 2021 10:53:02 +0000 (10:53 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Jan 2021 00:41:39 +0000 (00:41 +0000)
When including an initramfs bundle inside a FIT image, the fitImage is created
after the install task by do_assemble_fitimage_initramfs.

This happens after the generation of the initramfs bundle
(done by do_bundle_initramfs).

So, at the level of the install task we should not try to install the fitImage.
The fitImage is still not generated yet.

After the generation of the fitImage, the deploy task copies the fitImage from
the build directory to the deploy folder.

Change-Id: I3eaa6bba1412f388f710fa0f389f66631c1c4826
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 2f1006ddf06301404ace4f11faf5a7b1072d461a..ddff2ddcd2ed8ec922e155696bf7c62224c2f05d 100644 (file)
@@ -415,9 +415,23 @@ kernel_do_install() {
        #
        install -d ${D}/${KERNEL_IMAGEDEST}
        install -d ${D}/boot
+
+       #
+       # When including an initramfs bundle inside a FIT image, the fitImage is created after the install task
+       # by do_assemble_fitimage_initramfs.
+       # This happens after the generation of the initramfs bundle (done by do_bundle_initramfs).
+       # So, at the level of the install task we should not try to install the fitImage. fitImage is still not
+       # generated yet.
+       # After the generation of the fitImage, the deploy task copies the fitImage from the build directory to
+       # the deploy folder.
+       #
+
        for imageType in ${KERNEL_IMAGETYPES} ; do
-               install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType ${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION}
+               if [ $imageType != "fitImage" ] || [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ] ; then
+                       install -m 0644 ${KERNEL_OUTPUT_DIR}/$imageType ${D}/${KERNEL_IMAGEDEST}/$imageType-${KERNEL_VERSION}
+               fi
        done
+
        install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION}
        install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
        install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}