From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7030828924489695232 X-Received: by 2002:a05:651c:113b:: with SMTP id e27mr5082894ljo.474.1637128337837; Tue, 16 Nov 2021 21:52:17 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:3d9e:: with SMTP id k30ls1919471lfv.1.gmail; Tue, 16 Nov 2021 21:52:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3harZuO5z42wwPNp6gS8War3W5sm8Yy3LZoXS19kTvEp9PuQPV6TpTsMtrLPe/u+Yj2eU X-Received: by 2002:ac2:4f8b:: with SMTP id z11mr12470286lfs.91.1637128336647; Tue, 16 Nov 2021 21:52:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637128336; cv=none; d=google.com; s=arc-20160816; b=qPPLDuoREtq4Z+CTtCr2O6t66FCwylNhyBQVhZe48rIHjlD1EXTXDerrWdz0uHns84 QOCYtE9QBgmn3CGH9837tr4pfgxWM/IFfDEt22HYo6u6yhu/ygWebp9dDfzC4bjXPntI RxCEBx4FD/ggKLd3ByvKLH+qEAiY8fyUl2hrhSt8T47FtVWmZEeABVBjpYFPlBZZ1/D0 Bog/yHBn56IIBq6ZAn8jleOSK6LctMlfgTUswGOJhTH7m/NKyt1YSuKEW3IxjTgRBjeH oFCak3lFmLIvIfc8/1VgqlI/ZyduMQJvfwWXIebF8AUpRk3uCW5ekz/rjYMapiFBughA Odeg== 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=PTzRSbVuvqsrvu6q/4lbQLC6853Swj2Y9H9j2+AgjBk=; b=bA69wLelFQ9p9nLYomy+n1aRKSYlXBOL0OqcmUrTMY7nGJHBFP6lUn5zUOW6a81xtI g0ni3fDDkzYVT1pLCvKZLr90YcaWgiXpUXcWOESyQIG9mZ7Rb28kYzIfYvpjvm7160+N ZTqKDKcwKF+0BG19ZvFUveBqYkwRPUsQEO8quFrwyE4ANpyPLFGIG9Px8LWJ+KiB3Z7L u757GP2SI9qt3c+3kxc5AO32FpkTcelkfyti7dzDwk9cr2BjGk9yOsVYWrYOq/HQ9Zkx We2QX+dyey625d9w1BAGjvjXCoMCfmBCe8G91qgIPJNiIk5AJMGmIhKAXAea5F9420rv 3n9A== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Q6pbaLVq; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::334 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-x334.google.com (mail-wm1-x334.google.com. [2a00:1450:4864:20::334]) by gmr-mx.google.com with ESMTPS id h12si241850lfv.4.2021.11.16.21.52.16 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Nov 2021 21:52:16 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::334 as permitted sender) client-ip=2a00:1450:4864:20::334; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Q6pbaLVq; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::334 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-x334.google.com with SMTP id p3-20020a05600c1d8300b003334fab53afso3798207wms.3 for ; Tue, 16 Nov 2021 21:52:16 -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=PTzRSbVuvqsrvu6q/4lbQLC6853Swj2Y9H9j2+AgjBk=; b=Q6pbaLVqWKj2/tHKAPLf1lkSD+xKVKZqk6ymgqP98ZB4/h4K4tRujSMIEbTk9XnpX4 QZrdu9lXIDu17C4mrPjR17pcRq7YQAig3LUaoTyA7uxoispP7WDV02srETJXXocf/7OS 5SJzTwjMrgPCO1YqZbfpMn7j7dNwXqaXuz/eoOXldq5ubdUTDdaKf2sx+e/rC7vYxiQc trzSLp9n17TjV187qO/mPgnWjU3+t6pbue2Y8uttrdLDNM8GWIVnevjuo/QRz8IA2jk3 /eN4VUE0o150EFean6yHZnZD+pCa6Zqbj9OEdv8I0tzrrKN/Qw2/OIoTHx19DzqtoRIJ yHxw== 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=PTzRSbVuvqsrvu6q/4lbQLC6853Swj2Y9H9j2+AgjBk=; b=PjTSKd6GVI2iJ5/Tc7B6oNpsa8fgoTfxoDb/NjANJYTagOMdngG1dyWN6tlBqjugh1 pz9xtRkj5sc6GhdDVOi8ZiEWNZ+QTmfAVRxeuGgC7cCcSvTilNzScydRfqgLRJ4xuOtW fHuHCe+Ai506iGzDxN0hecWkq+duBMl75URWGrkXX07rXbsBqjxlNUGC4MdyGMJn14IE sDm5aC5p3WFUaqvpPNpYbhHnz6pb2seTJOREkolG3czs6/1n6zStPTtRzz0sADp3wvo+ B5Ll46I8XOn7i5OtYXt4oOVZSGUTmhq3vOwdgsKLO5ovrLGVIqsLHXmLFT9i8mV/+N2Y f1SA== X-Gm-Message-State: AOAM530YgdAeDccxJya7dPttejGexTKel78P2fW0vas/O2xvXcvvzFyy K4ArqtNpLE4Ri8/Q7g/LVaS/ORP20zzzIDoZl+w= X-Received: by 2002:a7b:c409:: with SMTP id k9mr14839170wmi.173.1637128335919; Tue, 16 Nov 2021 21:52:15 -0800 (PST) MIME-Version: 1.0 References: <20211115160642.765371-1-Vijaikumar_Kanagarajan@mentor.com> <20211115160642.765371-2-Vijaikumar_Kanagarajan@mentor.com> <1b1f56f5-5d86-75cb-9dc8-476fdbbe0f18@siemens.com> In-Reply-To: <1b1f56f5-5d86-75cb-9dc8-476fdbbe0f18@siemens.com> From: vijai kumar Date: Wed, 17 Nov 2021 11:22:04 +0530 Message-ID: Subject: Re: [RFC PATCH 1/2] u-boot: Switch to use DEB_BUILD_PROFILES To: Gylstorff Quirin Cc: Vijai Kumar K , isar-users Content-Type: text/plain; charset="UTF-8" X-TUID: dylb9pNSx+vf On Tue, Nov 16, 2021 at 8:32 PM Gylstorff Quirin wrote: > > > > On 11/15/21 5:06 PM, Vijai Kumar K wrote: > > Use DEB_BUILD_PROFILES to select packages to build. > > > > 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: > > > I would suggest using the naming convention[1] for Build Profiles. > in this case 'pkg.u-boot.dev' or something similar. Yes. I went through that before, but decided against it for being long. I see not many benefits in the ISAR context of this recipe. Maybe I am wrong. Chose simplicity over compliance. Thanks, Vijai Kumar K > > [1]: https://wiki.debian.org/BuildProfileSpec > > Quirin > > > 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 ?= "" > > > > 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 > > 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}" > > } > > > > -- > > > > > With best regards, > Quirin Gylstorff > > Siemens AG > Technology > Research in Digitalization and Automation > Smart Embedded Systems > T RDA IOT SES-DE > Otto-Hahn-Ring 6 > 81739 Muenchen, Germany > Mobile: +49 173 3746683 > mailto:quirin.gylstorff@siemens.com > www.siemens.com > > Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Jim > Hagemann Snabe; Managing Board: Roland Busch, Chairman, President and > Chief Executive Officer; Cedrik Neike, Matthias Rebellius, Ralf P. > Thomas, Judith Wiese; Registered offices: Berlin and Munich, Germany; > Commercial registries: Berlin-Charlottenburg, HRB 12300, Munich, HRB > 6684; WEEE-Reg.-No. DE 23691322 > > Important notice: This e-mail and any attachment thereof contain > corporate proprietary information. If you have received it by mistake, > please notify us immediately by reply e-mail and delete this e-mail and > its attachments from your system. Thank you. > > > > -- > 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/1b1f56f5-5d86-75cb-9dc8-476fdbbe0f18%40siemens.com.