From patchwork Mon Jan 23 13:48:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Hoyes X-Patchwork-Id: 18511 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DDB4FC38142 for ; Mon, 23 Jan 2023 13:49:19 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.42721.1674481749482848503 for ; Mon, 23 Jan 2023 05:49:09 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: peter.hoyes@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B1DB7C14; Mon, 23 Jan 2023 05:49:50 -0800 (PST) Received: from e125920.arm.com (unknown [10.57.89.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 49C813F64C; Mon, 23 Jan 2023 05:49:08 -0800 (PST) From: Peter Hoyes To: meta-arm@lists.yoctoproject.org Cc: Peter Hoyes Subject: [PATCH] arm: Use SRC* variables consistently Date: Mon, 23 Jan 2023 13:48:55 +0000 Message-Id: <20230123134855.3793215-1-peter.hoyes@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 23 Jan 2023 13:49:19 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/4309 From: Peter Hoyes The SRC_URI, SRCREV AND SRCBRANCH variables are currently used inconsistently across recipes in meta-arm, leading to difficulties customizing the configuration in external BSP layers where necessary. Standardize usage across commonly used recipes so that: * SRC_URI contains a SRC_URI_PACKAGE_NAME variable per component which can be used to easily configure a mirror. This variable uses default assignment so that it can be easily overridden using an environment variable, e.g. to point to an internal mirror that cannot be committed externally. * SRCBRANCH is defined per component. * SRCREV is defined per component. Signed-off-by: Peter Hoyes --- .../scp-firmware/scp-firmware_2.10.0.bb | 4 +++- .../trusted-firmware-a/tf-a-tests_2.7.0.bb | 6 ++++-- .../trusted-firmware-a/trusted-firmware-a.inc | 4 +++- .../trusted-firmware-m_1.7.0.bb | 15 ++++++++++----- meta-arm/recipes-bsp/uefi/edk2-firmware.inc | 11 ++++++----- .../fiptool/fiptool-native_2.7.bb | 4 +++- .../trusted-firmware-m-scripts-native_1.6.0.bb | 3 ++- 7 files changed, 31 insertions(+), 16 deletions(-) diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb index 055e0c1b..b25b9a40 100644 --- a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb +++ b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.10.0.bb @@ -6,7 +6,9 @@ LICENSE = "BSD-3-Clause & Apache-2.0" LIC_FILES_CHKSUM = "file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101b19731 \ file://contrib/cmsis/git/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" -SRC_URI = "gitsm://github.com/ARM-software/SCP-firmware.git;protocol=https;branch=master" +SRC_URI_SCP_FIRMWARE ?= "gitsm://github.com/ARM-software/SCP-firmware.git;protocol=https" +SRC_URI = "${SRC_URI_SCP_FIRMWARE};branch=${SRCBRANCH}" +SRCBRANCH = "master" SRCREV = "673d014f3861ad81cc5ab06d2884a314a610799b" diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/tf-a-tests_2.7.0.bb b/meta-arm/recipes-bsp/trusted-firmware-a/tf-a-tests_2.7.0.bb index 645b2456..8ded64dd 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-a/tf-a-tests_2.7.0.bb +++ b/meta-arm/recipes-bsp/trusted-firmware-a/tf-a-tests_2.7.0.bb @@ -7,9 +7,11 @@ inherit deploy COMPATIBLE_MACHINE ?= "invalid" -SRC_URI = "git://git.trustedfirmware.org/TF-A/tf-a-tests.git;protocol=https;branch=master \ +SRC_URI_TRUSTED_FIRMWARE_A_TESTS ?= "git://git.trustedfirmware.org/TF-A/tf-a-tests.git;protocol=https" +SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A_TESTS};branch=${SRCBRANCH} \ file://tf-a-tests-no-warn-rwx-segments.patch" -SRCREV ?= "5f591f67738a1bbe6b262c53d9dad46ed8bbcd67" +SRCBRANCH = "master" +SRCREV = "5f591f67738a1bbe6b262c53d9dad46ed8bbcd67" DEPENDS += "optee-os" diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc index c5b695e4..b0533a1e 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc @@ -5,7 +5,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" inherit deploy -SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https;name=tfa;branch=master" +SRC_URI_TRUSTED_FIRMWARE_A ?= "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https" +SRCBRANCH = "master" +SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A};name=tfa;branch=${SRCBRANCH}" UPSTREAM_CHECK_GITTAGREGEX = "^v(?P\d+(\.\d+)+)$" diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.7.0.bb b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.7.0.bb index 3b4469d0..8e02bf98 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.7.0.bb +++ b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.7.0.bb @@ -15,11 +15,16 @@ LIC_FILES_CHKSUM = "file://license.rst;md5=07f368487da347f3c7bd0fc3085f3afa \ file://../mbedtls/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ file://../mcuboot/LICENSE;md5=b6ee33f1d12a5e6ee3de1e82fb51eeb8" -SRC_URI = "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https;branch=${SRCBRANCH_tfm};name=tfm;destsuffix=git/tfm \ - git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=${SRCBRANCH_tfm-tests};name=tfm-tests;destsuffix=git/tf-m-tests \ - git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=${SRCBRANCH_mbedtls};name=mbedtls;destsuffix=git/mbedtls \ - git://github.com/mcu-tools/mcuboot.git;protocol=https;branch=${SRCBRANCH_mcuboot};name=mcuboot;destsuffix=git/mcuboot \ - git://github.com/laurencelundblade/QCBOR.git;protocol=https;branch=${SRCBRANCH_qcbor};name=qcbor;destsuffix=git/qcbor \ +SRC_URI_TRUSTED_FIRMWARE_M ?= "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https" +SRC_URI_TRUSTED_FIRMWARE_M_TESTS ?= "git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https" +SRC_URI_TRUSTED_FIRMWARE_M_MBEDTLS ?= "git://github.com/ARMmbed/mbedtls.git;protocol=https" +SRC_URI_TRUSTED_FIRMWARE_M_MCUBOOT ?= "git://github.com/mcu-tools/mcuboot.git;protocol=https" +SRC_URI_TRUSTED_FIRMWARE_M_QCBOR ?= "git://github.com/laurencelundblade/QCBOR.git;protocol=https" +SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_M};branch=${SRCBRANCH_tfm};name=tfm;destsuffix=git/tfm \ + ${SRC_URI_TRUSTED_FIRMWARE_M_TESTS};branch=${SRCBRANCH_tfm-tests};name=tfm-tests;destsuffix=git/tf-m-tests \ + ${SRC_URI_TRUSTED_FIRMWARE_M_MBEDTLS};branch=${SRCBRANCH_mbedtls};name=mbedtls;destsuffix=git/mbedtls \ + ${SRC_URI_TRUSTED_FIRMWARE_M_MCUBOOT};branch=${SRCBRANCH_mcuboot};name=mcuboot;destsuffix=git/mcuboot \ + ${SRC_URI_TRUSTED_FIRMWARE_M_QCBOR};branch=${SRCBRANCH_qcbor};name=qcbor;destsuffix=git/qcbor \ " # The required dependencies are documented in tf-m/config/config_default.cmake diff --git a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc index c9f1f1da..bc477479 100644 --- a/meta-arm/recipes-bsp/uefi/edk2-firmware.inc +++ b/meta-arm/recipes-bsp/uefi/edk2-firmware.inc @@ -11,12 +11,13 @@ LIC_FILES_CHKSUM = "file://License.txt;md5=2b415520383f7964e96700ae12b4570a" LIC_FILES_CHKSUM += "file://edk2-platforms/License.txt;md5=2b415520383f7964e96700ae12b4570a" # These can be overridden as needed -EDK2_SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https" -EDK2_PLATFORMS_SRC_URI = "git://github.com/tianocore/edk2-platforms.git;branch=master;protocol=https" - +SRC_URI_EDK2 ?= "gitsm://github.com/tianocore/edk2.git;protocol=https" +SRC_URI_EDK2_PLATFORMS ?= "git://github.com/tianocore/edk2-platforms.git;protocol=https" +SRCBRANCH_edk2 = "master" +SRCBRANCH_edk2_platforms = "master" SRC_URI = "\ - ${EDK2_SRC_URI};name=edk2;destsuffix=edk2;nobranch=1 \ - ${EDK2_PLATFORMS_SRC_URI};name=edk2-platforms;destsuffix=edk2/edk2-platforms;nobranch=1 \ + ${SRC_URI_EDK2};branch=${SRCBRANCH_edk2_platforms};name=edk2;destsuffix=edk2 \ + ${SRC_URI_EDK2_PLATFORMS};branch=${SRCBRANCH_edk2};name=edk2-platforms;destsuffix=edk2/edk2-platforms \ file://unaligned.patch \ file://default.patch;patchdir=edk2-platforms \ " diff --git a/meta-arm/recipes-devtools/fiptool/fiptool-native_2.7.bb b/meta-arm/recipes-devtools/fiptool/fiptool-native_2.7.bb index ec531e44..66cf2ced 100644 --- a/meta-arm/recipes-devtools/fiptool/fiptool-native_2.7.bb +++ b/meta-arm/recipes-devtools/fiptool/fiptool-native_2.7.bb @@ -5,7 +5,9 @@ DESCRIPTION = "fiptool - Trusted Firmware tool for packaging" LICENSE = "BSD-3-Clause" -SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;destsuffix=fiptool-${PV};protocol=https;branch=master" +SRC_URI_TRUSTED_FIRMWARE_A ?= "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=https" +SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_A};destsuffix=fiptool-${PV};branch=${SRCBRANCH}" +SRCBRANCH = "master" LIC_FILES_CHKSUM = "file://docs/license.rst;md5=b2c740efedc159745b9b31f88ff03dde" # Use fiptool from TF-A v2.7 diff --git a/meta-arm/recipes-devtools/trusted-firmware-m-scripts/trusted-firmware-m-scripts-native_1.6.0.bb b/meta-arm/recipes-devtools/trusted-firmware-m-scripts/trusted-firmware-m-scripts-native_1.6.0.bb index 453d456a..217f08a6 100644 --- a/meta-arm/recipes-devtools/trusted-firmware-m-scripts/trusted-firmware-m-scripts-native_1.6.0.bb +++ b/meta-arm/recipes-devtools/trusted-firmware-m-scripts/trusted-firmware-m-scripts-native_1.6.0.bb @@ -1,5 +1,6 @@ -SRC_URI = "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https;branch=${SRCBRANCH}" +SRC_URI_TRUSTED_FIRMWARE_M ?= "git://git.trustedfirmware.org/TF-M/trusted-firmware-m.git;protocol=https" +SRC_URI = "${SRC_URI_TRUSTED_FIRMWARE_M};branch=${SRCBRANCH}" # Use the wrapper script from TF-Mv1.6.0 SRCBRANCH ?= "release/1.6.x" SRCREV = "7387d88158701a3c51ad51c90a05326ee12847a8"