Skip to contentSkip to conversation

corstone1000: Upgrade OP-TEE to 4.6.0

PATCH Applied Clement Faure 2 participants 5 messages Jun 18, 2025 – Jun 29, 2025

lore
Share & tools
lore
#0 lore raw

cover corstone1000: Upgrade OP-TEE to 4.6.0

Add recipes for optee 4.6.0
Backport patch for optee-test 4.6.0 to fix compilation issue with musl.
Set optee 4.6.0 as preferred version for Corstone-1000. Remove optee 4.3.0 and 4.4.0 recipes.

Clement Faure (1):
arm-bsp/optee-os: corstone-1000: upgrade to 4.6.0

Clément Faure (2):
arm/optee: remove 4.3.0
arm/optee: remove 4.4.0

 .../conf/machine/include/corstone1000.inc     |   4 +-
 .../0001-Handle-logging-syscall.patch         |  32 ---
 ...rstone1000-increase-CFG_TZDRAM_SIZE.patch} |   0
 .../optee/optee-os-corstone1000-common.inc    |   3 +-
 ...dd-udev-rule-and-systemd-service-fil.patch | 186 ------------------
 .../optee/optee-client_4.3.0.bb               |  10 -
 ...-client_4.4.0.bb => optee-client_4.6.0.bb} |   4 +-
 .../optee/optee-examples_4.3.0.bb             |   3 -
 .../optee/optee-examples_4.4.0.bb             |   4 -
 .../optee/optee-examples_4.6.0.bb             |   4 +
 .../optee/optee-os-tadevkit_4.3.0.bb          |  26 ---
 ...it_4.4.0.bb => optee-os-tadevkit_4.6.0.bb} |   0
 ...mpile.mk-use-CFLAGS-from-environment.patch |  43 ----
 ....mk-remove-absolute-build-time-paths.patch |  53 -----
 ...02-link.mk-use-CFLAGS-with-version.o.patch |  45 -----
 ...k-generate-version.o-in-link-out-dir.patch |  70 -------
 .../recipes-security/optee/optee-os_4.3.0.bb  |  14 --
 .../{optee-os_4.4.0.bb => optee-os_4.6.0.bb}  |   4 +-
 ...Re-order-the-include-of-sys-stat.h-h.patch |  51 +++++
 .../optee/optee-test_4.3.0.bb                 |  12 --
 ...ptee-test_4.4.0.bb => optee-test_4.6.0.bb} |   9 +-
 21 files changed, 68 insertions(+), 509 deletions(-)
 delete mode 100644 meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0001-Handle-logging-syscall.patch
 rename meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/{0002-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch => 0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch} (100%)
 delete mode 100644 meta-arm/recipes-security/optee/optee-client/0001-tee-supplicant-add-udev-rule-and-systemd-service-fil.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-client_4.3.0.bb
 rename meta-arm/recipes-security/optee/{optee-client_4.4.0.bb => optee-client_4.6.0.bb} (77%)
 delete mode 100644 meta-arm/recipes-security/optee/optee-examples_4.3.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-examples_4.4.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-examples_4.6.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-os-tadevkit_4.3.0.bb
 rename meta-arm/recipes-security/optee/{optee-os-tadevkit_4.4.0.bb => optee-os-tadevkit_4.6.0.bb} (100%)
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0001-compile.mk-use-CFLAGS-from-environment.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0001-mk-compile.mk-remove-absolute-build-time-paths.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0002-link.mk-use-CFLAGS-with-version.o.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0003-link.mk-generate-version.o-in-link-out-dir.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os_4.3.0.bb
 rename meta-arm/recipes-security/optee/{optee-os_4.4.0.bb => optee-os_4.6.0.bb} (75%)
 create mode 100644 meta-arm/recipes-security/optee/optee-test/0001-regression_1000-Re-order-the-include-of-sys-stat.h-h.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-test_4.3.0.bb
 rename meta-arm/recipes-security/optee/{optee-test_4.4.0.bb => optee-test_4.6.0.bb} (70%)
#1 lore raw

PATCH 1/3 arm-bsp/optee-os: corstone-1000: upgrade to 4.6.0

Add recipes for OP-TEE v4.6.0
Upgrade Corstone-1000 OP-TEE revision from 4.4.0 to 4.6.0 Add patch to fix compilation issue with musl and optee-test 4.6.0.

---
 .../conf/machine/include/corstone1000.inc     |  4 +-
 .../0001-Handle-logging-syscall.patch         | 32 ------------
 ...rstone1000-increase-CFG_TZDRAM_SIZE.patch} |  0
 .../optee/optee-os-corstone1000-common.inc    |  3 +-
 .../optee/optee-client_4.6.0.bb               |  9 ++++
 .../optee/optee-examples_4.6.0.bb             |  4 ++
 .../optee/optee-os-tadevkit_4.6.0.bb          | 29 +++++++++++
 .../recipes-security/optee/optee-os_4.6.0.bb  | 11 ++++
 ...Re-order-the-include-of-sys-stat.h-h.patch | 51 +++++++++++++++++++
 .../optee/optee-test_4.6.0.bb                 | 19 +++++++
 10 files changed, 126 insertions(+), 36 deletions(-)
 delete mode 100644 meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0001-Handle-logging-syscall.patch
 rename meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/{0002-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch => 0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch} (100%)
 create mode 100644 meta-arm/recipes-security/optee/optee-client_4.6.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-examples_4.6.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-os-tadevkit_4.6.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-os_4.6.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-test/0001-regression_1000-Re-order-the-include-of-sys-stat.h-h.patch
 create mode 100644 meta-arm/recipes-security/optee/optee-test_4.6.0.bb
meta-arm-bsp/conf/machine/include/corstone1000.inc +2 -2
index bbaeee29..ecaea64d 100644
@@ -14,8 +14,8 @@ TFA_BL2_BINARY = "bl2-corstone1000.bin"
 TFA_FIP_BINARY = "fip-corstone1000.bin"
 
 # optee
-PREFERRED_VERSION_optee-os ?= "4.4.%"
-PREFERRED_VERSION_optee-client ?= "4.4.%"
+PREFERRED_VERSION_optee-os ?= "4.6.%"
+PREFERRED_VERSION_optee-client ?= "4.6.%"
 
 # Trusted Services
 TS_PLATFORM = "arm/corstone1000"
meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0001-Handle-logging-syscall.patch deleted +0 -32
deleted file mode 100644
index 58ba2afd..00000000
@@ -1,32 +0,0 @@
-From d6ee50f581b43b16733b8731369b071d609d5048 Mon Sep 17 00:00:00 2001
-From: Emekcan Aras <[email protected]>
-Date: Thu, 31 Aug 2023 10:51:54 +0100
-Subject: [PATCH] Handle logging syscall
-
-Signed-off-by: Emekcan Aras <[email protected]>
-Upstream-Status: Pending [upstreamed differently in 280b6a3]
----
- core/arch/arm/kernel/spmc_sp_handler.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/core/arch/arm/kernel/spmc_sp_handler.c b/core/arch/arm/kernel/spmc_sp_handler.c
-index 1f218a0df..0676e8898 100644
---- a/core/arch/arm/kernel/spmc_sp_handler.c
-+++ b/core/arch/arm/kernel/spmc_sp_handler.c
-@@ -1276,7 +1276,12 @@ void spmc_sp_msg_handler(struct thread_smc_args *args,
- 			handle_console_log(args);
- 			sp_enter(args, caller_sp);
- 			break;
--
-+		case 0xdeadbeef:
-+			ts_push_current_session(&caller_sp->ts_sess);
-+			IMSG("%s", (char *)args->a1);
-+			ts_pop_current_session();
-+			sp_enter(args, caller_sp);
-+			break;
- 		default:
- 			EMSG("Unhandled FFA function ID %#"PRIx32,
- 			     (uint32_t)args->a0);
--- 
-2.17.1
-
meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch renamed from meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0002-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch +0 -0
similarity index 100%
rename from meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0002-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch
rename to meta-arm-bsp/recipes-security/optee/files/optee-os/corstone1000/0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch
meta-arm-bsp/recipes-security/optee/optee-os-corstone1000-common.inc +1 -2
index 3f6452dc..d7fe4c73 100644
@@ -1,7 +1,6 @@
 FILESEXTRAPATHS:prepend := "${THISDIR}/files/optee-os/corstone1000:"
 SRC_URI:append = " \
-                  file://0001-Handle-logging-syscall.patch \
-                  file://0002-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch \
+                  file://0001-plat-corstone1000-increase-CFG_TZDRAM_SIZE.patch \
 		  "
 
 COMPATIBLE_MACHINE = "corstone1000"
meta-arm/recipes-security/optee/optee-client_4.6.0.bb new file +9 -0
new file mode 100644
index 00000000..cbd75eb3
@@ -0,0 +1,9 @@
+require recipes-security/optee/optee-client.inc
+
+# v4.6.0
+SRCREV = "02e7f9213b0d7db9c35ebf1e41e733fc9c5a3f75"
+SRC_URI += "file://0001-tee-supplicant-update-udev-systemd-install-code.patch"
+
+inherit pkgconfig
+DEPENDS += "util-linux"
+EXTRA_OEMAKE += "PKG_CONFIG=pkg-config"
meta-arm/recipes-security/optee/optee-examples_4.6.0.bb new file +4 -0
new file mode 100644
index 00000000..8ee4ece9
@@ -0,0 +1,4 @@
+require recipes-security/optee/optee-examples.inc
+
+# v4.6.0
+SRCREV = "5306d2c7c618bb4a91df17a2d5d79ae4701af4a3"
meta-arm/recipes-security/optee/optee-os-tadevkit_4.6.0.bb new file +29 -0
new file mode 100644
index 00000000..961d5251
@@ -0,0 +1,29 @@
+require recipes-security/optee/optee-os_${PV}.bb
+
+SUMMARY = "OP-TEE Trusted OS TA devkit"
+DESCRIPTION = "OP-TEE TA devkit for build TAs"
+HOMEPAGE = "https://www.op-tee.org/"
+
+DEPENDS += "python3-pycryptodome-native"
+
+do_install() {
+    #install TA devkit
+    install -d ${D}${includedir}/optee/export-user_ta/
+    for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do
+        cp -aR $f ${D}${includedir}/optee/export-user_ta/
+    done
+}
+
+do_deploy() {
+	echo "Do not inherit do_deploy from optee-os."
+}
+
+FILES:${PN} = "${includedir}/optee/"
+
+# Build paths are currently embedded
+INSANE_SKIP:${PN}-dev += "buildpaths"
+
+# Include extra headers needed by SPMC tests to TA DEVKIT.
+# Supported after op-tee v3.20
+EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
+                                        ' CFG_SPMC_TESTS=y', '' , d)}"
meta-arm/recipes-security/optee/optee-os_4.6.0.bb new file +11 -0
new file mode 100644
index 00000000..c9a6b261
@@ -0,0 +1,11 @@
+require recipes-security/optee/optee-os.inc
+
+DEPENDS += "dtc-native"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+# v4.6.0
+SRCREV = "71785645fa6ce42db40dbf5a54e0eaedc4f61591"
+SRC_URI += " \
+    file://0003-optee-enable-clang-support.patch \
+   "
meta-arm/recipes-security/optee/optee-test/0001-regression_1000-Re-order-the-include-of-sys-stat.h-h.patch new file +51 -0

51 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-test_4.6.0.bb new file +19 -0
new file mode 100644
index 00000000..ab4b8ae2
@@ -0,0 +1,19 @@
+require recipes-security/optee/optee-test.inc
+
+# v4.6.0
+SRCREV = "a9e9495f4d57b97022008ad11198195e7e044c5d"
+
+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', \
+                                        ' CFG_SPMC_TESTS=y CFG_SECURE_PARTITION=y', '' , d)}"
+
+RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
+                                              ' arm-ffa-user', '' , d)}"
#2 lore raw

PATCH 2/3 arm/optee: remove 4.3.0

In reply to Clement Faure

From: Clément Faure <[email protected]>

Remove optee 4.3.0 recipes.

---
 ...dd-udev-rule-and-systemd-service-fil.patch | 186 ------------------
 .../optee/optee-client_4.3.0.bb               |  10 -
 .../optee/optee-examples_4.3.0.bb             |   3 -
 .../optee/optee-os-tadevkit_4.3.0.bb          |  26 ---
 ...mpile.mk-use-CFLAGS-from-environment.patch |  43 ----
 ....mk-remove-absolute-build-time-paths.patch |  53 -----
 ...02-link.mk-use-CFLAGS-with-version.o.patch |  45 -----
 ...k-generate-version.o-in-link-out-dir.patch |  70 -------
 .../recipes-security/optee/optee-os_4.3.0.bb  |  14 --
 .../optee/optee-test_4.3.0.bb                 |  12 --
 10 files changed, 462 deletions(-)
 delete mode 100644 meta-arm/recipes-security/optee/optee-client/0001-tee-supplicant-add-udev-rule-and-systemd-service-fil.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-client_4.3.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-examples_4.3.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-os-tadevkit_4.3.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0001-compile.mk-use-CFLAGS-from-environment.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0001-mk-compile.mk-remove-absolute-build-time-paths.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0002-link.mk-use-CFLAGS-with-version.o.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os/0003-link.mk-generate-version.o-in-link-out-dir.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-os_4.3.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-test_4.3.0.bb
meta-arm/recipes-security/optee/optee-client/0001-tee-supplicant-add-udev-rule-and-systemd-service-fil.patch deleted +0 -186
deleted file mode 100644
index 18c0d950..00000000
@@ -1,186 +0,0 @@
-From bf0d02758696ee7a9f7af9e95f85f5c238d0e109 Mon Sep 17 00:00:00 2001
-From: Mikko Rapeli <[email protected]>
-Date: Wed, 2 Oct 2024 15:24:21 +0100
-Subject: [PATCH] tee-supplicant: add udev rule and systemd service file
-
-tee-supplicant startup with systemd init based
-is non-trivial. Add sample udev rule and systemd
-service files here so that distros can co-operate maintaining
-them.
-
-Files are from meta-arm https://git.yoctoproject.org/meta-arm
-at commit 7cce43e632daa8650f683ac726f9124681b302a4 with license
-MIT and authors:
-
-Peter Griffin <[email protected]>
-Joshua Watt <[email protected]>
-Javier Tia <[email protected]>
-Mikko Rapeli <[email protected]>
-
-With permission from the authors, files can be relicensed to
-BSD-2-Clause like rest of optee client repo.
-
-The config files expect to find tee and teepriv system groups
-and teesuppl user and group (part of teepriv group) for running
-tee-supplicant. Additionally state directory /var/lib/tee
-must be owned by teesuppl user and group with no rights
-to other users. The groups and user can be changed via
-CMake variables:
-
-CFG_TEE_GROUP
-CFG_TEEPRIV_GROUP
-CFG_TEE_SUPPL_USER
-CFG_TEE_SUPPL_GROUP
-
-Change storage path from /data to /var/lib and
-use standard CMake variables also for constructing install
-paths which can be override to change the defaults:
-
-CMAKE_INSTALL_PREFIX, e.g. /
-CMAKE_INSTALL_LIBDIR, e.g. /usr/lib
-CMAKE_INSTALL_LOCALSTATEDIR /var
-
-Once these are setup, udev will start tee-supplicant in initramfs
-or rootfs with teesuppl user and group when /dev/teepriv
-device appears. The systemd service starts before tpm2.target
-(new in systemd 256) which starts early in initramfs and in main rootfs.
-This covers firmware TPM TA usecases for main rootfs encryption. When
-stopping tee-supplicant, the ftpm kernel modules are removed and only
-then the main process stopped to avoid fTPM breakage. These workarounds
-may be removed once RPMB kernel and optee patches without tee-supplicant
-are merged (Linux kernel >= 6.12-rc1, optee_os latest master or >= 4.4).
-
-Tested on yocto meta-arm setup which runs fTPM and optee-test/xtest
-under qemuarm64:
-
-$ git clone https://git.yoctoproject.org/meta-arm
-$ cd meta-arm
-$ SSTATE_DIR=$HOME/sstate DL_DIR=$HOME/download kas build \
-ci/qemuarm64-secureboot.yml:ci/poky-altcfg.yml:ci/testimage.yml
-
-Compiled image can be manually started to qemu serial console with:
-
-$ SSTATE_DIR=$HOME/sstate DL_DIR=$HOME/download kas shell \
-ci/qemuarm64-secureboot.yml:ci/poky-altcfg.yml:ci/testimage.yml
-$ runqemu slirp nographic
-
-meta-arm maintainers run these tests as part of their CI.
-
-Note that if the tee-supplicant state directory /var/lib/tee
-can not be accessed due permissions or other problems, then
-tee-supplicant startup with systemd still works. Only optee-test/xtest
-will be failing and fTPM kernel drivers fail to load with error
-messages.
-
-Cc: Peter Griffin <[email protected]>
-Cc: Joshua Watt <[email protected]>
-Cc: Javier Tia <[email protected]>
-Acked-by: Jerome Forissier <[email protected]>
-Signed-off-by: Mikko Rapeli <[email protected]>
----
- config.mk                                 |  2 +-
- libteec/CMakeLists.txt                    |  2 +-
- tee-supplicant/CMakeLists.txt             | 13 +++++++++++--
- tee-supplicant/optee-udev.rules.in        |  7 +++++++
- tee-supplicant/[email protected] | 17 +++++++++++++++++
- 5 files changed, 37 insertions(+), 4 deletions(-)
- create mode 100644 tee-supplicant/optee-udev.rules.in
- create mode 100644 tee-supplicant/[email protected]
-
-Upstream-Status: Backport
-
-diff --git a/config.mk b/config.mk
-index eae481f..3def087 100644
---- a/config.mk
-+++ b/config.mk
-@@ -23,7 +23,7 @@ CFG_TEE_SUPP_LOG_LEVEL?=1
- #   This folder can be created with the required permission in an init
- #   script during boot, else it will be created by the tee-supplicant on
- #   first REE FS access.
--CFG_TEE_FS_PARENT_PATH ?= /data/tee
-+CFG_TEE_FS_PARENT_PATH ?= /var/lib/tee
- 
- # CFG_TEE_CLIENT_LOG_FILE
- #   The location of the client log file when logging to file is enabled.
-diff --git a/libteec/CMakeLists.txt b/libteec/CMakeLists.txt
-index c742d31..c857369 100644
---- a/libteec/CMakeLists.txt
-+++ b/libteec/CMakeLists.txt
-@@ -14,7 +14,7 @@ endif()
- # Configuration flags always included
- ################################################################################
- set(CFG_TEE_CLIENT_LOG_LEVEL "1" CACHE STRING "libteec log level")
--set(CFG_TEE_CLIENT_LOG_FILE "/data/tee/teec.log" CACHE STRING "Location of libteec log")
-+set(CFG_TEE_CLIENT_LOG_FILE "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/tee/teec.log" CACHE STRING "Location of libteec log")
- 
- ################################################################################
- # Source files
-diff --git a/tee-supplicant/CMakeLists.txt b/tee-supplicant/CMakeLists.txt
-index 54a34c7..8df9bef 100644
---- a/tee-supplicant/CMakeLists.txt
-+++ b/tee-supplicant/CMakeLists.txt
-@@ -11,10 +11,15 @@ option(CFG_TEE_SUPP_PLUGINS "Enable tee-supplicant plugin support" ON)
- set(CFG_TEE_SUPP_LOG_LEVEL "1" CACHE STRING "tee-supplicant log level")
- # FIXME: Question is, is this really needed? Should just use defaults from # GNUInstallDirs?
- set(CFG_TEE_CLIENT_LOAD_PATH "/lib" CACHE STRING "Colon-separated list of paths where to look for TAs (see also --ta-dir)")
--set(CFG_TEE_FS_PARENT_PATH "/data/tee" CACHE STRING "Location of TEE filesystem (secure storage)")
-+set(CFG_TEE_FS_PARENT_PATH "${CMAKE_INSTALL_LOCALSTATEDIR}/lib/tee" CACHE STRING "Location of TEE filesystem (secure storage)")
- # FIXME: Why do we have if defined(CFG_GP_SOCKETS) && CFG_GP_SOCKETS == 1 in the c-file?
- set(CFG_GP_SOCKETS "1" CACHE STRING "Enable GlobalPlatform Socket API support")
--set(CFG_TEE_PLUGIN_LOAD_PATH "/usr/lib/tee-supplicant/plugins/" CACHE STRING "tee-supplicant's plugins path")
-+set(CFG_TEE_PLUGIN_LOAD_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/plugins/" CACHE STRING "tee-supplicant's plugins path")
-+
-+set(CFG_TEE_GROUP "tee" CACHE STRING "Group which has access to /dev/tee* devices")
-+set(CFG_TEEPRIV_GROUP "teepriv" CACHE STRING "Group which has access to /dev/teepriv* devices")
-+set(CFG_TEE_SUPPL_USER "teesuppl" CACHE STRING "User account which tee-supplicant is started with")
-+set(CFG_TEE_SUPPL_GROUP "teesuppl" CACHE STRING "Group account which tee-supplicant is started with")
- 
- if(CFG_TEE_SUPP_PLUGINS)
- 	set(CMAKE_INSTALL_RPATH "${CFG_TEE_PLUGIN_LOAD_PATH}")
-@@ -113,3 +118,7 @@ endif()
- # Install targets
- ################################################################################
- install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
-+configure_file([email protected] [email protected] @ONLY)
-+install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/[email protected] DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/system)
-+configure_file(optee-udev.rules.in optee-udev.rules @ONLY)
-+install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/optee-udev.rules DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d)
-diff --git a/tee-supplicant/optee-udev.rules.in b/tee-supplicant/optee-udev.rules.in
-new file mode 100644
-index 0000000..275e833
---- /dev/null
-+++ b/tee-supplicant/optee-udev.rules.in
-@@ -0,0 +1,7 @@
-+# SPDX-License-Identifier: BSD-2-Clause
-+KERNEL=="tee[0-9]*", MODE="0660", OWNER="root", GROUP="@CFG_TEE_GROUP@", TAG+="systemd"
-+
-+# If a /dev/teepriv[0-9]* device is detected, start an instance of
-+# tee-supplicant.service with the device name as parameter
-+KERNEL=="teepriv[0-9]*", MODE="0660", OWNER="root", GROUP="@CFG_TEEPRIV_GROUP@", \
-+    TAG+="systemd", ENV{SYSTEMD_WANTS}+="tee-supplicant@%k.service"
-diff --git a/tee-supplicant/[email protected] b/tee-supplicant/[email protected]
-new file mode 100644
-index 0000000..e53a935
---- /dev/null
-+++ b/tee-supplicant/[email protected]
-@@ -0,0 +1,17 @@
-+# SPDX-License-Identifier: BSD-2-Clause
-+[Unit]
-+Description=TEE Supplicant on %i
-+DefaultDependencies=no
-+After=dev-%i.device
-+Wants=dev-%i.device
-+Conflicts=shutdown.target
-+Before=tpm2.target sysinit.target shutdown.target
-+
-+[Service]
-+Type=notify
-+User=@CFG_TEE_SUPPL_USER@
-+Group=@CFG_TEE_SUPPL_GROUP@
-+EnvironmentFile=-@CMAKE_INSTALL_SYSCONFDIR@/default/tee-supplicant
-+ExecStart=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SBINDIR@/tee-supplicant $OPTARGS
-+# Workaround for fTPM TA: stop kernel module before tee-supplicant
-+ExecStop=-/bin/sh -c "/sbin/modprobe -v -r tpm_ftpm_tee ; /bin/kill $MAINPID"
--- 
-2.34.1
-
meta-arm/recipes-security/optee/optee-client_4.3.0.bb deleted +0 -10
deleted file mode 100644
index fae453ad..00000000
@@ -1,10 +0,0 @@
-require recipes-security/optee/optee-client.inc
-
-SRCREV = "a5b1ffcd26e328af0bbf18ab448a38ecd558e05c"
-
-SRC_URI += "file://0001-tee-supplicant-add-udev-rule-and-systemd-service-fil.patch \
-            file://0001-tee-supplicant-update-udev-systemd-install-code.patch"
-
-inherit pkgconfig
-DEPENDS += "util-linux"
-EXTRA_OEMAKE += "PKG_CONFIG=pkg-config"
meta-arm/recipes-security/optee/optee-examples_4.3.0.bb deleted +0 -3
deleted file mode 100644
index f082a25d..00000000
@@ -1,3 +0,0 @@
-require recipes-security/optee/optee-examples.inc
-
-SRCREV = "378dc0db2d5dd279f58a3b6cb3f78ffd6b165035"
meta-arm/recipes-security/optee/optee-os-tadevkit_4.3.0.bb deleted +0 -26
deleted file mode 100644
index 2e43254a..00000000
@@ -1,26 +0,0 @@
-require recipes-security/optee/optee-os_${PV}.bb
-
-SUMMARY = "OP-TEE Trusted OS TA devkit"
-DESCRIPTION = "OP-TEE TA devkit for build TAs"
-HOMEPAGE = "https://www.op-tee.org/"
-
-DEPENDS += "python3-pycryptodome-native"
-
-do_install() {
-    #install TA devkit
-    install -d ${D}${includedir}/optee/export-user_ta/
-    for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do
-        cp -aR $f ${D}${includedir}/optee/export-user_ta/
-    done
-}
-
-do_deploy() {
-	echo "Do not inherit do_deploy from optee-os."
-}
-
-FILES:${PN} = "${includedir}/optee/"
-
-# Include extra headers needed by SPMC tests to TA DEVKIT.
-# Supported after op-tee v3.20
-EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
-                                        ' CFG_SPMC_TESTS=y', '' , d)}"
meta-arm/recipes-security/optee/optee-os/0001-compile.mk-use-CFLAGS-from-environment.patch deleted +0 -43

43 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-os/0001-mk-compile.mk-remove-absolute-build-time-paths.patch deleted +0 -53

53 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-os/0002-link.mk-use-CFLAGS-with-version.o.patch deleted +0 -45

45 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-os/0003-link.mk-generate-version.o-in-link-out-dir.patch deleted +0 -70

70 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-os_4.3.0.bb deleted +0 -14
deleted file mode 100644
index cfd926b0..00000000
@@ -1,14 +0,0 @@
-require recipes-security/optee/optee-os.inc
-
-DEPENDS += "dtc-native"
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-
-SRCREV = "1c0d52ace3c237ca6276cafb5c73f699a75c1d40"
-SRC_URI += " \
-    file://0003-optee-enable-clang-support.patch \
-    file://0001-mk-compile.mk-remove-absolute-build-time-paths.patch \
-    file://0001-compile.mk-use-CFLAGS-from-environment.patch \
-    file://0002-link.mk-use-CFLAGS-with-version.o.patch \
-    file://0003-link.mk-generate-version.o-in-link-out-dir.patch \
-"
meta-arm/recipes-security/optee/optee-test_4.3.0.bb deleted +0 -12
deleted file mode 100644
index 44846fef..00000000
@@ -1,12 +0,0 @@
-require recipes-security/optee/optee-test.inc
-
-SRCREV = "9d4c4fb9638fb533211037016b6da12fbbcc4bb6"
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560"
-
-# 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', \
-                                        ' CFG_SPMC_TESTS=y CFG_SECURE_PARTITION=y', '' , d)}"
-
-RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
-                                              ' arm-ffa-user', '' , d)}"
#3 lore raw

PATCH 3/3 arm/optee: remove 4.4.0

In reply to Clement Faure

From: Clément Faure <[email protected]>

Remove optee 4.4.0 recipes.

---
 .../optee/optee-client_4.4.0.bb               |  9 ------
 .../optee/optee-examples_4.4.0.bb             |  4 ---
 .../optee/optee-os-tadevkit_4.4.0.bb          | 29 -------------------
 .../recipes-security/optee/optee-os_4.4.0.bb  | 11 -------
 .../optee/optee-test_4.4.0.bb                 | 16 ----------
 5 files changed, 69 deletions(-)
 delete mode 100644 meta-arm/recipes-security/optee/optee-client_4.4.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-examples_4.4.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-os-tadevkit_4.4.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-os_4.4.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-test_4.4.0.bb
meta-arm/recipes-security/optee/optee-client_4.4.0.bb deleted +0 -9
deleted file mode 100644
index 8bd03868..00000000
@@ -1,9 +0,0 @@
-require recipes-security/optee/optee-client.inc
-
-# v4.4.0
-SRCREV = "d221676a58b305bddbf97db00395205b3038de8e"
-SRC_URI += "file://0001-tee-supplicant-update-udev-systemd-install-code.patch"
-
-inherit pkgconfig
-DEPENDS += "util-linux"
-EXTRA_OEMAKE += "PKG_CONFIG=pkg-config"
meta-arm/recipes-security/optee/optee-examples_4.4.0.bb deleted +0 -4
deleted file mode 100644
index 46f08384..00000000
@@ -1,4 +0,0 @@
-require recipes-security/optee/optee-examples.inc
-
-# v4.4.0
-SRCREV = "378dc0db2d5dd279f58a3b6cb3f78ffd6b165035"
meta-arm/recipes-security/optee/optee-os-tadevkit_4.4.0.bb deleted +0 -29
deleted file mode 100644
index 961d5251..00000000
@@ -1,29 +0,0 @@
-require recipes-security/optee/optee-os_${PV}.bb
-
-SUMMARY = "OP-TEE Trusted OS TA devkit"
-DESCRIPTION = "OP-TEE TA devkit for build TAs"
-HOMEPAGE = "https://www.op-tee.org/"
-
-DEPENDS += "python3-pycryptodome-native"
-
-do_install() {
-    #install TA devkit
-    install -d ${D}${includedir}/optee/export-user_ta/
-    for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do
-        cp -aR $f ${D}${includedir}/optee/export-user_ta/
-    done
-}
-
-do_deploy() {
-	echo "Do not inherit do_deploy from optee-os."
-}
-
-FILES:${PN} = "${includedir}/optee/"
-
-# Build paths are currently embedded
-INSANE_SKIP:${PN}-dev += "buildpaths"
-
-# Include extra headers needed by SPMC tests to TA DEVKIT.
-# Supported after op-tee v3.20
-EXTRA_OEMAKE:append = "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
-                                        ' CFG_SPMC_TESTS=y', '' , d)}"
meta-arm/recipes-security/optee/optee-os_4.4.0.bb deleted +0 -11
deleted file mode 100644
index bd031ef7..00000000
@@ -1,11 +0,0 @@
-require recipes-security/optee/optee-os.inc
-
-DEPENDS += "dtc-native"
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-
-# v4.4.0
-SRCREV = "8f645256efc0dc66bd5c118778b0b50c44469ae1"
-SRC_URI += " \
-    file://0003-optee-enable-clang-support.patch \
-   "
meta-arm/recipes-security/optee/optee-test_4.4.0.bb deleted +0 -16
deleted file mode 100644
index 8b88865b..00000000
@@ -1,16 +0,0 @@
-require recipes-security/optee/optee-test.inc
-
-# v4.4.0
-SRCREV = "695231ef8987866663a9ed5afd8f77d1bae3dc08"
-
-LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560"
-
-SRC_URI += "file://0001-build-make-cmake-add-Werror-based-on-CFG_WERROR.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', \
-                                        ' CFG_SPMC_TESTS=y CFG_SECURE_PARTITION=y', '' , d)}"
-
-RDEPENDS:${PN} += "${@bb.utils.contains('MACHINE_FEATURES', 'optee-spmc-test', \
-                                              ' arm-ffa-user', '' , d)}"
Applied
#4 lore raw
In reply to Clement Faure
Quoted 10 lines · Clement Faure

Add recipes for optee 4.6.0
Backport patch for optee-test 4.6.0 to fix compilation issue with musl.
Set optee 4.6.0 as preferred version for Corstone-1000. Remove optee 4.3.0 and 4.4.0 recipes.

Clement Faure (1):
arm-bsp/optee-os: corstone-1000: upgrade to 4.6.0

[...]

Applied, thanks!

[1/3] arm-bsp/optee-os: corstone-1000: upgrade to 4.6.0

      commit: d782eeeae4acf620c9e094ac127501884fae0560
[2/3] arm/optee: remove 4.3.0
      commit: 5f8b0d44c8bfca16adb4127a205019823ce2e8be
[3/3] arm/optee: remove 4.4.0
      commit: 54cb65ca03a663a66a6d88c3397b76630ce7b043

Best regards,

Signature · 1 line
Jon Mason <[email protected]>