From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7030828924489695232 X-Received: by 2002:a05:651c:1687:: with SMTP id bd7mr40579145ljb.305.1636992432465; Mon, 15 Nov 2021 08:07:12 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:bc09:: with SMTP id b9ls2317045ljf.2.gmail; Mon, 15 Nov 2021 08:07:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwV3B54YsT9hOyk409D85/p7MDzWPcMG5s7bNUd4sHmloYI/9QIKRusGIEcBpeQ+ODFdi7j X-Received: by 2002:a2e:a279:: with SMTP id k25mr14649994ljm.37.1636992431171; Mon, 15 Nov 2021 08:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636992431; cv=none; d=google.com; s=arc-20160816; b=e/0+HF6wedZNNxT/YC6YbOx3kqo2jZEWgGjR3cy/Pxst0C+gavu1+evbYjIp7PTotG IWzYdGgmBm83CyCiTb9z/VDKsjXv1tv3zZLI99dWqsBFpg8q+iYQjen1gPf4L98EUvL6 +vpfN+mvNtxMPNxRDhvssSOQDp/vFismhEoKdM38cDPUxPwE2VHw4GWQFJQJ/G6vBbu5 QXGnscusXPTwmeuyi+VSdE9xwsy3kWOuhmxDFhnD4WhX8cnnS1nJhhcB2H/1w8h6Lujp pFhbfSgranAzwoHnVhTBDatjWs9sTSvpe/gUHibSppnagoBz8IcEp0f1VVrwfCn4ouam F8uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=KNYL7nhT3zhR8nYlBcEMYpbMaBJaXnaeExumnJ6g9Mk=; b=THfalK6gLKOkmf4wLzRalABap19/O4IO5ICJe1eX4lQXNYzQnPZvmmUiAv5ysiX/Wl XY1ri0pj2+N+fWljSG3ou97NvfuYzc/7BijCmy0z4utX0t1zHwnHjrgJvFeNKgXEbsnX pM2khT2dAXRsFfC9kc94S+oYzakoFpQv8rzpYfvufo9a89OYw+5jTr9x+c9F6cA01e5u q2Se6O2XQVnSyVMKj3DOVSZ13meshs8yoDaWD/eYeTs7aGqinzqE2dDMJUMB5E3EFvHF lpg4J8//Kj1x6q8nm0B/Q90bm80HE00e05dz0eyPfHE14f/vgFSZcqy+2lf6fELMrnNx EYDg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id b11si729238lfv.12.2021.11.15.08.07.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Nov 2021 08:07:11 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: 52J0vUY5TR83+NhWWaRy2B5izLtP00z9p3iVVYBqWFEJLhuL8lRXdPpSADbEyiuv3ZGRfRdaxp ThnIiuuttIX1oKzchD43ULcXJ4u9Xr02gtFMaaseYlZkLoSf9rVYXZMQgJJadFCSKi4V85Ee6A 1OZ0no9ZSz8T9SkFksVAs9wPUPD3i5sGknJefedEqQFilqdz0qQB7XqvVWYMYiOsgk6q7vtmIV EEdsszPws6POXPapxnN6sKz8DLmSoQ4PSt4hTpDism0E6Nx0HdcrJyrEdw9G368msSWftztnhj iEo8Rj+fcA1S2Xq3rkSO7y8J X-IronPort-AV: E=Sophos;i="5.87,236,1631606400"; d="scan'208";a="68347030" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 15 Nov 2021 08:07:09 -0800 IronPort-SDR: 5qVFY0OIF4aBy9BFbvGMP/v6xzGIsczcYqy3rlkGxGahocyi962n17tq7AGbaSAIofgWXuYp30 R3cKXaQEpCoAfpvEAViCuXxtLcn8FPOEZ4EI/EZb3RDJRXdnTdz3HBm/U0lXzgBHcQVnyYeOZD Gz3ClEufV5hOGl4xnbW0YlIdYjAW5mS0m+TecATjwL747TczYruRzMkVVFi5iu7nH8Hb1FxMaz KqQviwZ3a62Ig3Ul91K09r5mYQaI8G0Rx3gRHGorZAh3crXWWLJVBzEBfm9OAm/Zyv72pP7rcd otk= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [RFC PATCH 1/2] u-boot: Switch to use DEB_BUILD_PROFILES Date: Mon, 15 Nov 2021 21:36:41 +0530 Message-ID: <20211115160642.765371-2-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211115160642.765371-1-Vijaikumar_Kanagarajan@mentor.com> References: <20211115160642.765371-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-09.mgc.mentorg.com (147.34.90.209) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: RrQeAC2sC6wY 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: 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}" } -- 2.25.1