diff mbox series

[v2] image-live.bbclass: Adjust the default value for INITRD_LIVE

Message ID 20240305063425.844730-1-haokexin@gmail.com
State New
Headers show
Series [v2] image-live.bbclass: Adjust the default value for INITRD_LIVE | expand

Commit Message

Kevin Hao March 5, 2024, 6:34 a.m. UTC
From: Kevin Hao <kexin.hao@windriver.com>

The ${INITRAMFS_FSTYPES} may contains multi filesystem types,
such as "cpio.gz cpio.xz". So it can't be used directly in setting
of the default INITRD_LIVE. We choose the first filesystem type
in ${INITRAMFS_FSTYPES} for the default INITRD_LIVE.

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
---
v2: Drop the adding of ${IMAGE_NAME_SUFFIX}.

 meta/classes-recipe/image-live.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/image-live.bbclass b/meta/classes-recipe/image-live.bbclass
index da919d52f983..d2e95ef51c3a 100644
--- a/meta/classes-recipe/image-live.bbclass
+++ b/meta/classes-recipe/image-live.bbclass
@@ -38,7 +38,7 @@  do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
 LABELS_LIVE ?= "boot install"
 ROOT_LIVE ?= "root=/dev/ram0"
 INITRD_IMAGE_LIVE ?= "${MLPREFIX}core-image-minimal-initramfs"
-INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}${IMAGE_MACHINE_SUFFIX}.${INITRAMFS_FSTYPES}"
+INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}${IMAGE_MACHINE_SUFFIX}.${@d.getVar('INITRAMFS_FSTYPES').split()[0]}"
 
 LIVE_ROOTFS_TYPE ?= "ext4"
 ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${LIVE_ROOTFS_TYPE}"