From patchwork Wed May 4 13:17:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 7550 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 6442BC433EF for ; Wed, 4 May 2022 13:17:18 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.6295.1651670237006169961 for ; Wed, 04 May 2022 06:17:17 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@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 EBABF1042; Wed, 4 May 2022 06:17:15 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 72BD93FA49; Wed, 4 May 2022 06:17:15 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Cc: nd@arm.com Subject: [PATCH 1/2] arm/trusted-firmware-m: upgrade to 1.6.0. Date: Wed, 4 May 2022 14:17:10 +0100 Message-Id: <20220504131711.783449-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.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 ; Wed, 04 May 2022 13:17:18 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3352 Upgrade all SRCREVs, and drop the merged patch to use cbor2. Signed-off-by: Ross Burton --- .../trusted-firmware-m/files/cbor2.patch | 80 ------------------- ...m_1.5.0.bb => trusted-firmware-m_1.6.0.bb} | 21 +++-- 2 files changed, 10 insertions(+), 91 deletions(-) delete mode 100644 meta-arm/recipes-bsp/trusted-firmware-m/files/cbor2.patch rename meta-arm/recipes-bsp/trusted-firmware-m/{trusted-firmware-m_1.5.0.bb => trusted-firmware-m_1.6.0.bb} (91%) diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/files/cbor2.patch b/meta-arm/recipes-bsp/trusted-firmware-m/files/cbor2.patch deleted file mode 100644 index ec5749d4..00000000 --- a/meta-arm/recipes-bsp/trusted-firmware-m/files/cbor2.patch +++ /dev/null @@ -1,80 +0,0 @@ -Upstream-Status: Backport [https://github.com/mcu-tools/mcuboot/commit/a6df132b68f8e08c2b0ab428377d478436376556] -Signed-off-by: Ross Burton - -From a5f747643e3a51b8dfce192203b9b84e033728b9 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Tue, 2 Nov 2021 11:12:04 +0000 -Subject: [PATCH] imgtool: prefer cbor2 over cbor - -The cbor module is unmaintained, with the last release in 2016[1]. The -cbor2 module however is under active development and was last released -just last month[2]. - -As the APIs are identical, we can import cbor2 and if that fails fall -back to cbor. - -[1] https://pypi.org/project/cbor/#history -[2] https://pypi.org/project/cbor2/#history - -Closes #1189 - -Signed-off-by: Ross Burton -Change-Id: Iaf2d0df625a200a5cebf72dec4a89877a26194ea ---- - scripts/imgtool.nix | 2 +- - scripts/imgtool/boot_record.py | 9 ++++++--- - scripts/requirements.txt | 2 +- - scripts/setup.py | 2 +- - 4 files changed, 9 insertions(+), 6 deletions(-) - -diff --git a/scripts/imgtool.nix b/scripts/imgtool.nix -index 9ac41bc..ea9ba8b 100644 -diff --git a/scripts/imgtool/boot_record.py b/scripts/imgtool/boot_record.py -index ac433aa..8ab2f60 100644 ---- a/scripts/imgtool/boot_record.py -+++ b/scripts/imgtool/boot_record.py -@@ -14,8 +14,11 @@ - # limitations under the License. - - from enum import Enum --import cbor - -+try: -+ from cbor2 import dumps -+except ImportError: -+ from cbor import dumps - - class SwComponent(int, Enum): - """ -@@ -46,4 +49,4 @@ def create_sw_component_data(sw_type, sw_version, sw_measurement_description, - # list because later it will be modified by the bootloader. - properties[SwComponent.MEASUREMENT_VALUE] = sw_measurement_value - -- return cbor.dumps(properties) -+ return dumps(properties) -diff --git a/scripts/requirements.txt b/scripts/requirements.txt -index 9481e2c..2446928 100644 ---- a/scripts/requirements.txt -+++ b/scripts/requirements.txt -@@ -1,4 +1,4 @@ - cryptography>=2.6 - intelhex - click --cbor>=1.0.0 -+cbor2 -diff --git a/scripts/setup.py b/scripts/setup.py -index a228ea3..692cfb7 100644 ---- a/scripts/setup.py -+++ b/scripts/setup.py -@@ -15,7 +15,7 @@ setuptools.setup( - 'cryptography>=2.4.2', - 'intelhex>=2.2.1', - 'click', -- 'cbor>=1.0.0', -+ 'cbor2', - ], - entry_points={ - "console_scripts": ["imgtool=imgtool.main:imgtool"] --- -2.25.1 - diff --git a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb similarity index 91% rename from meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb rename to meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb index 652abdd6..3a5e57ea 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5.0.bb +++ b/meta-arm/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.0.bb @@ -16,22 +16,21 @@ LIC_FILES_CHKSUM = "file://license.rst;md5=07f368487da347f3c7bd0fc3085f3afa \ 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=release/1.5.x;name=tfm-tests;destsuffix=git/tf-m-tests \ + git://git.trustedfirmware.org/TF-M/tf-m-tests.git;protocol=https;branch=release/1.6.x;name=tfm-tests;destsuffix=git/tf-m-tests \ git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=master;name=mbedtls;destsuffix=git/mbedtls \ git://github.com/mcu-tools/mcuboot.git;protocol=https;branch=main;name=mcuboot;destsuffix=git/mcuboot \ - file://cbor2.patch;patchdir=../mcuboot \ " # The required dependencies are documented in tf-m/config/config_default.cmake -# TF-Mv1.5.0 -SRCBRANCH_tfm = "release/1.5.x" -SRCREV_tfm = "6fb14a14140f94150f959c88e3b880f48372da06" -# mbedtls-3.0.0 -SRCREV_mbedtls = "8df2f8e7b9c7bb9390ac74bb7bace27edca81a2b" -# TF-Mv1.5.0 -SRCREV_tfm-tests = "6131778527cf60d9b5b7ea73700a30c0fdb9ff66" -# v1.8.0 -SRCREV_mcuboot = "29099e1d17f93ae1d09fe945ad191b703aacd3d8" +# TF-Mv1.6.0 +SRCBRANCH_tfm = "release/1.6.x" +SRCREV_tfm = "7387d88158701a3c51ad51c90a05326ee12847a8" +# mbedtls-3.1.0 +SRCREV_mbedtls = "d65aeb37349ad1a50e0f6c9b694d4b5290d60e49" +# TF-Mv1.6.0 +SRCREV_tfm-tests = "723905d46019596f3f2df66d79b5d6bff6f3f213" +# v1.9.0 +SRCREV_mcuboot = "c657cbea75f2bb1faf1fceacf972a0537a8d26dd" UPSTREAM_CHECK_GITTAGREGEX = "^TF-Mv(?P\d+(\.\d+)+)$" From patchwork Wed May 4 13:17:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 7549 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 6533DC433F5 for ; Wed, 4 May 2022 13:17:18 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.6268.1651670237719079944 for ; Wed, 04 May 2022 06:17:18 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@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 9AE9312FC; Wed, 4 May 2022 06:17:16 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 220A73FA49; Wed, 4 May 2022 06:17:16 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Cc: nd@arm.com Subject: [PATCH 2/2] arm-bsp/trusted-firmware-m: move corstone1000 to TF-M 1.6.0. Date: Wed, 4 May 2022 14:17:11 +0100 Message-Id: <20220504131711.783449-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220504131711.783449-1-ross.burton@arm.com> References: <20220504131711.783449-1-ross.burton@arm.com> 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 ; Wed, 04 May 2022 13:17:18 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3353 Move the TFM_PLATFORM assignment to the bbappend. Drop the SRCREV changes, these are all incorporated into the 1.6.0 release. Signed-off-by: Ross Burton --- meta-arm-bsp/conf/machine/include/corstone1000.inc | 2 -- .../trusted-firmware-m-corstone1000.inc | 14 +++----------- ....bbappend => trusted-firmware-m_1.6.%.bbappend} | 0 3 files changed, 3 insertions(+), 13 deletions(-) rename meta-arm-bsp/recipes-bsp/trusted-firmware-m/{trusted-firmware-m_1.5%.bbappend => trusted-firmware-m_1.6.%.bbappend} (100%) diff --git a/meta-arm-bsp/conf/machine/include/corstone1000.inc b/meta-arm-bsp/conf/machine/include/corstone1000.inc index 1faccd0b..d38773a3 100644 --- a/meta-arm-bsp/conf/machine/include/corstone1000.inc +++ b/meta-arm-bsp/conf/machine/include/corstone1000.inc @@ -10,8 +10,6 @@ TFA_BL2_BINARY = "bl2-corstone1000.bin" TFA_FIP_BINARY = "fip-corstone1000.bin" # TF-M -PREFERRED_VERSION_trusted-firmware-m ?= "1.5%" -TFM_PLATFORM = "arm/corstone1000" EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-m" # TF-M settings for signing host images diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc index f387be5a..eb400e52 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m-corstone1000.inc @@ -2,6 +2,8 @@ COMPATIBLE_MACHINE = "(corstone1000)" +TFM_PLATFORM = "arm/corstone1000" + TFM_DEBUG = "1" ## Default is the MPS3 board @@ -9,14 +11,6 @@ TFM_PLATFORM_IS_FVP ?= "FALSE" EXTRA_OECMAKE += "-DPLATFORM_IS_FVP=${TFM_PLATFORM_IS_FVP}" EXTRA_OECMAKE += "-DCC312_LEGACY_DRIVER_API_ENABLED=OFF" -SRCBRANCH_tfm = "master" -SRCREV_tfm = "f8c7e5361b92b16108165601ea81c5d01feb3c22" -SRCREV_mbedtls = "d65aeb37349ad1a50e0f6c9b694d4b5290d60e49" -SRCREV_mcuboot = "29099e1d17f93ae1d09fe945ad191b703aacd3d8" - -PV = "1.5.0+git${SRCPV}" -SRCREV_FORMAT = "tfm" - # libmetal LICENSE += "& BSD-3-Clause" LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c" @@ -31,9 +25,7 @@ SRC_URI += "git://github.com/OpenAMP/open-amp.git;protocol=https;branch=main;nam SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d" EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${WORKDIR}/git/openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build" -# The install task signs the TF-A BL2 and FIP binaries. -# So they need to be copied to the sysroot. Hence the dependencies below: -do_prepare_recipe_sysroot[depends]+= "trusted-firmware-a:do_populate_sysroot" +DEPENDS += "trusted-firmware-a" # adding host images signing support require trusted-firmware-m-sign-host-images.inc diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5%.bbappend b/meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.%.bbappend similarity index 100% rename from meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.5%.bbappend rename to meta-arm-bsp/recipes-bsp/trusted-firmware-m/trusted-firmware-m_1.6.%.bbappend