From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7030828924489695232 X-Received: by 2002:aa7:98dd:0:b0:49f:bab8:3b67 with SMTP id e29-20020aa798dd000000b0049fbab83b67mr41171249pfm.86.1637074957068; Tue, 16 Nov 2021 07:02:37 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:a03:: with SMTP id p3ls6227407pfh.0.gmail; Tue, 16 Nov 2021 07:02:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpkfkRmjOd2S12lrZKzZsYJpAqEOXv4ZwqjC0Q1iljBqpO6VR4WISsvhi+R9VfF4XN44fl X-Received: by 2002:a63:5f16:: with SMTP id t22mr5051931pgb.362.1637074956147; Tue, 16 Nov 2021 07:02:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637074956; cv=none; d=google.com; s=arc-20160816; b=lvVOOlnb7l+Q+eeJaTCCQSZAxJQs4EXBhiAL1LA9hyYJikoUPyESy0FOcKeRcYSJIc Yzq8YPgppPoWO/nvb1rEewYv5jkbaBKrrFU95lRsPCGjZu2xOfIX3al2jE4YpKM51Lyy h+uedNRYf2qJo/SuEEM8gJpl1MgN4Rc4xr+3+akav+2j3ceWG9dSTf6XCERIbhYEi3LV stjOoyS3e/vquvwzD97r6JSQE31tdXg0ok3LQ+7BWUJ0FRR4nX1aj5YsyyNN6UGtppwh 6xZCY/iMfUGpOeoihZ4Fm3ATRbuMvr+RGhLRUFLQh8d6hSWgT2ekm12ehg9hksV/3sJz sX+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:references:to:subject; bh=LciWjP1xXCefZJwwZ5u3sfjDdkNQkmEAOYy0gX/xppQ=; b=ZYKxMY0wsGE13kubt7uaY8Y6l8naFYsctQTvtxC9FMHjd8p5BfoIc2x18QXRBUjNdK maYPNLxUYCwVRc1TQFr59Tog9pzNuch23dYh2S0PfpLcUhcIMeqVqbyMp9/Fg77RmjkF 3I/32JGXedCO26dUNdjsH3PtXYVK2Z5xkRsO/ADhQX1dvP2NTZGr54YekQ4d//VI1HLU gWaoiqrp1dOGT1PPry2JIom/9FsFAooCngbj76uGt2mg2glV+ji7tOzJoHnCLltjCOKX txnLQyaWduW7UY24oLszavpCplaXEEA2qtnwPsdrgVaQ4o8AHFPiTZ2S3BmGYgQbOw6X zlyQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=quirin.gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id t69si54188pgc.4.2021.11.16.07.02.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Nov 2021 07:02:36 -0800 (PST) Received-SPF: pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of quirin.gylstorff@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=quirin.gylstorff@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 1AGF2Xjf003087 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Nov 2021 16:02:34 +0100 Received: from [167.87.1.223] ([167.87.1.223]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 1AGF2XA2007635; Tue, 16 Nov 2021 16:02:33 +0100 Subject: Re: [RFC PATCH 1/2] u-boot: Switch to use DEB_BUILD_PROFILES To: Vijai Kumar K , isar-users@googlegroups.com References: <20211115160642.765371-1-Vijaikumar_Kanagarajan@mentor.com> <20211115160642.765371-2-Vijaikumar_Kanagarajan@mentor.com> From: Gylstorff Quirin Organization: Siemens Message-ID: <1b1f56f5-5d86-75cb-9dc8-476fdbbe0f18@siemens.com> Date: Tue, 16 Nov 2021 16:02:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211115160642.765371-2-Vijaikumar_Kanagarajan@mentor.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: l4oNExJ/VvQ7 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. [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.