[PATCH] rootfs: Restore previous naming scheme in INITRD_DEPLOY_FILE

7 views
Skip to first unread message

Jan Kiszka

unread,
Nov 29, 2025, 10:14:01 AMNov 29
to isar-users, Cedric Hombourger, Zhihang Wei
From: Jan Kiszka <jan.k...@siemens.com>

Might have been accidentally changed, specifically as initramfs.bbclass
was not updated as well, and that broke downstream users of
INITRD_DEPLOY_FILE via wic.

Fixes: c3c4e72cbfc4 ("image: introduce IMAGE_INITRD, deprecate INITRD_IMAGE")
Signed-off-by: Jan Kiszka <jan.k...@siemens.com>
---
meta/classes/image.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index b030024f..d367d8c7 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -29,7 +29,7 @@ INITRD_IMAGE ?= ""
IMAGE_INITRD ?= ""

# Name of the deployed initrd image
-INITRD_DEPLOY_FILE = "${@ d.getVar('IMAGE_INITRD') or '${PN}' }-${DISTRO}-${MACHINE}-initrd.img"
+INITRD_DEPLOY_FILE = "${@ d.getVar('IMAGE_INITRD') or '${PN}' }-${DISTRO}-${MACHINE}.initrd.img"

# Make sure dependent initramfs recipe is built
do_image[depends] += "${@ '${IMAGE_INITRD}:do_build' if '${IMAGE_INITRD}' else '' }"
--
2.51.0

Quirin Gylstorff

unread,
Dec 3, 2025, 6:52:42 AMDec 3
to isar-...@googlegroups.com
Hi

On 11/29/25 16:13, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.k...@siemens.com>
>
> Might have been accidentally changed, specifically as initramfs.bbclass
> was not updated as well, and that broke downstream users of
> INITRD_DEPLOY_FILE via wic.
>
I test the patch in a installer image with a custom initrd something is
still broken.
I will try to get more details.

Quirin> Fixes: c3c4e72cbfc4 ("image: introduce IMAGE_INITRD, deprecate

Quirin Gylstorff

unread,
Dec 3, 2025, 9:38:38 AMDec 3
to isar-...@googlegroups.com
do_image is a virtual task and is never executed. This dependency will
not be triggered.
see *image*/temp/log.taskorder, e.g.

20251203-141015.078894 do_fetch (8603): log.do_fetch.8603
20251203-141015.432653 do_unpack (8817): log.do_unpack.8817
20251203-141016.385643 do_copy_wks_template (9626):
log.do_copy_wks_template.9626
20251203-141018.352672 do_check_swu_partition_uuids (11629):
log.do_check_swu_partition_uuids.11629
20251203-142714.202649 do_rootfs_install (269893):
log.do_rootfs_install.269893
20251203-142812.346458 do_copy_boot_files (278687):
log.do_copy_boot_files.278687
20251203-142812.347572 do_deploy_tpm2_firmware (278688):
log.do_deploy_tpm2_firmware.278688
20251203-142812.479116 do_rootfs_postprocess (278755):
log.do_rootfs_postprocess.278755
20251203-142813.723336 do_generate_image_uuid (280155):
log.do_generate_image_uuid.280155
20251203-142813.833043 do_rootfs_finalize (280281):
log.do_rootfs_finalize.280281
20251203-142813.837689 do_transform_template (280287):
log.do_transform_template.280287
20251203-142835.289802 do_rootfs_quality_check (303158):
log.do_rootfs_quality_check.303158
20251203-142835.458624 do_rootfs (303179): log.do_rootfs.303179
20251203-142835.545966 do_image_tools (303194): log.do_image_tools.303194
20251203-142835.548904 do_rootfs_wicenv (303195):
log.do_rootfs_wicenv.303195
20251203-142835.635904 do_image_squashfs (303216):
log.do_image_squashfs.303216
20251203-142853.614060 do_image_verity (305205): log.do_image_verity.305205
20251203-142916.978304 do_image_wic (309278): log.do_image_wic.309278
20251203-145901.333675 do_image_wic (953): log.do_image_wic.953


I will send a fix.

Quirin >
>

Zhihang Wei

unread,
Dec 9, 2025, 5:16:01 AM (10 days ago) Dec 9
to Jan Kiszka, isar-users, Cedric Hombourger
It cause a wired bug in full CI, when building the target
'mc:qemuamd64-iso-bookworm:isar-image-ci' under the test case:
- citest.py:NoCrossTest.test_nocross
Error log from avocado:
ERROR: mc:qemuamd64-iso-bookworm:isar-image-ci-1.0-r0 do_image_wic:
ExecutionError('/work/build/tmp/work/debian-bookworm-amd64/isar-image-ci-qemuamd64-iso/1.0-r0/temp/run.do_image_wic.231803',
1, None, None)
ERROR: Logfile of failure stored in:
/work/build/tmp/work/debian-bookworm-amd64/isar-image-ci-qemuamd64-iso/1.0-r0/temp/log.do_image_wic.231803
ERROR: Task
(mc:qemuamd64-iso-bookworm:/work/meta-test/recipes-core/images/isar-image-ci.bb:do_image_wic)
failed with exit code '1'
Error log from the failed task:
DEBUG: Executing python function set_image_size
DEBUG: Python function set_image_size finished
DEBUG: Executing shell function do_image_wic
Creating
/etc/schroot/chroot.d/isar-builder-50e1b98f-a270-4654-bbe8-a40664e9bf72-231803
Started session:
isar-builder-50e1b98f-a270-4654-bbe8-a40664e9bf72-231803-f762d345-e215-4bb7-98ba-63ad30c6c51c
<snip>
Setting up grub-common (2.06-13+deb12u1) ...
Setting up grub-efi-amd64-bin (2.06-13+deb12u1) ...
Processing triggers for libc-bin (2.36-9+deb12u13) ...
Processing triggers for man-db (2.11.2-2) ...
INFO: Creating image(s)...
ERROR: _exec_cmd: cd
/tmp/isar-image-ci-debian-bookworm-qemuamd64-iso.wic/tmp.wic.0y6e0rtx/INITRD
&& find . | cpio -o -H newc -R root:root
>/tmp/isar-image-ci-debian-bookworm-qemuamd64-iso.wic/tmp.wic.0y6e0rtx/initrd.cpio
returned '127' instead of 0
output: /bin/sh: 1: cpio: not found
To redo the test using avocado:
1. Have a clean clone of isar, checkout to branch next and apply your
patches:
$ git clone -b next https://github.com/ilbers/isar.git
$ cd isar
$ git am /path-to/0001-my-contribution-to-isar.patch
2. Disable unrelated targets to make error appears faster, by applying
the following diff to "testsuite/citest.py":
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 27cc9ff6..8dd40d62 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -494,36 +494,7 @@ class NoCrossTest(CIBaseTest):
def test_nocross(self):
targets = [
- 'mc:qemuarm-buster:isar-image-ci',
- 'mc:qemuarm-bullseye:isar-image-base',
- 'mc:qemuarm64-bullseye:isar-image-base',
- 'mc:qemuarm64-bookworm:isar-image-ci',
- 'mc:qemui386-buster:isar-image-base',
- 'mc:qemui386-bullseye:isar-image-base',
- 'mc:qemuamd64-buster:isar-image-ci',
- 'mc:qemuamd64-bullseye:isar-initramfs',
- 'mc:qemumipsel-bullseye:isar-image-base',
- 'mc:imx6-sabrelite-bullseye:isar-image-base',
- 'mc:phyboard-mira-bullseye:isar-image-base',
- 'mc:hikey-bullseye:isar-image-base',
- 'mc:virtualbox-bullseye:isar-image-base',
- 'mc:virtualbox-bookworm:isar-image-base',
- 'mc:bananapi-bullseye:isar-image-base',
- 'mc:bananapi-bookworm:isar-image-base',
- 'mc:nanopi-neo-bullseye:isar-image-base',
- 'mc:nanopi-neo-bookworm:isar-image-base',
- 'mc:qemuamd64-focal:isar-image-ci',
- 'mc:qemuamd64-bookworm:isar-image-ci',
'mc:qemuamd64-iso-bookworm:isar-image-ci',
- 'mc:qemui386-bookworm:isar-image-base',
- 'mc:qemumipsel-bookworm:isar-image-ci',
- 'mc:hikey-bookworm:isar-image-base',
- 'mc:beagleplay-bookworm:isar-image-base',
- 'mc:qemuarm64-noble:isar-image-base',
- 'mc:qemuamd64-noble:isar-image-base',
- 'mc:qemuamd64-jammy:isar-image-base',
- 'mc:qemuarm64-jammy:isar-image-base',
- 'mc:x86-pc-bookworm:isar-image-base',
]
self.init()
3.Run kas shell, setup CI prerequisites (avocado, qemu) and cleanup:
$ ./kas/kas-container shell kas/isar.yaml --command \
"rm -rf /work/build/conf && /work/scripts/ci_setup.sh"
4.Run the failed test in fast:
$ cd /work/testsuite
$ avocado run citest.py:NoCrossTest.test_nocross$
Zhihang

Jan Kiszka

unread,
Dec 11, 2025, 8:54:03 AM (7 days ago) Dec 11
to Zhihang Wei, isar-users, Cedric Hombourger
Did you understand that issue by now? The patch itself is still a
must-have to fix initrd generation in downstream layers.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Zhihang Wei

unread,
Dec 11, 2025, 11:09:30 AM (7 days ago) Dec 11
to Jan Kiszka, isar-users, Cedric Hombourger
No. can you re-create the same issue on your side?

Zhihang

Jan Kiszka

unread,
Dec 11, 2025, 11:39:44 AM (7 days ago) Dec 11
to Zhihang Wei, isar-users, Cedric Hombourger
Let me try that tomorrow, wanted to "play" with the testsuite once again
anyway.

Jan Kiszka

unread,
Dec 12, 2025, 5:30:06 AM (7 days ago) Dec 12
to Zhihang Wei, isar-users, Felix Moessbauer, Cedric Hombourger, Baurzhan Ismagulov
Still no fun (slow startup of the build env, need to patch the setup to
run the test etc. etc.). Quickly translating the testsuite target into a
proper kas configuration is way more enjoyable:

kas-container build kas/isar.yaml:kas/machine/qemuamd64-iso.yaml:kas/distro/debian-bookworm.yaml:kas/image/isar-image-ci.yaml

At this chance I noticed that isar's kas configuration is missing all
the multiconfig targets you have, thus can't be fed with mc: targets
directly. Needs fixing!


Now to the actual bug: As expected, it was most likely a pre-existing
one. I do not get yet why it was working before c3c4e72cbfc4, but maybe
we are not entering a questionable code path in meta/scripts/lib/wic/
plugins/source/isoimage-isohybrid-isar.py. Fixing that, we get things
working again:

diff --git a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
index fb6c6b39..7e981a78 100644
--- a/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/isoimage-isohybrid-isar.py
@@ -194,7 +194,7 @@ class IsoImagePlugin(SourcePlugin):
machine = os.path.basename(initrd_dir)

pattern = '%s/%s*%s.%s' % (initrd_dir, image_name, machine, image_type)
- pattern = '%s/%s-%s-initrd.%s' % (initrd_dir, image_name, machine, image_type)
+ pattern = '%s/%s-%s.initrd.%s' % (initrd_dir, image_name, machine, image_type)
files = glob.glob(pattern)
if files:
initrd = files[0]

But that raises the question why we are duplicating INITRD_DEPLOY_FILE
here, rather than using it. Maybe it was used before via setting the
INITRD bitbar var, I still need to understand that. In any case, this
pattern duplication in the wic plugin should be avoided, possibly even
the whole code path. Felix, you introduced that.

Zhihang Wei

unread,
Dec 12, 2025, 9:36:17 AM (6 days ago) Dec 12
to Jan Kiszka, isar-users, Felix Moessbauer, Anton Mikanovich, Cedric Hombourger, Baurzhan Ismagulov
Just FYI, I'll be on vacation since 13.12.2025 until 11.01.2026. Anton
will take the maintenance work during this time. Please add Anton to the
relevant email threads if it's needed. I'll be back on 12.01.2025.

Zhihang

Jan Kiszka

unread,
Dec 12, 2025, 9:37:15 AM (6 days ago) Dec 12
to Zhihang Wei, isar-users, Felix Moessbauer, Anton Mikanovich, Cedric Hombourger, Baurzhan Ismagulov
Sure - enjoy the time off!
Reply all
Reply to author
Forward
0 new messages