[PATCH v9 2/3] testsuite: Add testcases to check dtb deployment

8 views
Skip to first unread message

Zhihang Wei

unread,
Apr 1, 2026, 6:49:14 AMApr 1
to isar-...@googlegroups.com
From: Anton Mikanovich <ami...@ilbers.de>

Build several images with dtbs deployed to the same path.

- test_dtb_deploy_distros

Same machine, different distros, same image, same kernel, same dtb
name and contents.

- test_dtb_deploy_images

Same machine, same distro, different images, same kernel, same dtb
name and contents.

Both fail with:

ERROR: mc:phyboard-mira-bookworm:isar-image-base-1.0-r0 do_copy_boot_files: The recipe isar-image-base is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
NOTE: recipe isar-image-base-1.0-r0: task do_copy_boot_files: Failed
build/tmp/deploy/images/phyboard-mira/imx6q-phytec-mira-rdk-nand.dtb
(not matched to any task)
Please verify which recipe should provide the above files.

Signed-off-by: Anton Mikanovich <ami...@ilbers.de>
---
testsuite/citest.py | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

diff --git a/testsuite/citest.py b/testsuite/citest.py
index ab28b68e..ca701422 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -677,6 +677,39 @@ class WicTest(CIBaseTest):
)


+class DtbDeployTest(CIBaseTest):
+
+ """
+ Build some targets potentially causing DTB deploy issues.
+
+ :avocado: tags=dtbdeploy,full
+ """
+
+ def test_dtb_deploy_distros(self):
+ """
+ Cover case: Same machine, different distros
+ """
+ targets = [
+ 'mc:phyboard-mira-bullseye:isar-image-base',
+ 'mc:phyboard-mira-bookworm:isar-image-base',
+ ]
+
+ self.init()
+ self.perform_build_test(targets)
+
+ def test_dtb_deploy_images(self):
+ """
+ Cover case: Same machine/distro, different images
+ """
+ targets = [
+ 'mc:phyboard-mira-bookworm:isar-image-base',
+ 'mc:phyboard-mira-bookworm:isar-image-ci',
+ ]
+
+ self.init()
+ self.perform_build_test(targets)
+
+
class NoCrossTest(CIBaseTest):

"""
--
2.39.5

Zhihang Wei

unread,
Apr 1, 2026, 6:49:14 AMApr 1
to isar-...@googlegroups.com
Image task "do_copy_boot_files" deploys kernel, initrd, and device tree
binaries to the deploy directory.

When different images for the same target (e.g., "-base" and "-debug")
are built in parallel, DTB deployment may fail because DTBs do not
contain image-specific components in their filenames, unlike the kernel
and initrd. As a result, artifacts from different builds may be written
to the same location.

Here we deploy the DTBs and other image artifacts to subdirectories,
with names of distro image encoded to the path.

Note that this results in separate copies of the same artifacts being
deployed for each image build.

Related topics on the mailing list:
https://lists.isar-build.org/isar-users/20250403170701.80774...@siemens.com/T/#u
https://lists.isar-build.org/isar-users/20240705071856.904-...@siemens.com/T/#u
https://lists.isar-build.org/isar-users/c426ad86-5cc5-42e6...@googlegroups.com/T/#u
https://lists.isar-build.org/isar-users/20240416100746.568...@mentor.com/T/#u
https://lists.isar-build.org/isar-users/DB3PR10MB690820CF3D...@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM/T/#u
https://lists.isar-build.org/isar-users/DB3PR10MB690861E70E...@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM/T/#u
https://lists.isar-build.org/isar-users/20240131144459.23...@ilbers.de/T/#u

Changes since v8:
- Rebase on next.
- Document how this approach differs from OpenEmbedded.

Changes since v7:
- Fix SOB.

Changes since v6:
- Deploy DTBs and other image artifacts into distro- and
image-specific subdirs.
- Shorten image artifact filenames.

Changes since v5:
- Fix isoimage-isohybrid-isar WIC plugin.
- Split testcases.
- Update wording.

Changes since v4:
- Rebase on next.
- Squash latest patch to first one.
- Fix deploy paths in initrd tests.

Changes since v3:
- Rebase on next.
- Fix target deploy dir path for installer.

Changes since v2:
- Patch 1: Consider also kernel suffix.
- Patch 2: Use separate testcase for possible dtb clashes.
- Minor cosmetic fixes.

Changes since v1:
- Separate `dtb-files` recipe used instead of linux one.
- Included older "[PATCH] Fix do_copy_boot_files error" into the
series.

Anton Mikanovich (2):
wic: Obtain real machine name in isoimage source plugin
testsuite: Add testcases to check dtb deployment

Zhihang Wei (1):
meta: Deploy image build artifacts into distro- and image-specific
subdirs

RECIPE-API-CHANGELOG.md | 77 +++++++++++++++++++
.../installer-add-rootfs.bbclass | 9 ++-
meta/classes-recipe/image.bbclass | 11 +--
.../imagetypes_container.bbclass | 2 +-
meta/classes-recipe/imagetypes_wic.bbclass | 2 +-
meta/conf/bitbake.conf | 3 +-
.../plugins/source/isoimage-isohybrid-isar.py | 6 +-
testsuite/cibase.py | 2 +-
testsuite/citest.py | 40 +++++++++-
testsuite/start_vm.py | 2 +-
10 files changed, 135 insertions(+), 19 deletions(-)

--
2.39.5

Zhihang Wei

unread,
Apr 2, 2026, 12:04:20 PMApr 2
to isar-...@googlegroups.com
Applied to next.

Zhihang

Quirin Gylstorff

unread,
Apr 7, 2026, 10:29:26 AMApr 7
to Zhihang Wei, isar-...@googlegroups.com, Jan Kiszka, Felix Moessbauer
Hi,

On 4/1/26 12:49 PM, Zhihang Wei wrote:
> Image task "do_copy_boot_files" deploys kernel, initrd, and device tree
> binaries to the deploy directory.
>
> When different images for the same target (e.g., "-base" and "-debug")
> are built in parallel, DTB deployment may fail because DTBs do not
> contain image-specific components in their filenames, unlike the kernel
> and initrd. As a result, artifacts from different builds may be written
> to the same location.
>
> Here we deploy the DTBs and other image artifacts to subdirectories,
> with names of distro image encoded to the path.
>
> Note that this results in separate copies of the same artifacts being
> deployed for each image build.
>

This breaks isar-cip-core with release 1.0 with the unified kernel build
as a custom initrd is no longer part of the same directory structure as
the rest of the image. As the custom initramfs is a separate package it
cannot aquire the PN of the rootfs. See
https://github.com/ilbers/isar/blob/6504321e85b5fdc3bb5a83f042b77cb39cd11a6f/meta/classes-recipe/imagetypes_wic.bbclass#L215.

Also merge_wic_sbom does no longer work with a custom initrd.

Quirin

Jan Kiszka

unread,
Apr 8, 2026, 9:10:19 AMApr 8
to Quirin Gylstorff, Zhihang Wei, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
On 07.04.26 16:29, Quirin Gylstorff wrote:
> Hi,
>
> On 4/1/26 12:49 PM, Zhihang Wei wrote:
>> Image task "do_copy_boot_files" deploys kernel, initrd, and device tree
>> binaries to the deploy directory.
>>
>> When different images for the same target (e.g., "-base" and "-debug")
>> are built in parallel, DTB deployment may fail because DTBs do not
>> contain image-specific components in their filenames, unlike the kernel
>> and initrd. As a result, artifacts from different builds may be written
>> to the same location.
>>
>> Here we deploy the DTBs and other image artifacts to subdirectories,
>> with names of distro image encoded to the path.
>>
>> Note that this results in separate copies of the same artifacts being
>> deployed for each image build.
>>
>
> This breaks isar-cip-core with release 1.0 with the unified kernel build
> as a custom initrd is no longer part of the same directory structure as
> the rest of the image. As the custom initramfs is a separate package it
> cannot aquire the PN of the rootfs. See https://github.com/ilbers/isar/
> blob/6504321e85b5fdc3bb5a83f042b77cb39cd11a6f/meta/classes-recipe/
> imagetypes_wic.bbclass#L215.
>
> Also merge_wic_sbom does no longer work with a custom initrd.
>

The RECIPE-API-CHANGLOG says:

> Artifacts that do not belong to a full image (e.g. isar-image-base,
> isar-image-ci) remain unchanged. For example, a customized initramfs
> built independently is not affected.

And this is the problem: Customized initramfs logically belonged to full
images, and so it was possible to address them DEPLOY_DIR_IMAGE. Now
they are "somewhere" - namely under the OE-standard DEPLOY_DIR_IMAGE,
but there also with the traditional image file naming, flat.

Quirin tried some isar-cip-core conversion, and this is the new
deployment reality:

build/tmp/deploy/images/qemu-amd64/
├── cip-core-initramfs-cip-core-trixie-qemu-amd64.cdx.json
├── cip-core-initramfs-cip-core-trixie-qemu-amd64-initrd.img
├── cip-core-initramfs-cip-core-trixie-qemu-amd64.manifest
├── cip-core-initramfs-cip-core-trixie-qemu-amd64.spdx.json
└── cip-core-trixie-cip-core-image
├── bootx64.efi
├── linux.efi
├── OVMF
│ ├── OVMF_CODE_4M.fd
│ ├── OVMF_CODE_4M.ms.fd
│ ├── OVMF_CODE_4M.secboot.fd
│ ├── OVMF_CODE_4M.secboot.strictnx.fd
│ ├── OVMF_CODE_4M.snakeoil.fd
│ ├── OVMF_VARS_4M.fd
│ ├── OVMF_VARS_4M.ms.fd
│ └── OVMF_VARS_4M.snakeoil.fd
├── qemu-amd64.cdx.json
├── qemu-amd64.dpkg_status
├── qemu-amd64-ebg.swu
├── qemu-amd64.manifest
├── qemu-amd64.spdx.json
├── qemu-amd64.squashfs
├── qemu-amd64.swu
├── qemu-amd64.uuid.env
├── qemu-amd64.wic
├── qemu-amd64.wic.bmap
├── qemu-amd64.wic.cdx.json
├── qemu-amd64.wic.manifest
├── qemu-amd64.wic.spdx.json
└── vmlinuz

Already visually, this screams for improvements. But I'm afraid there
are more concrete issues hidden in even more complex layers.

And this is exactly why I strongly recommended to NOT merge these
changes in a hurry before the release anymore. We already needed 9
versions, and we were still not fully confident about the stability of
the new solution.

Looks like we now need a 1.0.1, either with a really consistent approach
or a revert. I would not recommend any downstreams affected by the
deploy dir changes to jump on 1.0 until we sorted out all details.

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center

Quirin Gylstorff

unread,
Apr 8, 2026, 9:20:47 AMApr 8
to Jan Kiszka, Zhihang Wei, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
Why are we using now ${MACHINE}.* as identifier and not ${IMAGE_PN}. In
a ci/cd script i prefer the IMAGE_PN as it shows me what I need to collect.

Quirin

>
> Jan
>

Jan Kiszka

unread,
Apr 8, 2026, 9:28:07 AMApr 8
to Quirin Gylstorff, Zhihang Wei, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
You mean

cip-core-image.wic

rather than

qemu-amd64.wic

above, right?

Quirin Gylstorff

unread,
Apr 8, 2026, 9:30:39 AMApr 8
to Jan Kiszka, Zhihang Wei, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
Yes.

Also here is the current state in isar-cip-core
https://gitlab.com/cip-project/cip-core/isar-cip-core/-/commits/qg/isar/update-to-1.0.

Quirin
>
> Jan
>

Zhihang Wei

unread,
Apr 9, 2026, 11:35:04 AMApr 9
to Jan Kiszka, Quirin Gylstorff, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
"remain unchanged" here means the customized initramfs keep the same
filenames and paths as before.

Customized initramfs are built by their own recipes. While building a
full image may trigger the build of a customized initramfs, they can
also be built separately. In contrast, the default initramfs is not a
standalone recipe but a task within the image build process. So
technically, customized initramfs are independent artifacts.

If CIP core associates a specific customized initramfs with an image
via DEPLOY_DIR_IMAGE, this assumption is affected by the new layout and
needs to be adapted accordingly.
If this kind of issue should be detected before merging, a CIP core
test case needs to be added to CI.

Zhihang

Jan Kiszka

unread,
Apr 9, 2026, 12:38:34 PMApr 9
to Zhihang Wei, Quirin Gylstorff, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
The problem is that Isar upstream lacks a realistic use case for
customized initramfs. One would be to embed it into a rootfs, as
replacement of the default one. Quirin had the idea of packaging it for
that. Another would be feeding it into the UKI generation of
bootimg-efi-isar but that has unfortunately not yet been enabled for Isar.
Unfortunately, this will need a process, not just a pipeline step
because breaking changes will need at least temporary patches to that layer.

Roberto A. Foglietta

unread,
Apr 9, 2026, 1:10:30 PMApr 9
to Jan Kiszka, Zhihang Wei, Quirin Gylstorff, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
On Thu, 9 Apr 2026 at 18:38, 'Jan Kiszka' via isar-users
<isar-...@googlegroups.com> wrote:
>

[...]

> The problem is that Isar upstream lacks a realistic use case for
> customized initramfs. One would be to embed it into a rootfs, as
> replacement of the default one.

It lacks as far as you know. However, I am moving towards the rootfs
paradigm but the custom initramfs will not get out the scene anyway

+ 6ce8d8c - 2026-04-06 - Makefile: revisiting internal logic, p.8 (fix)
+ cfa451a - 2026-04-06 - Makefile: revisiting internal logic, p.8
+ 4878752 - 2026-04-06 - Makefile: revisiting internal logic, p.7
+ e20935f - 2026-04-06 - Makefile: revisiting internal logic, p.6
+ 6bc2f9a - 2026-04-06 - Makefile: revisiting internal logic, p.5
+ 289fe7e - 2026-04-06 - Makefile: revisiting internal logic, p.4
+ 59a9435 - 2026-04-06 - Makefile: revisiting internal logic, p.3
+ 4421faa - 2026-04-06 - Makefile: revisiting internal logic, p.2
+ e30267a - 2026-04-06 - Makefile: revisiting internal logic

If you wonder why, here we are: Europe talks about what other countries do.

https://github.com/robang74/uchaosys/blob/main/docs/uchaos-sponsorship-presentation.md#trust-sovereignty-for-security-strategy

Best regards, R-

MOESSBAUER, Felix

unread,
Apr 10, 2026, 4:28:53 AMApr 10
to Zhihang Wei, Kiszka, Jan, Gylstorff, Quirin, isar-...@googlegroups.com, Baurzhan Ismagulov

>
Hi, as I already wrote in [1], the root cause of the bug is that there
is currently no way to couple the path of the deployed initrd and the
imaging step. We previously relied on well-known path coincidence by
basically guessing how the initrd is named and checking if there is one
at the guessed path.

If the path is no longer predictable (with the Deploy DTBs patchset),
we cannot find the initrd.

What we actually need is a way to pass down a variable to both the
image and the initrd. This variable could be defined in local conf or
machine conf. Semantically, it belongs to the machine conf as there
also the kernel is selected. I can try to come up with a PoC for that,
but as of now, ISAR v1.0 is simply broken!

[1] 
https://github.com/ilbers/isar/commit/8986f02c27d0e94fb4945690b572d9e5a8cebc2f

Best regards,
Felix

Roberto A. Foglietta

unread,
Apr 11, 2026, 4:47:42 AMApr 11
to Jan Kiszka, Zhihang Wei, Quirin Gylstorff, isar-...@googlegroups.com, Felix Moessbauer, Baurzhan Ismagulov
Seriously?

+:git-shell:v067:uchaosys> sw ee84a56
commit ee84a561842e3608da0a914b33a05bf322979acd (HEAD -> v067,
origin/v067, origin/HEAD)
Author: Roberto A. Foglietta <roberto....@gmail.com>
Date: Sat Apr 11 10:41:13 2026 +0200

musl,cfng: lib.net download wget reression fix

Signed-off-by: Roberto A. Foglietta <roberto....@gmail.com>

diff --git a/cnfg/Makefile.musl b/cnfg/Makefile.musl
index e6295b5..cdd7b8a 100644
--- a/cnfg/Makefile.musl
+++ b/cnfg/Makefile.musl
@@ -27,7 +27,7 @@ MPFR_SITE = $(GNU_SITE)/mpfr
ISL_SITE = https://downloads.sourceforge.net/project/libisl/

PCRE2_SITE = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$(PCRE2_VER)
-ZLIB_SITE = https://zlib.net/
+ZLIB_SITE = https://zlib.net

MUSL_SITE = https://musl.libc.org/releases
MUSL_REPO = https://git.musl-libc.org/git/musl
diff --git a/cnfg/musl-125x.config.mak b/cnfg/musl-125x.config.mak
index d92422e..273589a 100644
--- a/cnfg/musl-125x.config.mak
+++ b/cnfg/musl-125x.config.mak
@@ -49,7 +49,7 @@ LINUX_VER = 5.15.202

# By default source archives are downloaded with wget. curl is also an option.

-DL_CMD = wget -c -O
+DL_CMD = wget -U "Mozilla/5.0" -c -O
# DL_CMD = curl -C - -L -o

# Check sha-1 hashes of downloaded source archives. On gnu systems this is
________________________________________________________________________
files in commited:
cnfg/Makefile.musl




--
Roberto A. Foglietta
+49.176.274.75.661
+39.349.33.30.697
Reply all
Reply to author
Forward
0 new messages