Skip to contentSkip to conversation

kernel.bbclass: fix deployment for initramfs images

PATCH Awais Belal 2 participants 2 messages Feb 4, 2021 – Feb 5, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

The do_bundle_initramfs() only processes kernel image types that are found in KERNEL_IMAGETYPE_FOR_MAKE whereas the build system can generate other types that are not directly supported by the kernel build system. In which case when we come to the deploy phase not all the images mentioned in KERNEL_IMAGETYPES would have a respective initramfs bundled image. An example is using vmlinux.gz in KERNEL_IMAGETYPES and enabling initramfs and then we see

install: cannot stat 'arch/arm64/boot/vmlinux.gz.initramfs': No such file or directory

So we align the deploy phase with bundle initramfs phase and pick up relevant initramfs bundled images using KERNEL_IMAGETYPE_FOR_MAKE instead of KERNEL_IMAGETYPES.

---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index ddff2ddcd2..8693ab86be 100644
@@ -759,7 +759,7 @@ kernel_do_deploy() {
        fi
 
        if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then
-               for imageType in ${KERNEL_IMAGETYPES} ; do
+               for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do
                        if [ "$imageType" = "fitImage" ] ; then
                                continue
                        fi

--
2.17.1

Ping!

#2 lore raw
Quoted 38 lines · Awais Belal

The do_bundle_initramfs() only processes kernel image types that are found in KERNEL_IMAGETYPE_FOR_MAKE whereas the build system can generate other types that are not directly supported by the kernel build system. In which case when we come to the deploy phase not all the images mentioned in KERNEL_IMAGETYPES would have a respective initramfs bundled image. An example is using vmlinux.gz in KERNEL_IMAGETYPES and enabling initramfs and then we see

install: cannot stat 'arch/arm64/boot/vmlinux.gz.initramfs': No such file or directory

So we align the deploy phase with bundle initramfs phase and pick up relevant initramfs bundled images using KERNEL_IMAGETYPE_FOR_MAKE instead of KERNEL_IMAGETYPES.

---
 meta/classes/kernel.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +0 -0
index ddff2ddcd2..8693ab86be 100644
@@ -759,7 +759,7 @@ kernel_do_deploy() {

        fi

        if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then

meta/classes/kernel.bbclass +1 -1
-               for imageType in ${KERNEL_IMAGETYPES} ; do
+               for imageType in ${KERNEL_IMAGETYPE_FOR_MAKE} ; do

                        if [ "$imageType" = "fitImage" ] ; then continue
                        fi
--
2.17.1

Quoted 1 line

Ping!

Merged six days ago?

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=44ecc935b2ba919ed5bf026c02cdb814e207d996

Cheers,

Richard