From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 08 Oct 2025 08:33:53 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qk1-f192.google.com (mail-qk1-f192.google.com [209.85.222.192]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5986XpmI005906 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Oct 2025 08:33:52 +0200 Received: by mail-qk1-f192.google.com with SMTP id af79cd13be357-82968fe9e8csf1580183585a.0 for ; Tue, 07 Oct 2025 23:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1759905226; x=1760510026; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=t46b1E3vTXcRMpKa1eCUAe0MM7UK+8qgcfPcJQMA/hw=; b=wqALovg2tMjMlcsOMRUgSDwrryIsTvl/jYmQKJ1y+xwZUCF7X0mR+A4O74qK2eNFBM RtCHaAc1sn9cbRRbD85bgRdfP40uBqWtrKHdrqgssXshNdOMt0EvTfhYgDdGfncmu3AS eZdRlciP2v8EIrZaoYlzCHG1xgpPTKscuaywdl99BJ5lcf+uq/iJw5XDKjGG5kTj21vp xggYx0rBZrej3eMZPECOZjQLcQXreEsLSAUyWUoQk9KKWQXONTk7C8I5xJdHjRZDdLsS D/KXkZVAqSeY0iow4shIm6SPxv39jd7GSh9ubQQDfe0irnUb/1Fg+4lbS9i5pEulnkPw rG6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759905226; x=1760510026; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=t46b1E3vTXcRMpKa1eCUAe0MM7UK+8qgcfPcJQMA/hw=; b=VaWCkiZRJGMnZDLNiFGN9V417yYUhZaV2VOW7h4fjCltIyDU8r6TlJJGSGvK1WYLC5 7Az+AmosmWS6kBAEbgo715w0ybUB/t4fQZco36ecQ8HuB9iW1oPLI1RIK2ecz6TiQ4cw bKaaiuUi5f718AxTIzF1CP5kmXgVyfeAE6blX5aHoDXNKxMraaS39iWjhMU7czuXX3mG WJ3qmmj4TmMQzwXOpyiG3ZKpfFa/ttDsOZtExGHHB5Pj8mecSRlbWp/TAfMkrVD4U6eu VLMOT8CSYOYeUQmyIwvkJCjXGJqobBE0Mk6MYbblXup9/jcZh3mMT1evFb4cwuvzJm4I R4+A== X-Forwarded-Encrypted: i=1; AJvYcCUpK+4ZI0G7rpd9o8GrEwemqQX+7njLvRZdiORzP6Ixm7/unzjq1yXtEU7r6bWGJRt9UaO9@ilbers.de X-Gm-Message-State: AOJu0YwNjxDeXllYuBVG/OjAJxu1f12LoPjShmZjP5qKmPo3apMEBtuI XBmcM1ma2OEOEokWmzE4t/Hz0hNpdezcWvaDhC1Wsd/m+v4scfivksDL X-Google-Smtp-Source: AGHT+IELCiGzQ3JmgFbg2b17DX5dqRTlSITPYgMb4oN3WZ1rqUYz9QoNbfEmprOP2DHBtFj9Xh/+NA== X-Received: by 2002:ad4:5aae:0:b0:87a:953:971a with SMTP id 6a1803df08f44-87b21015040mr32558326d6.2.1759905225607; Tue, 07 Oct 2025 23:33:45 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ARHlJd6M2P5DYzObN4oGPNwdBDQzLMwRb8Bc8HpwfaMIfoI51A==" Received: by 2002:a05:6214:1770:b0:819:df42:aa30 with SMTP id 6a1803df08f44-878a7380dbdls128229666d6.2.-pod-prod-07-us; Tue, 07 Oct 2025 23:33:44 -0700 (PDT) X-Received: by 2002:a05:620a:3182:b0:816:bc84:9e4a with SMTP id af79cd13be357-88352d959f6mr342689885a.69.1759905224685; Tue, 07 Oct 2025 23:33:44 -0700 (PDT) Date: Tue, 7 Oct 2025 23:33:43 -0700 (PDT) From: "'Badrikesh Prusty' via isar-users" To: isar-users Message-Id: In-Reply-To: <1a2a38b0-49aa-4167-a95e-16f4c5ba385dn@googlegroups.com> References: <20250403170701.807745-1-badrikesh.prusty@siemens.com> <3d694944eb24183d241bf652c43a60d7b73aec69.camel@ilbers.de> <95421431-bec5-4297-8aba-2bd9207f1785n@googlegroups.com> <3629bc6c-800e-4d4f-9ca6-ddd5bdcfa4d0@siemens.com> <1a2a38b0-49aa-4167-a95e-16f4c5ba385dn@googlegroups.com> Subject: Re: [PATCH] image: copy DTB_FILES to DEPLOYDIR/IMAGE_FULLNAME/KERNEL_NAME/ MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_44530_2040868705.1759905223742" X-Original-Sender: badrikesh.prusty%siemens.com@gtempaccount.com X-Original-From: Badrikesh Prusty Reply-To: Badrikesh Prusty Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 8yyRs94D6wMp ------=_Part_44530_2040868705.1759905223742 Content-Type: multipart/alternative; boundary="----=_Part_44531_1483719196.1759905223742" ------=_Part_44531_1483719196.1759905223742 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I=E2=80=99ve sent the updated patch addressing the comments. I also added t= he=20 changelog entry to RECIPES_API_CHANGELOG.md, but it=E2=80=99s not showing u= p here=20 yet. I=E2=80=99ll update this once it appears. =20 On Wednesday, October 8, 2025 at 11:50:28=E2=80=AFAM UTC+5:30 Badrikesh Pru= sty=20 wrote: > Hello all, > > Apologies for the delayed response. I somehow missed the message. > > > This sounds familiar, and I think we discussed that multiple times > > already. Did you study previous threads/patches, e.g. > > https://patchwork.isar-build.org/project/isar/list/?series=3D1241? > > > > Yes, there were few patches that tried to solve the issue. > > > > Using subdirectory (variant similar to TS's) > > - https://patchwork.isar-build.org/project/isar/list/?series=3D1149 > > Allows to overlap files > > - https://patchwork.isar-build.org/project/isar/list/?series=3D1235 > > Make kernel deploy the files, instead of image recipes > > - https://patchwork.isar-build.org/project/isar/list/?series=3D1241 > > > > I reviewed the previously shared patch, but not in full =E2=80=94 thanks = for=20 > sharing it here. > > The patch I sent is very similar to @nicusor patch:=20 > https://patchwork.isar-build.org/project/isar/list/?series=3D1149 > > I just reviewed the other patches and believe that many may encounter the= =20 > same issue. For instance, when attempting to build multiple kernels for a= =20 > single image=E2=80=94such as `linux-image-amd64` and `linux-image-amd64-r= t`=20 > kernels=E2=80=94this overwrite problem is likely to occur. > > This patch also resolves the issue with image builds that include multipl= e=20 > kernels by storing the DTB files in the directory=20 > DEPLOYDIR/IMAGE_FULLNAME/KERNEL_NAME. This will also fix issues when=20 > building with different DISTROs as IMAGE_FULLNAME includes target DISTRO.= =20 > Additionally, it fixes problems that arise when building with different= =20 > DISTROs, since IMAGE_FULLNAME includes the target DISTRO. > > > This would affect downstream as well. You are missing a > > RECIPE-API-CHANGELOG.md entry. > > > > Yes, it will affect downstream layers. E.g. I checked with the=20 > isar-cip-core repo, changes will be required in `efibootguard-boot` wic= =20 > plugin. I will work on fixing it, once this is approved. > > Thanks and Regards, > Badrikesh > On Thursday, September 4, 2025 at 7:42:08=E2=80=AFPM UTC+5:30 Jan Kiszka = wrote: > >> On 04.09.25 11:36, Arulpandiyan Vadivel wrote:=20 >> > @Uladzimir, @Jan Kiszka=20 >> >=20 >> > As 0.11 release was out already, Can we consider merging this change?= =20 >> >=20 >> >> Not in its current form as we explained. Plus you didn't answer the=20 >> question I gave you.=20 >> >> Jan=20 >> >> >=20 >> > Regards,=20 >> > Arulpandiyan V=20 >> >=20 >> > On Friday, 4 April 2025 at 20:01:24 UTC+5:30 Uladzimir Bely wrote:=20 >> >=20 >> > On Fri, 2025-04-04 at 11:55 +0200, Jan Kiszka wrote:=20 >> > > On 03.04.25 19:07, 'Badrikesh Prusty' via isar-users wrote:=20 >> > > > From: badrikesh prusty =20 >> > > >=20 >> > > > Copy DTB_FILES to DEPLOYDIR/IMAGE_FULLNAME/KERNEL_NAME instead of= =20 >> > > > DEPLOYDIR/.=20 >> > > >=20 >> > > > An issue is observed when we attempt to build a second image for a= =20 >> > > > machine=20 >> > > > utilizing DTB_FILES. During the do_copy_boot_files task of image= =20 >> > > > creation, the=20 >> > > > DTB_FILES are copied to the shared location DEPLOYDIR/.= =20 >> > > > When the=20 >> > > > build of a second image is triggered, it detects that the DTB_FILE= S=20 >> > > > are already=20 >> > > > present and avoids overwriting them.=20 >> > >=20 >> > > This sounds familiar, and I think we discussed that multiple times= =20 >> > > already. Did you study previous threads/patches, e.g.=20 >> > > https://patchwork.isar-build.org/project/isar/list/?series=3D1241=20 >> > ?= =20 >> > >=20 >> >=20 >> > Yes, there were few patches that tried to solve the issue.=20 >> >=20 >> > Using subdirectory (variant similar to TS's)=20 >> > - https://patchwork.isar-build.org/project/isar/list/?series=3D1149=20 >> > =20 >> > Allows to overlap files=20 >> > - https://patchwork.isar-build.org/project/isar/list/?series=3D1235=20 >> > =20 >> > Make kernel deploy the files, instead of image recipes=20 >> > - https://patchwork.isar-build.org/project/isar/list/?series=3D1241=20 >> > =20 >> >=20 >> > Finally, there is now perfect solution that would solve all possible= =20 >> > issues and wouldn't break compatibility with downstreams...=20 >> >=20 >> > Anyway, we are planning to prepare Isar release 0.11 without the issue= =20 >> > fix (no downstream breaking changes) and apply some (or mixed) solutio= n=20 >> > after that, even at the cost of downstreams compatibility.=20 >> >=20 >> >=20 >> > > >=20 >> > > > Reproducer:=20 >> > > > bitbake mc:phyboard-mira-bookworm:isar-image-base=20 >> > > > bitbake mc:phyboard-mira-bookworm:isar-image-debug=20 >> > > >=20 >> > > > Copy the DTB_FILES to the directory:=20 >> > > > DEPLOYDIR/IMAGE_FULLNAME/KERNEL_NAME/.=20 >> > > > * This will allow building multiple images.=20 >> > > > * As each kernel recipe ships its own DTB_FILES, if a user tries t= o=20 >> > > > rebuild=20 >> > > > the same image with a new kernel, the DTB_FILES associated with th= e=20 >> > > > older=20 >> > > > kernel will not be overwritten.=20 >> > > >=20 >> > > > Update the DTB_IMG variable to check for DTB_FILES in their new=20 >> > > > location.=20 >> > > > Update the WIC plugin scripts to use the DTB_FILES from their=20 >> > > > updated location=20 >> > > > within the DEPLOYDIR.=20 >> > > > Add IMAGE_FULLNAME and KERNEL_NAME to WICVARS to allow the scripts= =20 >> > > > to retrieve=20 >> > > > these variable values during WIC image generation.=20 >> > > >=20 >> > > > Signed-off-by: badrikesh prusty =20 >> > > > ---=20 >> > > > meta/classes/image.bbclass | 5 +++--= =20 >> > > > meta/classes/imagetypes_wic.bbclass | 6 +++--= -=20 >> > > > meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 4 +++-= =20 >> > > > scripts/lib/wic/plugins/source/bootimg-efi.py | 4 +++-= =20 >> > > > 4 files changed, 12 insertions(+), 7 deletions(-)=20 >> > > >=20 >> > > > diff --git a/meta/classes/image.bbclass=20 >> > > > b/meta/classes/image.bbclass=20 >> > > > index ff3cd737..218e7c35 100644=20 >> > > > --- a/meta/classes/image.bbclass=20 >> > > > +++ b/meta/classes/image.bbclass=20 >> > > > @@ -326,7 +326,7 @@ EOF=20 >> > > > KERNEL_IMG =3D "${PP_DEPLOY}/${KERNEL_IMAGE}"=20 >> > > > INITRD_IMG =3D "${PP_DEPLOY}/${INITRD_DEPLOY_FILE}"=20 >> > > > # only one dtb file supported, pick the first=20 >> > > > -DTB_IMG =3D "${PP_DEPLOY}/${@(d.getVar('DTB_FILES').split() or=20 >> > > > [''])[0]}"=20 >> > > > +DTB_IMG =3D=20 >> > > > "${PP_DEPLOY}/${IMAGE_FULLNAME}/${KERNEL_NAME}/${@(d.getVar('DTB_F= I=20 >> > > > LES').split() or [''])[0]}"=20 >> > > >=20 >> > > > do_copy_boot_files[cleandirs] +=3D "${DEPLOYDIR}"=20 >> > > > do_copy_boot_files[sstate-inputdirs] =3D "${DEPLOYDIR}"=20 >> > > > @@ -360,7 +360,8 @@ do_copy_boot_files() {=20 >> > > > die "${file} not found"=20 >> > > > fi=20 >> > > >=20 >> > > > - cp -f "$dtb" "${DEPLOYDIR}/"=20 >> > > > + mkdir -p "${DEPLOYDIR}/${IMAGE_FULLNAME}/${KERNEL_NAME}"= =20 >> > > > + cp -f "$dtb"=20 >> > > > "${DEPLOYDIR}/${IMAGE_FULLNAME}/${KERNEL_NAME}/"=20 >> > > > done=20 >> > > > }=20 >> > > > addtask copy_boot_files before do_rootfs_postprocess after=20 >> > > > do_rootfs_install=20 >> > > > diff --git a/meta/classes/imagetypes_wic.bbclass=20 >> > > > b/meta/classes/imagetypes_wic.bbclass=20 >> > > > index 7a050e73..6b7b3727 100644=20 >> > > > --- a/meta/classes/imagetypes_wic.bbclass=20 >> > > > +++ b/meta/classes/imagetypes_wic.bbclass=20 >> > > > @@ -102,9 +102,9 @@ WIC_DEPLOY_PARTITIONS ?=3D "0"=20 >> > > >=20 >> > > > # taken from OE, do not touch directly=20 >> > > > WICVARS +=3D "\=20 >> > > > - BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD=20 >> > > > IMAGE_BASENAME IMAGE_BOOT_FILES IMAGE_EFI_BOOT_FILES \=20 >> > > > - IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD= =20 >> > > > INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \=20 >> > > > - ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR= =20 >> > > > TARGET_SYS TRANSLATED_TARGET_ARCH"=20 >> > > > + BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD=20 >> > > > IMAGE_BASENAME IMAGE_FULLNAME IMAGE_BOOT_FILES \=20 >> > > > + IMAGE_EFI_BOOT_FILES IMAGE_LINK_NAME IMAGE_ROOTFS=20 >> > > > INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR KERNEL_NAME \=20 >> > > > + RECIPE_SYSROOT_NATIVE ROOTFS_SIZE STAGING_DATADIR=20 >> > > > STAGING_DIR STAGING_LIBDIR TARGET_SYS TRANSLATED_TARGET_ARCH"=20 >> > > >=20 >> > > > # Isar specific vars used in our plugins=20 >> > > > WICVARS +=3D "DISTRO DISTRO_ARCH KERNEL_FILE"=20 >> > > > diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-=20 >> > > > isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py= =20 >> > > > index 78ae4fb2..5b23671f 100644=20 >> > > > --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py=20 >> > > > +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py=20 >> > > > @@ -57,7 +57,9 @@ class BootimgEFIPlugin(SourcePlugin):=20 >> > > > if dtb:=20 >> > > > if ';' in dtb:=20 >> > > > raise WicError("Only one DTB supported, exiting")= =20 >> > > > - cp_cmd =3D "cp %s/%s %s" % (bootimg_dir, dtb, hdddir)= =20 >> > > > + image_fullname =3D get_bitbake_var("IMAGE_FULLNAME")= =20 >> > > > + kernel_name =3D get_bitbake_var("KERNEL_NAME")=20 >> > > > + cp_cmd =3D "cp %s/%s/%s/%s %s" % (bootimg_dir,=20 >> > > > image_fullname, kernel_name, dtb, hdddir)=20 >> > > > exec_cmd(cp_cmd, True)=20 >> > > >=20 >> > > > @classmethod=20 >> > > > diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py=20 >> > > > b/scripts/lib/wic/plugins/source/bootimg-efi.py=20 >> > > > index 13a9cddf..cf83a6f3 100644=20 >> > > > --- a/scripts/lib/wic/plugins/source/bootimg-efi.py=20 >> > > > +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py=20 >> > > > @@ -368,7 +368,9 @@ class BootimgEFIPlugin(SourcePlugin):=20 >> > > > if dtb:=20 >> > > > if ';' in dtb:=20 >> > > > raise WicError("Only one DTB supported,= =20 >> > > > exiting")=20 >> > > > - dtb_path =3D "%s/%s" % (deploy_dir, dtb)=20 >> > > > + image_fullname =3D=20 >> > > > get_bitbake_var("IMAGE_FULLNAME")=20 >> > > > + kernel_name =3D get_bitbake_var("KERNEL_NAME"= )=20 >> > > > + dtb_path =3D "%s/%s/%s/%s" % (deploy_dir,=20 >> > > > image_fullname, kernel_name, dtb)=20 >> > > > dtb_params =3D '--add-section .dtb=3D%s --cha= nge-=20 >> > > > section-vma .dtb=3D0x%x' % \=20 >> > > > (dtb_path, dtb_off)=20 >> > > > linux_off =3D dtb_off +=20 >> > > > os.stat(dtb_path).st_size=20 >> > >=20 >> > > This would affect downstream as well. You are missing a=20 >> > > RECIPE-API-CHANGELOG.md entry.=20 >> > >=20 >> > > Jan=20 >> >=20 >> > --=20 >> > Best regards,=20 >> > Uladzimir.=20 >> >=20 >> >=20 >> > --=20 >> > You received this message because you are subscribed to the Google=20 >> > Groups "isar-users" group.=20 >> > To unsubscribe from this group and stop receiving emails from it, send= =20 >> > an email to isar-users+...@googlegroups.com > > users+un...@googlegroups.com>.=20 >> > To view this discussion visit https://groups.google.com/d/msgid/isar-= =20 >> > users/95421431-bec5-4297-8aba-2bd9207f1785n%40googlegroups.com=20 >> > > groups.google.com/d/msgid/isar-users/95421431-=20 >> > bec5-4297-8aba-2bd9207f1785n%40googlegroups.com?=20 >> > utm_medium=3Demail&utm_source=3Dfooter>.=20 >> >> >> --=20 >> Siemens AG, Foundational Technologies=20 >> Linux Expert Center=20 >> > --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= d4478ef8-72a9-47df-8ca6-34b4fe18c939n%40googlegroups.com. ------=_Part_44531_1483719196.1759905223742 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I=E2=80=99ve sent the updated patch addressing the comments. I also added t= he changelog entry to RECIPES_API_CHANGELOG.md, but it=E2=80=99s not showin= g up here yet. I=E2=80=99ll update this once it appears.=C2=A0=C2=A0
<= br />
On W= ednesday, October 8, 2025 at 11:50:28=E2=80=AFAM UTC+5:30 Badrikesh Prusty = wrote:
Hello = all,

Apologies for the delayed response. I somehow misse= d the message.

> This sounds familia= r, and I think we discussed that multiple times
> already. Did you st= udy previous threads/patches, e.g.
>
> Yes, there were few patches that tried to solve the issue.
&g= t;
> Using subdirectory (variant similar to TS's)
> -=C2=A0= https://pat= chwork.isar-build.org/project/isar/list/?series=3D1149
> Make kernel deploy the files= , instead of image recipes
> -=C2=A0https://patchwork.isar-build.org/project/i= sar/list/?series=3D1241
>

I reviewed the previously shared patch, but not in full =E2=80=94 t= hanks for sharing it here.

The patch I sent is ver= y similar to @nicusor patch:=C2=A0https://p= atchwork.isar-build.org/project/isar/list/?series=3D1149

=
I just reviewed the other patches and believe that many may enco= unter the same issue. For instance, when attempting to build multiple kerne= ls for a single image=E2=80=94such as `linux-image-amd64` and `linux-image-= amd64-rt` kernels=E2=80=94this overwrite problem is likely to occur.
<= div>
This patch also resolves the issue with image builds tha= t include multiple kernels by storing the DTB files in the directory DEPLOY= DIR/IMAGE_FULLNAME/KERNEL_NAME. This will also fix issues when building wit= h different DISTROs as IMAGE_FULLNAME includes target DISTRO. Additionally,= it fixes problems that arise when building with different DISTROs, since I= MAGE_FULLNAME includes the target DISTRO.

> Thi= s would affect downstream as well. You are missing a
> RECIPE-API-C= HANGELOG.md entry.
>

Yes, it will affect do= wnstream layers. E.g. I checked with the isar-cip-core repo, changes will b= e required in `efibootguard-boot` wic plugin. I will work on fixing it, onc= e this is approved.

Thanks and Regards,
= Badrikesh
On Thursday, September 4, 2025 at 7:42:08=E2=80=AFPM UTC+5:30 Jan Kis= zka wrote:
On 04.09.25= 11:36, Arulpandiyan Vadivel wrote:
> @Uladzimir, @Jan Kiszka
>=20
> As 0.11 release was out=C2=A0 already, Can we consider merging thi= s change?
>=20

Not in its current form as we explained. Plus you didn't answer the
question I gave you.

Jan

>=20
> Regards,
> Arulpandiyan V
>=20
> On Friday, 4 April 2025 at 20:01:24 UTC+5:30 Uladzimir Bely wrote:
>=20
> On Fri, 2025-04-04 at 11:55 +0200, Jan Kiszka wrote:
> > On 03.04.25 19:07, 'Badrikesh Prusty' via isar-us= ers wrote:
> > > From: badrikesh prusty <badri= kes...@siemens.com>
> > >
> > > Copy DTB_FILES to DEPLOYDIR/IMAGE_FULLNAME/KERNEL_NA= ME instead of
> > > DEPLOYDIR/.
> > >
> > > An issue is observed when we attempt to build a seco= nd image for a
> > > machine
> > > utilizing DTB_FILES. During the do_copy_boot_files t= ask of image
> > > creation, the
> > > DTB_FILES are copied to the shared location DEPLOYDI= R/<dtb files>.
> > > When the
> > > build of a second image is triggered, it detects tha= t the DTB_FILES
> > > are already
> > > present and avoids overwriting them.
> >
> > This sounds familiar, and I think we discussed that multi= ple times
> > already. Did you study previous threads/patches, e.g.
> > https://patchwork.isar-bu= ild.org/project/isar/list/?series=3D1241
> <https://patchwork.isar-bui= ld.org/project/isar/list/?series=3D1241>?
> >
>=20
> Yes, there were few patches that tried to solve the issue.
>=20
> Using subdirectory (variant similar to TS's)
> - https://patchwork.isar-bui= ld.org/project/isar/list/?series=3D1149
> <https://patchwork.isar-bui= ld.org/project/isar/list/?series=3D1149>
> Allows to overlap files
> - https://patchwork.isar-bui= ld.org/project/isar/list/?series=3D1235
> <https://patchwork.isar-bui= ld.org/project/isar/list/?series=3D1235>
> Make kernel deploy the files, instead of image recipes
> - https://patchwork.isar-bui= ld.org/project/isar/list/?series=3D1241
> <https://patchwork.isar-bui= ld.org/project/isar/list/?series=3D1241>
>=20
> Finally, there is now perfect solution that would solve all po= ssible
> issues and wouldn't break compatibility with downstreams..= .
>=20
> Anyway, we are planning to prepare Isar release 0.11 without t= he issue
> fix (no downstream breaking changes) and apply some (or mixed)= solution
> after that, even at the cost of downstreams compatibility.
>=20
>=20
> > >
> > > Reproducer:
> > > bitbake mc:phyboard-mira-bookworm:isar-image-base
> > > bitbake mc:phyboard-mira-bookworm:isar-image-debug
> > >
> > > Copy the DTB_FILES to the directory:
> > > DEPLOYDIR/IMAGE_FULLNAME/KERNEL_NAME/.
> > > * This will allow building multiple images.
> > > * As each kernel recipe ships its own DTB_FILES, if = a user tries to
> > > rebuild
> > > the same image with a new kernel, the DTB_FILES asso= ciated with the
> > > older
> > > kernel will not be overwritten.
> > >
> > > Update the DTB_IMG variable to check for DTB_FILES i= n their new
> > > location.
> > > Update the WIC plugin scripts to use the DTB_FILES f= rom their
> > > updated location
> > > within the DEPLOYDIR.
> > > Add IMAGE_FULLNAME and KERNEL_NAME to WICVARS to all= ow the scripts
> > > to retrieve
> > > these variable values during WIC image generation.
> > >
> > > Signed-off-by: badrikesh prusty <badrikes...@siemens.com>
> > > ---
> > > =C2=A0meta/classes/image.bbclass=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 | 5 +++--
> > > =C2=A0meta/classes/imagetypes_wic.bbclass=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 6 +++---
> > > =C2=A0meta/scripts/lib/wic/plugins/source/bootimg-ef= i-isar.py | 4 +++-
> > > =C2=A0scripts/lib/wic/plugins/source/bootimg-efi.py= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 4 +++-
> > > =C2=A04 files changed, 12 insertions(+), 7 deletions= (-)
> > >
> > > diff --git a/meta/classes/image.bbclass
> > > b/meta/classes/image.bbclass
> > > index ff3cd737..218e7c35 100644
> > > --- a/meta/classes/image.bbclass
> > > +++ b/meta/classes/image.bbclass
> > > @@ -326,7 +326,7 @@ EOF
> > > =C2=A0KERNEL_IMG =3D "${PP_DEPLOY}/${KERNEL_IMA= GE}"
> > > =C2=A0INITRD_IMG =3D "${PP_DEPLOY}/${INITRD_DEP= LOY_FILE}"
> > > =C2=A0# only one dtb file supported, pick the first
> > > -DTB_IMG =3D "${PP_DEPLOY}/${@(d.getVar('DT= B_FILES').split() or
> > > [''])[0]}"
> > > +DTB_IMG =3D
> > > "${PP_DEPLOY}/${IMAGE_FULLNAME}/${KERNEL_NAME}/= ${@(d.getVar('DTB_FI
> > > LES').split() or [''])[0]}"
> > >
> > > =C2=A0do_copy_boot_files[cleandirs] +=3D "${DEP= LOYDIR}"
> > > =C2=A0do_copy_boot_files[sstate-inputdirs] =3D "= ;${DEPLOYDIR}"
> > > @@ -360,7 +360,8 @@ do_copy_boot_files() {
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 die "${file} not found"
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 fi
> > >
> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cp -f &q= uot;$dtb" "${DEPLOYDIR}/"
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mkdir -p= "${DEPLOYDIR}/${IMAGE_FULLNAME}/${KERNEL_NAME}"
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 cp -f &q= uot;$dtb"
> > > "${DEPLOYDIR}/${IMAGE_FULLNAME}/${KERNEL_NAME}/= "
> > > =C2=A0=C2=A0=C2=A0=C2=A0 done
> > > =C2=A0}
> > > =C2=A0addtask copy_boot_files before do_rootfs_postp= rocess after
> > > do_rootfs_install
> > > diff --git a/meta/classes/imagetypes_wic.bbclass
> > > b/meta/classes/imagetypes_wic.bbclass
> > > index 7a050e73..6b7b3727 100644
> > > --- a/meta/classes/imagetypes_wic.bbclass
> > > +++ b/meta/classes/imagetypes_wic.bbclass
> > > @@ -102,9 +102,9 @@ WIC_DEPLOY_PARTITIONS ?=3D "= ;0"
> > >
> > > =C2=A0# taken from OE, do not touch directly
> > > =C2=A0WICVARS +=3D "\
> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD
> > > IMAGE_BASENAME IMAGE_BOOT_FILES IMAGE_EFI_BOOT_FILES= \
> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD
> > > INITRD_LIVE ISODIR RECIPE_SYSROOT_NATIVE \
> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> > > TARGET_SYS TRANSLATED_TARGET_ARCH"
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD
> > > IMAGE_BASENAME IMAGE_FULLNAME IMAGE_BOOT_FILES \
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 IMAGE_EFI_BOOT_FILES IMAGE_LINK_NAME IMAGE_ROOTFS
> > > INITRAMFS_FSTYPES INITRD INITRD_LIVE ISODIR KERNEL_N= AME \
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 RECIPE_SYSROOT_NATIVE ROOTFS_SIZE STAGING_DATADIR
> > > STAGING_DIR STAGING_LIBDIR TARGET_SYS TRANSLATED_TAR= GET_ARCH"
> > >
> > > =C2=A0# Isar specific vars used in our plugins
> > > =C2=A0WICVARS +=3D "DISTRO DISTRO_ARCH KERNEL_F= ILE"
> > > diff --git a/meta/scripts/lib/wic/plugins/source/boo= timg-efi-
> > > isar.py b/meta/scripts/lib/wic/plugins/source/bootim= g-efi-isar.py
> > > index 78ae4fb2..5b23671f 100644
> > > --- a/meta/scripts/lib/wic/plugins/source/bootimg-ef= i-isar.py
> > > +++ b/meta/scripts/lib/wic/plugins/source/bootimg-ef= i-isar.py
> > > @@ -57,7 +57,9 @@ class BootimgEFIPlugin(SourcePlugi= n):
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if = dtb:
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 if ';' in dtb:
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 raise WicError("Only one= DTB supported, exiting")
> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 cp_cmd =3D "cp %s/%s %s" % (bootimg_dir, dtb, hdd= dir)
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 image_fullname =3D get_bitbake_var("IMAGE_FULLNAME&quo= t;)
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 kernel_name =3D get_bitbake_var("KERNEL_NAME")
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 cp_cmd =3D "cp %s/%s/%s/%s %s" % (bootimg_dir,
> > > image_fullname, kernel_name, dtb, hdddir)
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 exec_cmd(cp_cmd, True)
> > >
> > > =C2=A0=C2=A0=C2=A0=C2=A0 @classmethod
> > > diff --git a/scripts/lib/wic/plugins/source/bootimg-= efi.py
> > > b/scripts/lib/wic/plugins/source/bootimg-efi.py
> > > index 13a9cddf..cf83a6f3 100644
> > > --- a/scripts/lib/wic/plugins/source/bootimg-efi.py
> > > +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
> > > @@ -368,7 +368,9 @@ class BootimgEFIPlugin(SourcePlu= gin):
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if dtb:
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if &#= 39;;' in dtb:
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 raise WicError("Only one DTB supported,
> > > exiting")
> > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dtb_path = =3D "%s/%s" % (deploy_dir, dtb)
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 image_fulln= ame =3D
> > > get_bitbake_var("IMAGE_FULLNAME")
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 kernel_name= =3D get_bitbake_var("KERNEL_NAME")
> > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dtb_path = =3D "%s/%s/%s/%s" % (deploy_dir,
> > > image_fullname, kernel_name, dtb)
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 dtb_p= arams =3D '--add-section .dtb=3D%s --change-
> > > section-vma .dtb=3D0x%x' % \
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (dtb_path, dtb_off)
> > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 linux= _off =3D dtb_off +
> > > os.stat(dtb_path).st_size
> >
> > This would affect downstream as well. You are missing a
> > RECIPE-API-CHANGELOG.md entry.
> >
> > Jan
>=20
> --=20
> Best regards,
> Uladzimir.
>=20
>=20
> --=20
> You received this message because you are subscribed to the Google
> Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, = send
> an email to isar-users+...@googlegroups.com <mailto:isar-
> users+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/isar-
> users/95421431-bec5-4297-8aba-2bd9207f1785n%40googlegroups.com <https://
> groups.google.com/d/msgid/isar-users/95421431-
> bec5-4297-8aba-2bd9207f1785n%40googlegr= oups.com?
> utm_medium=3Demail&utm_source=3Dfooter>.


--=20
Siemens AG, Foundational Technologies
Linux Expert Center

--
You received this message because you are subscribed to the Google Groups &= quot;isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-use= rs+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-use= rs/d4478ef8-72a9-47df-8ca6-34b4fe18c939n%40googlegroups.com.
------=_Part_44531_1483719196.1759905223742-- ------=_Part_44530_2040868705.1759905223742--