On many platforms, the boot time can be reduced by booting without initramfs. Allow omitting it instead of failing the build when INITRAMFS_IMAGE is empty.
Signed-off-by: Nora Schiffer <[email protected]> --- meta/classes-recipe/uki.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass index fa1c95603b..566eab1eaa 100644 --- a/meta/classes-recipe/uki.bbclass +++ b/meta/classes-recipe/uki.bbclass @@ -73,7 +73,7 @@ require ../conf/image-uefi.conf INITRAMFS_IMAGE ?= "core-image-minimal-initramfs" -do_image_complete[depends] += "${INITRAMFS_IMAGE}:do_image_complete" +do_image_complete[depends] += "${@ '${INITRAMFS_IMAGE}:do_image_complete' if d.getVar('INITRAMFS_IMAGE') else ''}" UKIFY_CMD ?= "ukify build" UKI_CONFIG_FILE ?= "${UNPACKDIR}/uki.conf" @@ -127,9 +127,11 @@ python do_uki() { ukify_cmd += " --stub %s" % (stub) # initrd - uki_fstype = d.getVar("INITRAMFS_FSTYPES").split()[0] - initramfs_image = "%s-%s.%s" % (d.getVar('INITRAMFS_IMAGE'), d.getVar('MACHINE'), uki_fstype) - ukify_cmd += " --initrd=%s" % (os.path.join(deploy_dir_image, initramfs_image)) + initramfs_image = d.getVar('INITRAMFS_IMAGE') + if initramfs_image: + uki_fstype = d.getVar("INITRAMFS_FSTYPES").split()[0] + initramfs_file = "%s-%s.%s" % (initramfs_image, d.getVar('MACHINE'), uki_fstype) + ukify_cmd += " --initrd=%s" % (os.path.join(deploy_dir_image, initramfs_file)) # kernel kernel_filename = d.getVar('UKI_KERNEL_FILENAME') or None -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider https://www.tq-group.com/
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#241074): https://lists.openembedded.org/g/openembedded-core/message/241074 Mute This Topic: https://lists.openembedded.org/mt/120295973/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
