Skip to contentSkip to conversation

uki.bbclass: fix building of UKI images with multiple initramfs fstypes

PATCH Superseded Dmitry Baryshkov 3 participants 4 messages Jan 7 – Jan 19

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uki.bbclass: fix building of UKI images with multiple initramfs fstypes

If INITRAMFS_FSTYPES contains more than one entry, ukify build command will fail as INITRD_ARCHIVE will contain extra strings. Use only the first initramfs type, letting the user to specify other fstypes.

---
 meta/classes-recipe/uki.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-recipe/uki.bbclass +2 -1
index a2b1c8a82d6f..7457662f3f5e 100644
@@ -73,7 +73,8 @@ require ../conf/image-uefi.conf
 
 INITRAMFS_IMAGE ?= "core-image-minimal-initramfs"
 
-INITRD_ARCHIVE ?= "${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}"
+UKI_CPIO_FSTYPE ?= "${@d.getVar("INITRAMFS_FSTYPES").split()[0]}"
+INITRD_ARCHIVE ?= "${INITRAMFS_IMAGE}-${MACHINE}.${UKI_CPIO_FSTYPE}"
 
 do_image_complete[depends] += "${INITRAMFS_IMAGE}:do_image_complete"
 
Signature · 1 line
2.47.3
#1 lore raw
Quoted 9 lines · Dmitry Baryshkov

If INITRAMFS_FSTYPES contains more than one entry, ukify build command will fail as INITRD_ARCHIVE will contain extra strings. Use only the first initramfs type, letting the user to specify other fstypes.

---
 meta/classes-recipe/uki.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

And gracious ping. This was sent almost two weeks ago with no feedback to it up to now.

Signature · 2 lines
With best wishes
Dmitry
#2 lore raw

Hi,

Quoted 5 lines · Dmitry Baryshkov via lists.openembedded.org
Quoted 4 lines · Dmitry Baryshkov

If INITRAMFS_FSTYPES contains more than one entry, ukify build command will fail as INITRD_ARCHIVE will contain extra strings. Use only the first initramfs type, letting the user to specify other fstypes.

Quoted 8 lines
Quoted 5 lines
---
 meta/classes-recipe/uki.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

And gracious ping. This was sent almost two weeks ago with no feedback to it up to now.

This has passed testing, but due do intermittent issues on our test infrastructure merging patches has slowed down. Reviews should be on their way soon hopefully.

See https://wiki.yoctoproject.org/wiki/Weekly_Status.

Regards,
Antonin

Signature · 3 lines
Antonin Godard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw
In reply to Dmitry Baryshkov
Quoted 14 lines · Dmitry Baryshkov via lists.openembedded.org

If INITRAMFS_FSTYPES contains more than one entry, ukify build command will fail as INITRD_ARCHIVE will contain extra strings. Use only the first initramfs type, letting the user to specify other fstypes.

---
 meta/classes-recipe/uki.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-recipe/uki.bbclass +0 -0
index a2b1c8a82d6f..7457662f3f5e 100644

meta/classes-recipe/uki.bbclass require ../conf/image-uefi.conf · line 77

Quoted 6 lines
meta/classes-recipe/uki.bbclass +2 -1
@@ -73,7 +73,8 @@ require ../conf/image-uefi.conf
 
 INITRAMFS_IMAGE ?= "core-image-minimal-initramfs"
 
-INITRD_ARCHIVE ?= "${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}"
+UKI_CPIO_FSTYPE ?= "${@d.getVar("INITRAMFS_FSTYPES").split()[0]}"
+INITRD_ARCHIVE ?= "${INITRAMFS_IMAGE}-${MACHINE}.${UKI_CPIO_FSTYPE}"

Hi Dmitry, apologies for the delays in review.

The general idea here is ok but we would like to avoid additional dynamic calls in variable assignments where we can - each time we add some Python code in a variable assignment it slows down recipe parsing a little further.

In this case, INITRD_ARCHIVE is only used in the do_uki() Python function. Can move the parsing of INITRAMFS_FSTYPES into this function? That would mean it only executes once during the do_uki task and not during recipe parsing.

Best regards,

Signature · 1 line
Paul Barker