From: Jan Kiszka <jan.kiszka@siemens.com>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [RFC 05/15] u-boot: Do not use shell environment
Date: Mon, 26 Jul 2021 16:50:49 +0200 [thread overview]
Message-ID: <b3d3c5d1-723c-b7ab-4205-111c093b0ab9@siemens.com> (raw)
In-Reply-To: <20210726134636.30800-6-amikan@ilbers.de>
On 26.07.21 15:46, Anton Mikanovich wrote:
> To make package build process independent of the shell environment we
> should remove U_BOOT_CONFIG and U_BOOT_BIN passing through export call.
> So we migrate to template-based debian/rules file.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> .../u-boot/files/debian/{rules => rules.tmpl} | 2 +-
> meta/recipes-bsp/u-boot/u-boot-custom.inc | 10 ++++------
> 2 files changed, 5 insertions(+), 7 deletions(-)
> rename meta/recipes-bsp/u-boot/files/debian/{rules => rules.tmpl} (93%)
>
> diff --git a/meta/recipes-bsp/u-boot/files/debian/rules b/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
> similarity index 93%
> rename from meta/recipes-bsp/u-boot/files/debian/rules
> rename to meta/recipes-bsp/u-boot/files/debian/rules.tmpl
> index 85bda91..0507fc5 100755
> --- a/meta/recipes-bsp/u-boot/files/debian/rules
> +++ b/meta/recipes-bsp/u-boot/files/debian/rules.tmpl
> @@ -13,7 +13,7 @@ SET_CROSS_BUILD_TOOLS=CROSS_BUILD_TOOLS=y
> endif
>
> override_dh_auto_build:
> - $(MAKE) $(PARALLEL_MAKE) $(U_BOOT_CONFIG)
> + $(MAKE) $(PARALLEL_MAKE) ${U_BOOT_CONFIG}
> $(MAKE) $(PARALLEL_MAKE) ${U_BOOT_BIN}
> ./scripts/get_default_envs.sh >u-boot-initial-env
> $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools
> diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> index 9984d8c..819206a 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc
> @@ -26,8 +26,8 @@ python() {
>
> DEBIAN_BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git"
>
> -TEMPLATE_FILES = "debian/control.tmpl"
> -TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS"
> +TEMPLATE_FILES = "debian/control.tmpl debian/rules.tmpl"
> +TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS U_BOOT_CONFIG U_BOOT_BIN"
>
> U_BOOT_TOOLS_PACKAGE ?= "0"
> U_BOOT_CONFIG_PACKAGE ?= "0"
> @@ -70,9 +70,7 @@ u-boot-initial-env /etc
> fw_env.config /etc
> EOF
> fi
> -}
>
> -dpkg_runbuild_prepend() {
> - export U_BOOT_CONFIG="${U_BOOT_CONFIG}"
> - export U_BOOT_BIN="${U_BOOT_BIN}"
> + # restore execute permissions
> + chmod a+x ${S}/debian/rules
> }
>
This will likely break users providing their own rules while expecting
the interface to stay the same. Better use the builder-export magic
consistently, not the tmpl pattern.
Comment likely applies to other recipes inc files as well.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2021-07-26 14:50 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 13:46 [RFC 00/15] Sbuild/Schroot migration Anton Mikanovich
2021-07-26 13:46 ` [RFC 01/15] dpkg: Install raw package files to source root Anton Mikanovich
2021-07-26 13:46 ` [RFC 02/15] dpkg-gbp: Use separate export-orig command Anton Mikanovich
2021-07-26 13:46 ` [RFC 03/15] isar-bootstrap: Export bootstrap to schroot config Anton Mikanovich
2021-07-26 13:46 ` [RFC 04/15] linux-module: Do not use shell environment Anton Mikanovich
2021-07-26 14:40 ` Jan Kiszka
2021-07-26 13:46 ` [RFC 05/15] u-boot: " Anton Mikanovich
2021-07-26 14:50 ` Jan Kiszka [this message]
2021-07-26 13:46 ` [RFC 06/15] trusted-firmware: " Anton Mikanovich
2021-07-26 13:46 ` [RFC 07/15] optee-os: " Anton Mikanovich
2021-07-26 13:46 ` [RFC 08/15] kselftest: " Anton Mikanovich
2021-07-26 13:46 ` [RFC 09/15] dpkg: Build packages with sbuild Anton Mikanovich
2021-07-26 13:46 ` [RFC 10/15] sbuild: Introduce environment variables export API Anton Mikanovich
2021-07-26 14:47 ` Jan Kiszka
2021-07-26 13:46 ` [RFC 11/15] dpkg: Remove builddeps install task Anton Mikanovich
2021-07-26 13:46 ` [RFC 12/15] dpkg-gbp: Migrate to schroot Anton Mikanovich
2021-07-26 13:46 ` [RFC 13/15] img: Use schroot for image prepare Anton Mikanovich
2021-07-26 13:46 ` [RFC 14/15] linux-mainline: Move cfg fragment test to debian/rules Anton Mikanovich
2021-07-26 14:48 ` Jan Kiszka
2021-07-26 13:46 ` [RFC 15/15] linux-custom: Prepare kernel config inside sbuild Anton Mikanovich
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=b3d3c5d1-723c-b7ab-4205-111c093b0ab9@siemens.com \
--to=jan.kiszka@siemens.com \
--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