From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7030828924489695232 X-Received: by 2002:a5d:6488:: with SMTP id o8mr6918212wri.348.1637052180590; Tue, 16 Nov 2021 00:43:00 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:6a05:: with SMTP id m5ls607953wru.3.gmail; Tue, 16 Nov 2021 00:42:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwj2xbW6CZWl67EcQ+NEeF5fDRch7hFW2xQO07M6rTPdHQg7d/zu16e9Wl/lT8W/5UG5TlL X-Received: by 2002:a5d:58fb:: with SMTP id f27mr7429003wrd.10.1637052179556; Tue, 16 Nov 2021 00:42:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637052179; cv=none; d=google.com; s=arc-20160816; b=oC7KgFre64zeSp0JF7oXS1jc32Uwm1FSnxGVdC9+fITKU+ob1yI3nBU0UDehEbDiL5 X8H24fIPhZi/yDTDXVwp4NCB53Aufq2V4UiBEq6JojcVkCPdN1NWzHMVNsAM1tMR5U04 L4Gf7GMc1EC8w5hsrxeEMQt8ZMvIdlzqxrdLai6H2yaWHXdSlGw1VtdzskKy8v2m6Nlj lpc1m+Xl3OKwY0Z7F3FWwT8wfXq5jbUfTPTXb3+POy3ptx60FRYqy/gzSLFF2IO/HH7B Igk1N4K9CkvNWjxzgfV0PddS9CHlGeh0npLJs+xg/QwOSOVNAlqKxtcJuKzj6lrXE2A2 1K2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=16gCL8ue6x/+ns40r9jhVy5jqYFkhDbEoSbr+2kdMEM=; b=Td44x6dBHmXVqO8nTmlL7Di3LGSQ0RAXuwcKC9YZQJeEXmkgpc68vXBtlqEItTo96q 16JzKcbjspq4E9iQOPiydI0jSjGSgUGk6vUHMOOiaV0Mvm72EYwIl0upZ4G6qTW15O8X OUNsHVguJNfYU+5Y4WEunMbO0RlOUanBJI2VbPQvj95ntc2obmpWoR51wej643pJZR6Q s+1iesqEqhny0aUbM5MUYi6mzK5UtAsd7yGkd6Dtv0KIVMa3i7VEpihLZAxVq7E6M6Mg jcg7Q+01bOo7O95GBK7YrNo6cbtZS3UypUvY/3x3jgO/cKIbiruqgUtk6SmK3aekAobf fgYw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dAyINYRk; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::32a as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com. [2a00:1450:4864:20::32a]) by gmr-mx.google.com with ESMTPS id j14si35280wrq.5.2021.11.16.00.42.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 00:42:59 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::32a as permitted sender) client-ip=2a00:1450:4864:20::32a; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dAyINYRk; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::32a as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-wm1-x32a.google.com with SMTP id z1-20020a05600c220100b00337f97d2464so1299932wml.1 for ; Tue, 16 Nov 2021 00:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=16gCL8ue6x/+ns40r9jhVy5jqYFkhDbEoSbr+2kdMEM=; b=dAyINYRknQMA4fhoVfmK+txZt/V37Y5J8arxdOHuEyx3ptdb50w1nScZeSgJwBkuDR Eza/M3ZBnCKIFDMnvfJACbQK4A9DUkxIhOtlpLWcb+CYMrGizEnFxOCeZgE1bh89EY3M gTJTMr02zrPSd89fwAu3uoiELi5rAh802xd2WnJ/tCX+4fJPZ249thvZpAwS1jp0ELyU O7zbllPsXGoXcxe/kuwP+C0xP1X2IpNNXkR2rdLSiFwm39w6H/OBBZ8t5diePIFW5qzi 1tXgvE0HBh1hqZ87UrccnEf3pFTUSyYtA3fn9zREfrXZf5UvlX0w5BP5ZZJ3gkhOd94f pijQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=16gCL8ue6x/+ns40r9jhVy5jqYFkhDbEoSbr+2kdMEM=; b=6HDQUJO4I+nmoIsGh5nYjLq5rojTPyBD5SeX/Giz9CjRkhqL7VJLAwmpiewPhW1a2W Y7IHw6NxkaDrcFJ/Ev5U9z8JOTkH4+XKkeEEyyS95A+YzBaf/jXhI1r9GPbziDJyW95v nsurFiaU1fVPRPzm/Q7o/xHYQrgyZW3leXwKaO9GpYvh7E3pW8v0PAjBpfXKMSNIuum9 mqolYecX9BfHfUnZPNq0Ur4CVXvsBcH6zGJuKVsbj5aT+0rPZsDDGNFcdXEKXRVJLTbg qhH1OjJOzBM7Ndyj6YMHBCYqT6D+g15e4sjaf6F17kwa102VWdITRKOGIeNbzjxp8ceI VZng== X-Gm-Message-State: AOAM5318CaXRn3UyuqZQ0t35FIzqvpqLOC2uYYRf2LEK+7vMEPt0S5/8 Z2ql9bx6u8QK/1lQmFrIkSUYIfEP+jKXNL9MC/Lm7wacNZs= X-Received: by 2002:a1c:8002:: with SMTP id b2mr5954321wmd.2.1637052178928; Tue, 16 Nov 2021 00:42:58 -0800 (PST) MIME-Version: 1.0 References: <20211115160642.765371-1-Vijaikumar_Kanagarajan@mentor.com> <20211115160642.765371-2-Vijaikumar_Kanagarajan@mentor.com> <287571ee-909f-b7b2-7a7e-27a4495281a5@siemens.com> In-Reply-To: <287571ee-909f-b7b2-7a7e-27a4495281a5@siemens.com> From: vijai kumar Date: Tue, 16 Nov 2021 14:12:48 +0530 Message-ID: Subject: Re: [RFC PATCH 1/2] u-boot: Switch to use DEB_BUILD_PROFILES To: Jan Kiszka Cc: Vijai Kumar K , isar-users Content-Type: text/plain; charset="UTF-8" X-TUID: LsJWBcEbkoCd On Mon, Nov 15, 2021 at 10:14 PM Jan Kiszka wrote: > > On 15.11.21 17:06, Vijai Kumar K wrote: > > Use DEB_BUILD_PROFILES to select packages to build. > > > > Nice feature. > > > This patch drops the U_BOOT_TOOLS_PACKAGE variable and introduces > > U_BOOT_BUILD_PROFILES through which we can enable particular > > packages like u-boot-tools and u-boot-dev. > > > > Signed-off-by: Vijai Kumar K > > --- > > .../u-boot/u-boot-de0-nano-soc_2021.10.bb | 3 +- > > .../u-boot/u-boot-stm32mp15x_2021.10.bb | 2 ++ > > .../u-boot/files/debian/control.tmpl | 13 +++++++++ > > meta/recipes-bsp/u-boot/files/debian/rules | 9 +++++- > > meta/recipes-bsp/u-boot/u-boot-custom.inc | 29 +++++-------------- > > 5 files changed, 32 insertions(+), 24 deletions(-) > > > > diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2021.10.bb b/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2021.10.bb > > index dcb76c5..1340362 100644 > > --- a/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2021.10.bb > > +++ b/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2021.10.bb > > @@ -6,4 +6,5 @@ > > require u-boot-${PV}.inc > > > > # Just for testing purposes, distro package would be recent enough > > -U_BOOT_TOOLS_PACKAGE = "1" > > +U_BOOT_BUILD_PROFILES += "tools" > > +U_BOOT_BUILD_PROFILES += "dev" > > diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb b/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb > > index 6d95643..ead6d38 100644 > > --- a/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb > > +++ b/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb > > @@ -4,3 +4,5 @@ > > # SPDX-License-Identifier: MIT > > > > require u-boot-${PV}.inc > > + > > +U_BOOT_BUILD_PROFILES += "dev" > > diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl b/meta/recipes-bsp/u-boot/files/debian/control.tmpl > > index 9379be7..7ac11ad 100644 > > --- a/meta/recipes-bsp/u-boot/files/debian/control.tmpl > > +++ b/meta/recipes-bsp/u-boot/files/debian/control.tmpl > > @@ -11,4 +11,17 @@ Description: ${DESCRIPTION}, bootloader binaries > > > > Package: u-boot-${MACHINE}-dev > > Architecture: ${DISTRO_ARCH} > > +Build-Profiles: > > Description: ${DESCRIPTION}, bootloader libraries > > + > > +Package: u-boot-tools > > +Architecture: linux-any > > +Build-Profiles: > > +Depends: ${shlibs:Depends}, ${misc:Depends} > > +Description: ${DESCRIPTION}, companion tools > > + > > +Package: u-boot-${MACHINE}-config > > +Build-Profiles: > > +Provides: u-boot-config > > +Architecture: ${DISTRO_ARCH} > > +Description: ${DESCRIPTION}, environment configuration > > diff --git a/meta/recipes-bsp/u-boot/files/debian/rules b/meta/recipes-bsp/u-boot/files/debian/rules > > index 3d66762..121b00e 100755 > > --- a/meta/recipes-bsp/u-boot/files/debian/rules > > +++ b/meta/recipes-bsp/u-boot/files/debian/rules > > @@ -20,10 +20,17 @@ override_dh_auto_build: > > else \ > > ./scripts/get_default_envs.sh >u-boot-initial-env; \ > > fi > > - $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only envtools > > +ifneq (,$(filter dev,$(DEB_BUILD_PROFILES))) > > + $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 envtools > > +endif > > +ifneq (,$(filter tools,$(DEB_BUILD_PROFILES))) > > + $(MAKE) $(PARALLEL_MAKE) $(SET_CROSS_BUILD_TOOLS) NO_SDL=1 tools-only > > +endif > > > > override_dh_auto_install: > > +ifneq (,$(filter dev,$(DEB_BUILD_PROFILES))) > > mv tools/env/lib.a tools/env/libubootenv.a > > +endif > > > > override_dh_auto_test: > > > > diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc > > index 57d4f36..bc92552 100644 > > --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc > > +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc > > @@ -31,8 +31,8 @@ DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == > > TEMPLATE_FILES = "debian/control.tmpl" > > TEMPLATE_VARS += "MACHINE DEBIAN_BUILD_DEPENDS" > > > > -U_BOOT_TOOLS_PACKAGE ?= "0" > > -U_BOOT_CONFIG_PACKAGE ?= "0" > > + > > +U_BOOT_BUILD_PROFILES ?= "" > > Must be "dev" - we were building the dev package by default before, no? > Otherwise, it would be a RECIPE-API-worth change, and it would need > argumentation why we need to break the API. Yes. Will enable that by default here. > > > > > do_prepare_build() { > > cp -r ${WORKDIR}/debian ${S}/ > > @@ -42,31 +42,15 @@ do_prepare_build() { > > echo "${U_BOOT_BIN} /usr/lib/u-boot/${MACHINE}" > \ > > ${S}/debian/u-boot-${MACHINE}.install > > > > - echo "tools/env/libubootenv.a usr/lib" > \ > > - ${S}/debian/u-boot-${MACHINE}-dev.install > > - > > - if [ "${U_BOOT_TOOLS_PACKAGE}" = "1" ]; then > > - cat <>${S}/debian/control > > - > > -Package: u-boot-tools > > -Architecture: linux-any > > -Depends: \${shlibs:Depends}, \${misc:Depends} > > -Description: ${DESCRIPTION}, companion tools > > -EOF > > + if [ "${@bb.utils.contains('U_BOOT_BUILD_PROFILES', 'dev', 'yes', 'no', d)}" = "yes" ];then > > + echo "tools/env/libubootenv.a usr/lib" > \ > > + ${S}/debian/u-boot-${MACHINE}-dev.install > > Doesn't that profile feature allow to copy that unconditionally? Not sure about that. Will check and bypass this if possible. > > > fi > > > > - if [ "${U_BOOT_CONFIG_PACKAGE}" = "1" ]; then > > + if [ "${@bb.utils.contains('U_BOOT_BUILD_PROFILES', 'config', 'yes', 'no', d)}" = "yes" ];then > > cp ${WORKDIR}/fw_env.config ${S}/ || \ > > die "U_BOOT_CONFIG_PACKAGE requires a fw_env.config in SRC_URI" > > > > - cat <>${S}/debian/control > > - > > -Package: u-boot-${MACHINE}-config > > -Provides: u-boot-config > > -Architecture: ${DISTRO_ARCH} > > -Description: ${DESCRIPTION}, environment configuration > > -EOF > > - > > cat <>${S}/debian/u-boot-${MACHINE}-config.install > > u-boot-initial-env /etc > > fw_env.config /etc > > @@ -77,4 +61,5 @@ EOF > > dpkg_runbuild_prepend() { > > export U_BOOT_CONFIG="${U_BOOT_CONFIG}" > > export U_BOOT_BIN="${U_BOOT_BIN}" > > + export DEB_BUILD_PROFILES="${U_BOOT_BUILD_PROFILES}" > > } > > > > Jan > > -- > Siemens AG, T RDA IOT > Corporate Competence Center Embedded Linux > > -- > 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 on the web visit https://groups.google.com/d/msgid/isar-users/287571ee-909f-b7b2-7a7e-27a4495281a5%40siemens.com.