From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Koch, Stefan (DI PA DCP R&D 3)" <stefan-koch@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Cc: "Storm, Christian (T CED SES-DE)" <christian.storm@siemens.com>,
"Adler, Michael (T CED SES-DE)" <michael.adler@siemens.com>,
"Sudler, Simon (DI PA DCP TI)" <simon.sudler@siemens.com>,
"Hombourger,
Cedric (DI SW CAS ES LI)" <cedric.hombourger@siemens.com>,
"Schmidt, Adriaan (T CED SES-DE)" <adriaan.schmidt@siemens.com>,
"MOESSBAUER, Felix (T CED INW-CN)" <felix.moessbauer@siemens.com>,
"ubely@ilbers.de" <ubely@ilbers.de>
Subject: Re: [PATCH v3 3/5] dpkg: Allow overriding build and host parameters for sbuild and schroot
Date: Wed, 16 Aug 2023 15:55:45 +0200 [thread overview]
Message-ID: <26c37ebf-5470-4c29-9e7a-89278375811f@siemens.com> (raw)
In-Reply-To: <20230816121423.3956608-4-stefan-koch@siemens.com>
On 16.08.23 14:14, Koch, Stefan (DI PA DCP R&D 3) wrote:
> This functionality is initially used for custom linux builds using the
> "-compat" and "-native" multiarch bitbake targets to run additional
> target or host specific builds for kbuild scripts and tools.
But why does the kernel need these extra params? Why wouldn't it be
enough to add arch-specific profile settings for that package so that
linux-headers-mykernel-native will compile the kernel only for the
native headers and tools?
Same question for patch 2, in fact. I'm still missing the big picture.
Jan
>
> Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
> ---
> meta/classes/dpkg-base.bbclass | 19 ++++++++++++++++++-
> meta/classes/dpkg.bbclass | 2 +-
> 2 files changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 7b02f378..eaeb0e8b 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -208,7 +208,7 @@ dpkg_runbuild() {
>
> def isar_deb_build_profiles(d):
> deb_build_profiles = d.getVar('DEB_BUILD_PROFILES')
> - if d.getVar('ISAR_CROSS_COMPILE') == "1":
> + if d.getVar('ISAR_CROSS_COMPILE') == "1" and d.getVar('ISAR_SKIP_CROSS_PROFILE') != "1":
> deb_build_profiles += ' cross'
> return deb_build_profiles.strip()
>
> @@ -223,6 +223,23 @@ def isar_export_build_settings(d):
> os.environ['DEB_BUILD_PROFILES'] = isar_deb_build_profiles(d)
>
> python do_dpkg_build() {
> + schroot_dir_override = d.getVar('SCHROOT_DIR_OVERRIDE', True)
> + sbuild_build_override = d.getVar('SBUILD_BUILD_OVERRIDE', True)
> + sbuild_host_override = d.getVar('SBUILD_HOST_OVERRIDE', True)
> +
> + if schroot_dir_override:
> + d.setVar('SCHROOT_DIR', schroot_dir_override)
> +
> + if sbuild_build_override:
> + d.setVar('SBUILD_BUILD', sbuild_build_override)
> + else:
> + d.setVar('SBUILD_BUILD', d.getVar('BUILD_HOST_ARCH', True))
> +
> + if sbuild_host_override:
> + d.setVar('SBUILD_HOST', sbuild_host_override)
> + else:
> + d.setVar('SBUILD_HOST', d.getVar('PACKAGE_ARCH', True))
> +
> bb.build.exec_func('schroot_create_configs', d)
> try:
> bb.build.exec_func("dpkg_runbuild", d)
> diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass
> index c596adbf..7d659741 100644
> --- a/meta/classes/dpkg.bbclass
> +++ b/meta/classes/dpkg.bbclass
> @@ -102,7 +102,7 @@ dpkg_runbuild() {
> DSC_FILE=$(find ${WORKDIR} -name "${DEB_SOURCE_NAME}*.dsc" -print)
>
> sbuild -A -n -c ${SBUILD_CHROOT} --extra-repository="${ISAR_APT_REPO}" \
> - --host=${PACKAGE_ARCH} --build=${BUILD_HOST_ARCH} ${profiles} \
> + --host=${SBUILD_HOST} --build=${SBUILD_BUILD} ${profiles} \
> --no-run-lintian --no-run-piuparts --no-run-autopkgtest --resolve-alternatives \
> --bd-uninstallable-explainer=apt \
> --no-apt-update \
--
Siemens AG, Technology
Linux Expert Center
next prev parent reply other threads:[~2023-08-16 13:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-16 12:14 [PATCH v3 0/5] linux-custom: Split up binaries from kernel headers to kbuild packages Koch, Stefan
2023-08-16 12:14 ` [PATCH v3 1/5] linux-custom: Split up binaries from kernel headers to kbuild package Koch, Stefan
2023-08-16 12:14 ` [PATCH v3 2/5] sbuild: Support overriding configured schroot dir Koch, Stefan
2023-08-16 12:14 ` [PATCH v3 3/5] dpkg: Allow overriding build and host parameters for sbuild and schroot Koch, Stefan
2023-08-16 13:55 ` Jan Kiszka [this message]
2023-08-16 14:27 ` Koch, Stefan
2023-08-16 14:32 ` Jan Kiszka
2023-08-17 12:25 ` Koch, Stefan
2023-08-16 12:14 ` [PATCH v3 4/5] linux-custom: Provide host and target specific kernel kbuild packages Koch, Stefan
2023-08-16 12:14 ` [PATCH v3 5/5] docs: Update custom_kernel docs for split up of kernel scripts and tools Koch, Stefan
2023-08-16 13:46 ` Jan Kiszka
2023-08-16 14:25 ` Koch, Stefan
2023-08-16 14:27 ` Jan Kiszka
2023-08-18 11:03 ` Koch, Stefan
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=26c37ebf-5470-4c29-9e7a-89278375811f@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=adriaan.schmidt@siemens.com \
--cc=cedric.hombourger@siemens.com \
--cc=christian.storm@siemens.com \
--cc=felix.moessbauer@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=michael.adler@siemens.com \
--cc=simon.sudler@siemens.com \
--cc=stefan-koch@siemens.com \
--cc=ubely@ilbers.de \
/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