From: Uladzimir Bely <ubely@ilbers.de>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH v3] meta: Enable cross-compilation by default
Date: Tue, 10 Dec 2024 10:47:28 +0300 [thread overview]
Message-ID: <ea939603f2262957d53fc991d75c885b7c5c25b1.camel@ilbers.de> (raw)
In-Reply-To: <20241202153001.2212785-1-amikan@ilbers.de>
On Mon, 2024-12-02 at 17:30 +0200, Anton Mikanovich wrote:
> Make cross-compilation to be default mode if no ISAR_CROSS_COMPILE
> value was set or local.conf.sample from meta-isar was used.
> This will speedup the build with default settings.
>
> Also fix CI and kas logic to address those changes.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> Changes since v2:
> - Simplify kas logic.
> - Update source headers.
>
> Changes since v1:
> - Fix testsuite cross compile setting logic.
> - Fix kas cross compile setting logic.
> - Update source headers.
>
> RECIPE-API-CHANGELOG.md | 9 +++++++++
> kas/opt/Kconfig | 11 +++++++++--
> kas/opt/crosscompile.yaml | 6 ++++--
> meta-isar/conf/local.conf.sample | 9 ++++++---
> meta/classes/crossvars.bbclass | 7 +++++--
> testsuite/cibuilder.py | 10 +++++++++-
> 6 files changed, 42 insertions(+), 10 deletions(-)
>
> diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
> index deb1c4e1..f310553a 100644
> --- a/RECIPE-API-CHANGELOG.md
> +++ b/RECIPE-API-CHANGELOG.md
> @@ -693,3 +693,12 @@ Previous implementation still can be selected by
> setting in local.conf:
>
> PREFERRED_PROVIDER_bootstrap-host ?= "isar-bootstrap-host"
> PREFERRED_PROVIDER_bootstrap-target ?= "isar-bootstrap-target"
> +
> +### Cross-compilation is enabled by default
> +
> +Default ISAR_CROSS_COMPILE value was changed to "1".
> +There is no more need to set global ISAR_CROSS_COMPILE = "1" in
> local.conf to
> +enable cross-compilation. Otherwize ISAR_CROSS_COMPILE = "0" now
> should be set
> +in local.conf to disable cross-compilation for all the recipes.
> +Sample local.conf from meta-isar used by isar-init-build-env is also
> changed
> +to enable cross-compilation by default.
> diff --git a/kas/opt/Kconfig b/kas/opt/Kconfig
> index b1b1ff16..1ec4b112 100644
> --- a/kas/opt/Kconfig
> +++ b/kas/opt/Kconfig
> @@ -1,8 +1,11 @@
> # This software is a part of ISAR.
> -# Copyright (C) 2023 ilbers GmbH
> +# Copyright (C) 2023-2024 ilbers GmbH
> +# Copyright (C) 2024 Siemens AG
> #
> # Authors:
> # Uladzimir Bely <ubely@ilbers.de>
> +#
> +# SPDX-License-Identifier: MIT
>
> menu "Mirror selection"
> depends on DEBIAN_BUSTER || DEBIAN_BULLSEYE ||
> DEBIAN_BOOKWORM || DEBIAN_TRIXIE || DEBIAN_SID || UBUNTU_FOCAL ||
> UBUNTU_JAMMY
> @@ -149,10 +152,14 @@ config ISAR_CROSS_COMPILE
> bool "Enable cross compilation mode"
> default y
>
> +config KAS_ISAR_CROSS_COMPILE
> + string
> + default "1" if ISAR_CROSS_COMPILE
> + default "0" if !ISAR_CROSS_COMPILE
> +
> config KAS_INCLUDE_ISAR_CROSS_COMPILE
> string
> default "kas/opt/crosscompile.yaml"
> - depends on ISAR_CROSS_COMPILE
>
>
> config USE_CCACHE
> diff --git a/kas/opt/crosscompile.yaml b/kas/opt/crosscompile.yaml
> index 1b927ebd..4ec26d92 100644
> --- a/kas/opt/crosscompile.yaml
> +++ b/kas/opt/crosscompile.yaml
> @@ -1,9 +1,11 @@
> # This software is a part of ISAR.
> -# Copyright (C) 2023 ilbers GmbH
> +# Copyright (C) 2023-2024 ilbers GmbH
> +#
> +# SPDX-License-Identifier: MIT
>
> header:
> version: 14
>
> local_conf_header:
> crosscompile: |
> - ISAR_CROSS_COMPILE = "1"
> + ISAR_CROSS_COMPILE = "${KAS_ISAR_CROSS_COMPILE}"
> diff --git a/meta-isar/conf/local.conf.sample b/meta-
> isar/conf/local.conf.sample
> index 14cac313..b59f310b 100644
> --- a/meta-isar/conf/local.conf.sample
> +++ b/meta-isar/conf/local.conf.sample
> @@ -1,5 +1,8 @@
> # This software is a part of ISAR.
> -# Copyright (C) 2023 ilbers GmbH
> +# Copyright (C) 2016-2024 ilbers GmbH
> +# Copyright (C) 2017-2024 Siemens AG
> +#
> +# SPDX-License-Identifier: MIT
>
> #
> # This file is your local configuration file and is where all local
> user settings
> @@ -157,8 +160,8 @@ IMAGE_INSTALL:remove:qemuamd64-sb = "example-
> module-${KERNEL_NAME}"
> IMAGE_INSTALL:append:qemuamd64-sb = " example-module-signed-
> ${KERNEL_NAME}"
>
> #
> -# Enable cross-compilation support
> -ISAR_CROSS_COMPILE ?= "0"
> +# Uncomment this to disable cross-compilation support
> +#ISAR_CROSS_COMPILE ?= "0"
>
> #
> # Uncomment to enable 32-bit compat architecture support
> diff --git a/meta/classes/crossvars.bbclass
> b/meta/classes/crossvars.bbclass
> index 00326c9a..1a88d457 100644
> --- a/meta/classes/crossvars.bbclass
> +++ b/meta/classes/crossvars.bbclass
> @@ -1,7 +1,10 @@
> # This software is a part of ISAR.
> -# Copyright (C) 2022 ilbers GmbH
> +# Copyright (C) 2023-2024 ilbers GmbH
> +# Copyright (C) 2023-2024 Siemens AG
> +#
> +# SPDX-License-Identifier: MIT
>
> -ISAR_CROSS_COMPILE ??= "0"
> +ISAR_CROSS_COMPILE ??= "1"
>
> inherit compat
>
> diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
> index 9fa3d86c..b5b6a093 100755
> --- a/testsuite/cibuilder.py
> +++ b/testsuite/cibuilder.py
> @@ -1,4 +1,10 @@
> #!/usr/bin/env python3
> +#
> +# This software is a part of ISAR.
> +# Copyright (C) 2022-2024 ilbers GmbH
> +# Copyright (C) 2022-2024 Siemens AG
> +#
> +# SPDX-License-Identifier: MIT
>
> import logging
> import os
> @@ -168,7 +174,9 @@ class CIBuilder(Test):
> f.write('ISAR_ENABLE_COMPAT_ARCH:arm64 = "1"\n')
> f.write('IMAGE_INSTALL:remove:arm64 = "hello-
> isar"\n')
> f.write('IMAGE_INSTALL:append:arm64 = " hello-isar-
> compat"\n')
> - if cross:
> + if not cross:
> + f.write('ISAR_CROSS_COMPILE = "0"\n')
> + else:
> f.write('ISAR_CROSS_COMPILE = "1"\n')
> f.write(
> 'IMAGE_INSTALL:append:hikey = '
> --
> 2.34.1
>
Applied to next.
--
Best regards,
Uladzimir.
--
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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/ea939603f2262957d53fc991d75c885b7c5c25b1.camel%40ilbers.de.
prev parent reply other threads:[~2024-12-10 7:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 15:30 Anton Mikanovich
2024-12-10 7:47 ` 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=ea939603f2262957d53fc991d75c885b7c5c25b1.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=amikan@ilbers.de \
--cc=isar-users@googlegroups.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