From: Uladzimir Bely <ubely@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] sdk: Fix build with custom DISTRO when host==target
Date: Mon, 15 Apr 2024 12:21:55 +0300 [thread overview]
Message-ID: <1755b6044c1cc5313c620449898b1768d0194f54.camel@ilbers.de> (raw)
In-Reply-To: <363ef9b2-335b-44ed-b2e9-6df662bc0452@siemens.com>
On Thu, 2024-03-14 at 08:54 +0100, 'Jan Kiszka' via isar-users wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> HOST_DISTRO is not always the right choice for building an SDK. If
> the
> host arch is identical to the target and DISTRO was customized, there
> is
> no HOST_DISTRO to get the bootstrap from. Account for that.
>
> This issue could have been reproduced e.g by xenomai-images when
> selecting an x86 target and requesting to build the SDK for it.
>
> Reported-by: Fabian Scheler <fabian.scheler@siemens.com>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> meta/classes/sdk.bbclass | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass
> index 74c0acb9..71db6f3a 100644
> --- a/meta/classes/sdk.bbclass
> +++ b/meta/classes/sdk.bbclass
> @@ -44,9 +44,17 @@ SDK_PREINSTALL += " \
> devscripts \
> equivs"
>
> +def get_rootfs_distro(d):
> + host_arch = d.getVar('HOST_ARCH')
> + distro_arch = d.getVar('DISTRO_ARCH')
> + if host_arch == distro_arch:
> + return d.getVar('DISTRO')
> + else:
> + return d.getVar('HOST_DISTRO')
> +
> # rootfs/image overrides for the SDK
> ROOTFS_ARCH:class-sdk = "${HOST_ARCH}"
> -ROOTFS_DISTRO:class-sdk = "${HOST_DISTRO}"
> +ROOTFS_DISTRO:class-sdk = "${@get_rootfs_distro(d)}"
> ROOTFS_PACKAGES:class-sdk = "sdk-files ${SDK_TOOLCHAIN}
> ${SDK_PREINSTALL} ${@isar_multiarch_packages('SDK_INSTALL', d)}"
> ROOTFS_FEATURES:append:class-sdk = " clean-package-cache generate-
> manifest export-dpkg-status"
> ROOTFS_MANIFEST_DEPLOY_DIR:class-sdk = "${DEPLOY_DIR_SDKCHROOT}"
> --
> 2.35.3
>
Applied to next, thanks.
prev parent reply other threads:[~2024-04-15 9:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 7:54 Jan Kiszka
2024-03-15 8:42 ` Florian Bezdeka
2024-03-22 13:14 ` Uladzimir Bely
2024-04-02 14:58 ` Anton Mikanovich
2024-04-09 6:13 ` Jan Kiszka
2024-04-15 9:21 ` Uladzimir Bely [this message]
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=1755b6044c1cc5313c620449898b1768d0194f54.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@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