diff mbox series

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

Message ID 20260107042345.2264330-1-dmitry.baryshkov@oss.qualcomm.com
State Under Review
Headers show
Series uki.bbclass: fix building of UKI images with multiple initramfs fstypes | expand

Commit Message

Dmitry Baryshkov Jan. 7, 2026, 4:23 a.m. UTC
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.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 meta/classes-recipe/uki.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Dmitry Baryshkov Jan. 19, 2026, 6:46 a.m. UTC | #1
On Wed, Jan 07, 2026 at 06:23:45AM +0200, Dmitry Baryshkov wrote:
> 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.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
>  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.
Antonin Godard Jan. 19, 2026, 9:05 a.m. UTC | #2
Hi,

On Mon Jan 19, 2026 at 7:46 AM CET, Dmitry Baryshkov via lists.openembedded.org wrote:
> On Wed, Jan 07, 2026 at 06:23:45AM +0200, Dmitry Baryshkov wrote:
>> 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.
>> 
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>>  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
Paul Barker Jan. 19, 2026, 6:25 p.m. UTC | #3
On Wed, 2026-01-07 at 06:23 +0200, Dmitry Baryshkov via
lists.openembedded.org wrote:
> 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.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
>  meta/classes-recipe/uki.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass
> index a2b1c8a82d6f..7457662f3f5e 100644
> --- a/meta/classes-recipe/uki.bbclass
> +++ b/meta/classes-recipe/uki.bbclass
> @@ -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,
diff mbox series

Patch

diff --git a/meta/classes-recipe/uki.bbclass b/meta/classes-recipe/uki.bbclass
index a2b1c8a82d6f..7457662f3f5e 100644
--- a/meta/classes-recipe/uki.bbclass
+++ b/meta/classes-recipe/uki.bbclass
@@ -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"