]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
kernel-uboot.bbclass: Use vmlinux.initramfs when INITRAMFS_IMAGE_BUNDLE set
authorRaju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
Wed, 22 Jun 2022 11:07:34 +0000 (16:37 +0530)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Jun 2022 23:00:24 +0000 (00:00 +0100)
vmlinux file doesnot have the initramfs image when INITRAMFS_IMAGE_BUNDLE was set.
Use vmlinux.initramfs in uboot_prep_kimage when INITRAMFS_IMAGE_BUNDLE set
based on the implementation in kernel.bbclass do_bundle_initramfs function,
https://github.com/openembedded/openembedded-core/blob/master/meta/classes/kernel.bbclass#L316-L317
to be able to use proper linux.bin file in creation of fitImage.

Signed-off-by: Raju Kumar Pothuraju <raju.kumar-pothuraju@xilinx.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
meta/classes/kernel-uboot.bbclass

index 2daa068298950fa7f2d0aaa232c4c805e4f9fb46..2facade818238528590ae2529d83ade0eb7030bb 100644 (file)
@@ -15,6 +15,12 @@ uboot_prep_kimage() {
                linux_comp="none"
        else
                vmlinux_path="vmlinux"
+               # Use vmlinux.initramfs for linux.bin when INITRAMFS_IMAGE_BUNDLE set
+               # As per the implementation in kernel.bbclass.
+               # See do_bundle_initramfs function
+               if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ] && [ -e vmlinux.initramfs ]; then
+                       vmlinux_path="vmlinux.initramfs"
+               fi
                linux_suffix="${FIT_KERNEL_COMP_ALG_EXTENSION}"
                linux_comp="${FIT_KERNEL_COMP_ALG}"
        fi