public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "nicusor.huhulea@siemens.com" <nicusor.huhulea@siemens.com>
To: "quirin.gylstorff@siemens.com" <quirin.gylstorff@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name
Date: Thu, 28 Mar 2024 19:05:43 +0000	[thread overview]
Message-ID: <DB3PR10MB6908CFD77F9795065A6D5228E63B2@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <c0e1e267-e01e-4837-b8a0-9743d8964b11@siemens.com>

Yes, it will break it without patching it. I'm not sure where this bootimg-efi.py is being used here, as for testing usually I'm using https://github.com/siemens/meta-iot2050

I guess that in this case the equivalent for bootimg-efi.py is https://gitlab.com/cip-project/cip-core/isar-cip-core/-/blob/master/scripts/lib/wic/plugins/source/efibootguard-boot.py which is already patched.

Nicu

________________________________________
From: Gylstorff, Quirin (T CED OES-DE) <quirin.gylstorff@siemens.com>
Sent: Thursday, March 28, 2024 7:53 PM
To: Huhulea, Nicusor Liviu (DI CTO FDS CES LX SVCS); isar-users@googlegroups.com
Subject: Re: [PATCH] image.bbclass: copy dtbs into a deploydir/subdirectory based on the image name



On 3/28/24 8:54 AM, 'nicusor.huhulea@siemens.com' via isar-users wrote:
> This fixes the build failures detailed in the https://groups.google.com/g/isar-users/c/Va0Ue-ISYeA and
> https://groups.google.com/g/isar-users/c/PSGU_AcdPZ8
> This adds the MACHINE variable to WICVARS, hence the need to reflect this change in
> cip-core/scripts/lib/wic/plugins/source/efibootguard-boot.py
>
>
>      Signed-off-by: Nicusor Huhulea <nicusor.huhulea@siemens.com>
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 73f1d52c..9b98719b 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -377,16 +377,19 @@ do_copy_boot_files() {
>           fi
>       fi
>
> -    for file in ${DTB_FILES}; do
> -        dtb="$(find '${IMAGE_ROOTFS}/usr/lib' -type f \
> -                    -iwholename '*linux-image-*/'${file} | head -1)"
> -
> -        if [ -z "$dtb" -o ! -e "$dtb" ]; then
> -            die "${file} not found"
> -        fi
> +    if [ -n "${DTB_FILES}" ]; then
> +        mkdir -p "${DEPLOYDIR}/${IMAGE_FULLNAME}.dtbs"
> +        for file in ${DTB_FILES}; do
> +            dtb="$(find '${IMAGE_ROOTFS}/usr/lib' -type f \
> +                        -iwholename '*linux-image-*/'${file} | head -1)"
> +
> +            if [ -z "$dtb" -o ! -e "$dtb" ]; then
> +                die "${file} not found"
> +            fi
>
> -        cp -f "$dtb" "${DEPLOYDIR}/"
> -    done
> +            cp -f "$dtb" "${DEPLOYDIR}/${IMAGE_FULLNAME}.dtbs"

This will break scripts/lib/wic/plugins/source/bootimg-efi.py from
bitbake[1].

[1]:
https://github.com/openembedded/openembedded-core/blob/master/scripts/lib/wic/plugins/source/bootimg-efi.py

Quirin

> +        done
> +    fi
>   }
>   addtask copy_boot_files before do_rootfs_postprocess after do_rootfs_install
>
> diff --git a/meta/classes/imagetypes_wic.bbclass b/meta/classes/imagetypes_wic.bbclass
> index bce881ed..f0f1c438 100644
> --- a/meta/classes/imagetypes_wic.bbclass
> +++ b/meta/classes/imagetypes_wic.bbclass
> @@ -107,7 +107,7 @@ WICVARS += "\
>              ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS TRANSLATED_TARGET_ARCH"
>
>   # Isar specific vars used in our plugins
> -WICVARS += "DISTRO DISTRO_ARCH"
> +WICVARS += "DISTRO DISTRO_ARCH MACHINE"
>
>   python do_rootfs_wicenv () {
>       wicvars = d.getVar('WICVARS')
>

  reply	other threads:[~2024-03-28 19:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28  7:54 nicusor.huhulea
2024-03-28 16:28 ` Gylstorff Quirin
2024-03-28 16:31   ` Gylstorff Quirin
2024-03-28 17:53 ` Gylstorff Quirin
2024-03-28 19:05   ` nicusor.huhulea [this message]
2024-04-08  8:12     ` Gylstorff Quirin
2024-04-12 14:11       ` nicusor.huhulea
2024-04-15 13:11         ` nicusor.huhulea
2024-04-15 13:19           ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB3PR10MB6908CFD77F9795065A6D5228E63B2@DB3PR10MB6908.EURPRD10.PROD.OUTLOOK.COM \
    --to=nicusor.huhulea@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=quirin.gylstorff@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox