1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-08 05:09:56 +00:00

arm/trusted-firmware-m: upgrade to 1.6.0.

Upgrade all SRCREVs, and drop the merged patch to use cbor2.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2022-05-04 14:17:10 +01:00
committed by Jon Mason
parent 5ea8300b09
commit 83df1de709
2 changed files with 10 additions and 91 deletions
@@ -1,80 +0,0 @@
Upstream-Status: Backport [https://github.com/mcu-tools/mcuboot/commit/a6df132b68f8e08c2b0ab428377d478436376556]
Signed-off-by: Ross Burton <ross.burton@arm.com>
From a5f747643e3a51b8dfce192203b9b84e033728b9 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
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 <ross.burton@arm.com>
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
@@ -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<pver>\d+(\.\d+)+)$"