From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6732315258433568768 X-Received: by 2002:a50:f09d:: with SMTP id v29mr896272edl.4.1567489294500; Mon, 02 Sep 2019 22:41:34 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b2d2:: with SMTP id cf18ls3337042ejb.8.gmail; Mon, 02 Sep 2019 22:41:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqydGGRCjTUy8II0kYym66SC4dqCMhL0kFHfvHCpSfpBW1c4ymb+MqurReoHZPIWoV2B+WC0 X-Received: by 2002:a17:906:29c7:: with SMTP id y7mr4615106eje.287.1567489293942; Mon, 02 Sep 2019 22:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567489293; cv=none; d=google.com; s=arc-20160816; b=FWQEx5KdBrCIy64me/rHPnAOYkJqESY51NH/1NAFa9Uz+ip7wX6xDm3B/DrBJbH2W3 JsbRH0W+NUJvqs9nwhnSRv95VDzrI08UD3Kqz8t1YCT/FQypSo0yzy+C1RpFE8E8N0I8 dvWwNlupinyXF8RyzF25SYQJ8LVFoiyyyM8kSvcwnCEc/1bxGHZbSExmfE8cR/Lga/1c u1OlwMcyTGRMmD7j7Lfi0JujsJj7p2q0PgLNyRoQFISFo/LDYynWphB0sn1oBGMpBaqE iBkVT9WNy1kWNifkbpj+GE0ZkQ82DDnF2fYF0M8f5GVC+tTnfI6NttvlriQWTuRMRLPU cSWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version:user-agent :date:message-id:to:subject:from; bh=DTDxkuNXC/DTAXZKEDpJpy11vi2jmhOWktq9bCmyYEg=; b=LOcNguUHYKc1a71QnojSM1IRAfvZBKBBzA9e3UOYwZBzqqENOoogq1hp0s+zagaYIM jrVKDS9HwS1r4oB4xUH2ZspjAbviJBqoqgdnPp4d1oW9IdimvnnsDEFwKnhZObnvpcOE mY6G4NPPyNbIqp/XMr3LCSUOLcYKbRLhklHriv7L9ySA+AXYsOuRmmA7V4bbEN6Wqx1x 1quNm9FQZjWCM8jV11fTjoBaz70nUpbZCReZImUS6QQHE+hYSpmPJFA1rE8JKa9iSc4C jorMW4M07iOGzmiUoOXH4HjmOKzaR9z+DPb4GcXYwyh/iBLSuR3dNXAKGdTjcuUqZHAx 59Rw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id z31si401232edc.2.2019.09.02.22.41.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Sep 2019 22:41:33 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x835fXH6010438 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 3 Sep 2019 07:41:33 +0200 Received: from [167.87.40.78] ([167.87.40.78]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x835fWmc019561 for ; Tue, 3 Sep 2019 07:41:33 +0200 From: Jan Kiszka Subject: [PATCH] u-boot-custom: Add control for u-boot-tools package build To: isar-users Message-ID: Date: Tue, 3 Sep 2019 07:41:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: jXY3ahLhG2dP From: Jan Kiszka Each custom u-boot currently generates also the u-boot-tools packages. That can cause redundant builds in the best case when building multiple targets with custom u-boots. In the worst case, an undeterministic version is installed, depending one which u-boot with which version is finished first. Allow the user to define which recipe generates also the u-boot-tools package so that only one is generated in a multi-target scenario. We default to "no build" as a tools package different to the distro one is rarely needed on the target. Signed-off-by: Jan Kiszka --- meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb | 3 +++ meta/recipes-bsp/u-boot/files/debian/control.tmpl | 5 ----- meta/recipes-bsp/u-boot/u-boot-custom.inc | 15 ++++++++++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb b/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb index fe00b73..9a3fd90 100644 --- a/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb +++ b/meta-isar/recipes-bsp/u-boot/u-boot_2018.09.bb @@ -9,3 +9,6 @@ SRC_URI += " \ ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \ " SRC_URI[sha256sum] = "839bf23cfe8ce613a77e583a60375179d0ad324e92c82fbdd07bebf0fd142268" + +# Just for testing purposes, distro package would be recent enough +U_BOOT_TOOLS_PACKAGE = "1" diff --git a/meta/recipes-bsp/u-boot/files/debian/control.tmpl b/meta/recipes-bsp/u-boot/files/debian/control.tmpl index 5c1cc92..0ab3a29 100644 --- a/meta/recipes-bsp/u-boot/files/debian/control.tmpl +++ b/meta/recipes-bsp/u-boot/files/debian/control.tmpl @@ -12,8 +12,3 @@ Description: ${DESCRIPTION}, bootloader binaries Package: u-boot-${MACHINE}-dev Architecture: ${DISTRO_ARCH} Description: ${DESCRIPTION}, bootloader libraries - -Package: u-boot-tools -Architecture: linux-any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: ${DESCRIPTION}, companion tools diff --git a/meta/recipes-bsp/u-boot/u-boot-custom.inc b/meta/recipes-bsp/u-boot/u-boot-custom.inc index 400aba2..8843789 100644 --- a/meta/recipes-bsp/u-boot/u-boot-custom.inc +++ b/meta/recipes-bsp/u-boot/u-boot-custom.inc @@ -9,7 +9,8 @@ FILESPATH =. "${LAYERDIR_core}/recipes-bsp/u-boot/files:" DESCRIPTION ?= "Custom U-Boot" -PROVIDES += "u-boot-${MACHINE} u-boot-${MACHINE}-dev u-boot-tools" +PROVIDES += "u-boot-${MACHINE} u-boot-${MACHINE}-dev" +PROVIDES += "${@'u-boot-tools' if d.getVar('U_BOOT_TOOLS_PACKAGE') == '1' else ''}" inherit dpkg @@ -20,6 +21,8 @@ BUILD_DEPENDS ?= "bc, bison, flex, device-tree-compiler, git" TEMPLATE_FILES = "debian/control.tmpl" TEMPLATE_VARS += "MACHINE BUILD_DEPENDS" +U_BOOT_TOOLS_PACKAGE ?= "0" + do_prepare_build() { cp -r ${WORKDIR}/debian ${S}/ @@ -30,6 +33,16 @@ do_prepare_build() { 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 + fi } dpkg_runbuild_prepend() { -- 2.16.4