From patchwork Mon Nov 15 06:06:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 1034 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA; Mon, 15 Nov 2021 17:07:18 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f55.google.com (mail-lf1-f55.google.com [209.85.167.55]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id 1AFG7HbZ000459 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 15 Nov 2021 17:07:18 +0100 Received: by mail-lf1-f55.google.com with SMTP id b23-20020a0565120b9700b00403a044bfcdsf5821052lfv.13 for ; Mon, 15 Nov 2021 08:07:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636992432; cv=pass; d=google.com; s=arc-20160816; b=IWz1mvVGi6Fkj1x9+smN6IWdSVmOmq2FC3P6nLIM5cJnam9K63k0isWmJ7p7wEtKJe UecmDXe9zDWngeXVQDwk/VOJibqxhbbGw9SBs2XOpVrePxaH4xmvN8RECN6N56rIHpLO sfdZGgYNs43DRAhFeEtFKbLDYYDjoF5NJezhor02voBiqmrB4BPRzayWGfqffHwO9xAs C/vXMYt7UwMc604i5h2Yw6ha2OXvujIua5fo567rhR8rb2mKQsB2bbYIcmqPtaAD8xVn 1fnlV/2K7XZZf41QQu2spzoThymKM2UtMoQqjAJS6HUL0O/sF9ugsMK7gOIR/JqArMfR ob7Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr:sender :dkim-signature; bh=VlgHRmwNnAwERnJQGoBsify4X9G7/VeGqADxGl8wQyw=; b=DkS8QGkBQIVG1O83KPeUuB6RHyXyB2qXvuBlOhBu9Aqf6bQokeG63GXprdrvqZ4yxc DSc6Vnh2oDIJHYk3PCv3UJtwElyIpaXDbP7BkAg40xnQ9abJSBQDhEqF0djeDtA1/fxi NpflKAVmfJHmFidXkYm9lQxKwlDdb+B2JKg4aaTmLDlDb4qihSZHkrA/eSr5/iH52sfG IyPPtk6g0KSX2kBT5BaF2lZyQSF8m8DZN4CI9q5lPmhn3ev4G5SiO7xE0RBSIVEtCGW+ 0gH/iASEcxdJv8/9cyCW1PLd/kir0l6s4jwDFlsiwCnzVR775U8/YL5moai94sLHL+KC DKGA== ARC-Authentication-Results: i=2; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=VlgHRmwNnAwERnJQGoBsify4X9G7/VeGqADxGl8wQyw=; b=RAgnq2OoD1qzOy2f+3XQ0SKb2gJMxMSd987UhObDJbdc9CblpEQ8AYq79MEpE+Z1Ik GJ3Xqft1JgMHm4x6xyLVPekkOmapd23oZnA9d7Ti1DpZZtme5rRqoRhn0rT/0ZB0glnq w+ppLIZ/4JidLvig+SBrXgD9KcJyff6/sl9Tp4+106L2sBel5incgcO8BBI1x3aW9PHk YQs7em4kuSpFEpXxE8CPvXjLuiE4NmPk6GJTr/MqRSYY1rJhcQ/U/VFTI2+r2tVEEVOm cMbjn540Om8jqbL+3qH09ydZhkRbVeSpKbOJR42jz/FMb1yXL4dY04nNFa+FVOJISo4/ yVKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=VlgHRmwNnAwERnJQGoBsify4X9G7/VeGqADxGl8wQyw=; b=dyr0aHC5SF9QtPoB0usiB3pcJTOsJWyiSk60QhGXEr8VN1RpB2TnSNlSlo11tNF+Xw w3YDAmg4kdzif+bXUBFttE9XxL11kMzN3f47eeb3KaJV4guCZKnr35bN/QBrT/OU7TM7 ezOfFnHRKzX60mqoOtFsHQAU4N0HrtpVtMFP97hRPM7ttKS0Xgz2Yq+lcFDBVrl2jE1t jxa2buXD3wjR2/PVsiPtt+3MyUn0T99RIEwNjdIWHkwflx9nSOcwI6s3UH5BiJdePvLC y233RE+aBlgS1v+53B61lZjvyS+vA8KXksHDfUPHl9H4Sxr76RWMYH9LFkhuJx4X61Yh HtWg== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM533zTNa0ZYdTT/7EMWPoORVZ7/Yn5wBfQ1UgIlZ8XcW2HbDVXwA4 FUIIjD7EjMGtIvsTeY3a0v4= X-Google-Smtp-Source: ABdhPJykXVll7GumIpcUOb6QUw6kWtqW2x1zsoBXBGHJ5Dwmq2LXOq/fzWl9HPo9XQXMMrzn7dtRwQ== X-Received: by 2002:a2e:b6d1:: with SMTP id m17mr3634793ljo.273.1636992432390; 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-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 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; 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 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-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-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 Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: INBOX 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}" }