Skip to contentSkip to conversation

arm/arm-bsp: optee: upgrade to 4.7.0

PATCH New Andrey Zhizhikin 1 participant 1 message Aug 26, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm/arm-bsp: optee: upgrade to 4.7.0

OP-TEE version 4.7.0 has been released on 2025-07-11 [1], and includes fixes that are currently collected as separate patches in the layer collection.

Upgrade OP-TEE recipes to point to version 4.7.0, and drop patches from layers as they are already present in upstream.

Clang patch in optee-os package was completely removed. Upstream logic was changed in PR #7382 [2], making this patch obsolete.

CVE-2025-46733 in optee-ftpm package is now properly tagged and included in 4.7.0 version as well.

One patch that is still kept in the layer is optee-client/0001-tee-supplicant-update-udev-systemd-install-code.patch, as it has been merged after 4.7.0 tag was applied, but already present in upstream as commit 59b90488e93e ("tee-supplicant: update udev & systemd install code"). Further updates shall consider to drop this as well.

In addition, point corestone1000 machine to a new version, as 4.6.0 is dropped from the layer. TZDRAM patch is also dropped as it is now present in upstream.

---
 .../conf/machine/include/corstone1000.inc     |  4 +-
 ...orstone1000-increase-CFG_TZDRAM_SIZE.patch | 30 -------
 .../optee/optee-os-corstone1000-common.inc    |  3 -
 ...ptee-ftpm_4.6.0.bb => optee-ftpm_4.7.0.bb} |  2 +-
 ...-client_4.6.0.bb => optee-client_4.7.0.bb} |  4 +-
 .../optee/optee-examples_4.6.0.bb             |  4 -
 .../optee/optee-examples_4.7.0.bb             |  4 +
 ...it_4.6.0.bb => optee-os-tadevkit_4.7.0.bb} |  0
 .../0001-optee-enable-clang-support.patch     | 29 ------
 ...002-Add-optee-ta-instanceKeepCrashed.patch | 89 -------------------
 .../recipes-security/optee/optee-os_4.6.0.bb  | 12 ---
 .../recipes-security/optee/optee-os_4.7.0.bb  |  8 ++
 ...cmake-add-Werror-based-on-CFG_WERROR.patch | 74 ---------------
 ...Re-order-the-include-of-sys-stat.h-h.patch | 51 -----------
 ...ptee-test_4.6.0.bb => optee-test_4.7.0.bb} |  9 +-
 15 files changed, 19 insertions(+), 304 deletions(-)
 delete mode 100644 meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch
 rename meta-arm/recipes-security/optee-ftpm/{optee-ftpm_4.6.0.bb => optee-ftpm_4.7.0.bb} (98%)
 rename meta-arm/recipes-security/optee/{optee-client_4.6.0.bb => optee-client_4.7.0.bb} (77%)
 delete mode 100644 meta-arm/recipes-security/optee/optee-examples_4.6.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-examples_4.7.0.bb
 rename meta-arm/recipes-security/optee/{optee-os-tadevkit_4.6.0.bb => optee-os-tadevkit_4.7.0.bb} (100%)
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0001-optee-enable-clang-support.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0002-Add-optee-ta-instanceKeepCrashed.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os_4.6.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-os_4.7.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-test/0001-build-make-cmake-add-Werror-based-on-CFG_WERROR.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-test/0001-regression_1000-Re-order-the-include-of-sys-stat.h-h.patch
 rename meta-arm/recipes-security/optee/{optee-test_4.6.0.bb => optee-test_4.7.0.bb} (70%)
meta-arm-bsp/conf/machine/include/corstone1000.inc +2 -2
index 04d2b60d..45237a3b 100644
@@ -14,8 +14,8 @@ TFA_BL2_BINARY = "bl2-corstone1000.bin"
 TFA_FIP_BINARY = "fip-corstone1000.bin"
 
 # optee
-PREFERRED_VERSION_optee-os ?= "4.6.%"
-PREFERRED_VERSION_optee-client ?= "4.6.%"
+PREFERRED_VERSION_optee-os ?= "4.7.%"
+PREFERRED_VERSION_optee-client ?= "4.7.%"
 
 # Trusted Services
 TS_PLATFORM = "arm/corstone1000"
meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch deleted +0 -30
deleted file mode 100644
index e18dd783..00000000
@@ -1,30 +0,0 @@
-From ce58e4d78dc7a4f3c3b08ee425461eb190d70543 Mon Sep 17 00:00:00 2001
-From: Bence Balogh <[email protected]>
-Date: Fri, 1 Nov 2024 00:45:53 +0100
-Subject: [PATCH] plat-corstone1000: increase CFG_TZDRAM_SIZE
-
-TZDRAM is a 4MB SRAM in Corstone-1000. Its start address is `0x0200_0000`
-but the first 0x2000 bytes are reserved for future use. `CFG_TZDRAM_SIZE`
-can be increased to `0x360000` so OP-TEE has more RAM.
-
-Signed-off-by: Bence Balogh <[email protected]>
-Upstream-Status: Submitted [https://github.com/OP-TEE/optee_os/pull/7470]
----
- core/arch/arm/plat-corstone1000/conf.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/core/arch/arm/plat-corstone1000/conf.mk b/core/arch/arm/plat-corstone1000/conf.mk
-index 9fa0729d5..745dc958a 100644
---- a/core/arch/arm/plat-corstone1000/conf.mk
-+++ b/core/arch/arm/plat-corstone1000/conf.mk
-@@ -34,7 +34,7 @@ CFG_TEE_CORE_NB_CORE ?= 1
- CFG_TZDRAM_START ?= 0x02002000
- 
- # TEE_RAM (OP-TEE kernel + DATA) + TA_RAM
--CFG_TZDRAM_SIZE  ?= 0x340000
-+CFG_TZDRAM_SIZE  ?= 0x360000
- CFG_SHMEM_START  ?= 0x86000000
- CFG_SHMEM_SIZE   ?= 0x00200000
- 
--- 
-2.25.1
meta-arm-bsp/recipes-security/optee/optee-os-corstone1000-common.inc +0 -3
index d7fe4c73..7e849c45 100644
@@ -1,7 +1,4 @@
 FILESEXTRAPATHS:prepend := "${THISDIR}/files/optee-os/corstone1000:"
-SRC_URI:append = " \
-                  file://0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch \
-		  "
 
 COMPATIBLE_MACHINE = "corstone1000"
 
meta-arm/recipes-security/optee-ftpm/optee-ftpm_4.7.0.bb renamed from meta-arm/recipes-security/optee-ftpm/optee-ftpm_4.6.0.bb +1 -1
similarity index 98%
rename from meta-arm/recipes-security/optee-ftpm/optee-ftpm_4.6.0.bb
rename to meta-arm/recipes-security/optee-ftpm/optee-ftpm_4.7.0.bb
index 9f328c25..756aeec6 100644
@@ -35,7 +35,7 @@ SRC_URI = "\
 # As per optee-ftpm TA documentation, we have to use this SHA of MS TPM reference
 SRCREV_ms-tpm   ?= "98b60a44aba79b15fcce1c0d1e46cf5918400f6a"
 
-# v4.6.0 + fix for CVE-2025-46733
+# v4.7.0
 SRCREV_optee-ta ?= "ce33372ab772e879826361a1ca91126260bd9be1"
 
 SRCREV_FORMAT    = "ms-tpm_optee-ta"
meta-arm/recipes-security/optee/optee-client_4.7.0.bb renamed from meta-arm/recipes-security/optee/optee-client_4.6.0.bb +2 -2
similarity index 77%
rename from meta-arm/recipes-security/optee/optee-client_4.6.0.bb
rename to meta-arm/recipes-security/optee/optee-client_4.7.0.bb
index cbd75eb3..00f829e1 100644
@@ -1,7 +1,7 @@
 require recipes-security/optee/optee-client.inc
 
-# v4.6.0
-SRCREV = "02e7f9213b0d7db9c35ebf1e41e733fc9c5a3f75"
+# v4.7.0
+SRCREV = "23c112a6f05cc5e39bd4aaf52ad515cad532237d"
 SRC_URI += "file://0001-tee-supplicant-update-udev-systemd-install-code.patch"
 
 inherit pkgconfig
meta-arm/recipes-security/optee/optee-examples_4.6.0.bb deleted +0 -4
deleted file mode 100644
index 8ee4ece9..00000000
@@ -1,4 +0,0 @@
-require recipes-security/optee/optee-examples.inc
-
-# v4.6.0
-SRCREV = "5306d2c7c618bb4a91df17a2d5d79ae4701af4a3"
meta-arm/recipes-security/optee/optee-examples_4.7.0.bb new file +4 -0
new file mode 100644
index 00000000..a926f819
@@ -0,0 +1,4 @@
+require recipes-security/optee/optee-examples.inc
+
+# v4.7.0
+SRCREV = "14321a0607db16099d158478b21a2b2e37b3a935"
meta-arm/recipes-security/optee/optee-os-tadevkit_4.7.0.bb renamed from meta-arm/recipes-security/optee/optee-os-tadevkit_4.6.0.bb +0 -0
similarity index 100%
rename from meta-arm/recipes-security/optee/optee-os-tadevkit_4.6.0.bb
rename to meta-arm/recipes-security/optee/optee-os-tadevkit_4.7.0.bb
meta-arm/recipes-security/optee/optee-os/0001-optee-enable-clang-support.patch deleted +0 -29
deleted file mode 100644
index abc6d13e..00000000
@@ -1,29 +0,0 @@
-From 9cf8ac4e6fcecb33af377e1a322f4841ed4e30ce Mon Sep 17 00:00:00 2001
-From: Brett Warren <[email protected]>
-Date: Wed, 23 Sep 2020 09:27:34 +0100
-Subject: [PATCH] optee: enable clang support
-
-When compiling with clang, the LIBGCC_LOCATE_CFLAG variable used
-to provide a sysroot wasn't included, which results in not locating
-compiler-rt. This is mitigated by including the variable as ammended.
-
-Upstream-Status: Inappropriate
-ChangeId: 8ba69a4b2eb8ebaa047cb266c9aa6c2c3da45701
-Signed-off-by: Brett Warren <[email protected]>
----
- mk/clang.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/mk/clang.mk b/mk/clang.mk
-index a045beee8482..1ebe2f702dcd 100644
---- a/mk/clang.mk
-+++ b/mk/clang.mk
-@@ -30,7 +30,7 @@ comp-cflags-warns-clang := -Wno-language-extension-token \
- 
- # Note, use the compiler runtime library (libclang_rt.builtins.*.a) instead of
- # libgcc for clang
--libgcc$(sm)	:= $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
-+libgcc$(sm)	:= $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
- 			-rtlib=compiler-rt -print-libgcc-file-name 2> /dev/null)
- 
- # Core ASLR relies on the executable being ready to run from its preferred load
meta-arm/recipes-security/optee/optee-os/0002-Add-optee-ta-instanceKeepCrashed.patch deleted +0 -89

89 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-os_4.6.0.bb deleted +0 -12
deleted file mode 100644
index 3e0eea20..00000000
@@ -1,12 +0,0 @@
-require recipes-security/optee/optee-os.inc
-
-DEPENDS += "dtc-native"
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-
-# v4.6.0
-SRCREV = "71785645fa6ce42db40dbf5a54e0eaedc4f61591"
-SRC_URI += " \
-    file://0001-optee-enable-clang-support.patch \
-    file://0002-Add-optee-ta-instanceKeepCrashed.patch \
-   "
meta-arm/recipes-security/optee/optee-os_4.7.0.bb new file +8 -0
new file mode 100644
index 00000000..1d5d8ccc
@@ -0,0 +1,8 @@
+require recipes-security/optee/optee-os.inc
+
+DEPENDS += "dtc-native"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+# v4.7.0
+SRCREV = "86846f4fdf14f25b50fd64a87888ca9fe85a9e2b"
meta-arm/recipes-security/optee/optee-test/0001-build-make-cmake-add-Werror-based-on-CFG_WERROR.patch deleted +0 -74

74 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-test/0001-regression_1000-Re-order-the-include-of-sys-stat.h-h.patch deleted +0 -51

51 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-test_4.7.0.bb renamed from meta-arm/recipes-security/optee/optee-test_4.6.0.bb +2 -7
similarity index 70%
rename from meta-arm/recipes-security/optee/optee-test_4.6.0.bb
rename to meta-arm/recipes-security/optee/optee-test_4.7.0.bb
index ab4b8ae2..f42e254a 100644
@@ -1,15 +1,10 @@
 require recipes-security/optee/optee-test.inc
 
-# v4.6.0
-SRCREV = "a9e9495f4d57b97022008ad11198195e7e044c5d"
+# v4.7.0
+SRCREV = "a15be9eca1b7e935917d834284726027dffc8cfb"
 
 LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560"
 
-SRC_URI += " \
-    file://0001-build-make-cmake-add-Werror-based-on-CFG_WERROR.patch \
-    file://0001-regression_1000-Re-order-the-include-of-sys-stat.h-h.patch \
-"
-
 # Include ffa_spmc test group if the SPMC test is enabled.
 # Supported after op-tee v3.20
 EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \