Skip to contentSkip to conversation

arm/optee: update to 4.0.0

PATCH Applied Jon Mason 3 participants 4 messages Oct 30, 2023 – Nov 1, 2023

lore
Share & tools
lore

Jon Mason

author
#0 lore raw

PATCH 1/1 arm/optee: update to 4.0.0

Update the recipes and patches for OP-TEE 4.0.0. Migrate the 3.22.0 recipe to meta-arm-bsp for corstone1000 and n1sdp.

---
 .../optee/optee-client_3.22.0.bb              |   2 +-
 .../optee/optee-examples_3.22.0.bb            |   2 +-
 ...ow-setting-sysroot-for-libgcc-lookup.patch |   0
 ...-Define-section-attributes-for-clang.patch |   0
 .../0003-optee-enable-clang-support.patch     |   0
 ...4-core-link-add-no-warn-rwx-segments.patch |   0
 .../optee/optee-os-tadevkit_3.22.0.bb         |   5 +
 .../recipes-security/optee/optee-os_3.22.0.bb |   2 +-
 .../optee/optee-os_3.22.0.bbappend            |   4 +-
 .../optee/optee-test_3.22.0.bb                |  18 ++
 .../optee/optee-client_4.0.0.bb               |   7 +
 .../optee/optee-examples_4.0.0.bb             |   3 +
 .../optee/optee-os-tadevkit_3.2%.bbappend     |   4 -
 .../optee/optee-os-tadevkit_4.0.0.bb          |  29 +++
 ...ow-setting-sysroot-for-libgcc-lookup.patch |  35 +++
 ...-Define-section-attributes-for-clang.patch | 241 ++++++++++++++++++
 .../0003-optee-enable-clang-support.patch     |  30 +++
 ...4-core-link-add-no-warn-rwx-segments.patch |  63 +++++
 ...os_3.2%.bbappend => optee-os_4.%.bbappend} |   2 +-
 .../recipes-security/optee/optee-os_4.0.0.bb  |  13 +
 ..._1000-remove-unneeded-stat.h-include.patch |  34 ---
 .../optee/optee-test_3.22.0.bb                |  10 -
 .../optee/optee-test_4.%.bbappend             |   0
 ...test_3.2%.bbappend => optee-test_4.0.0.bb} |   8 +
 24 files changed, 459 insertions(+), 53 deletions(-)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-client_3.22.0.bb (73%)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-examples_3.22.0.bb (51%)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-os-3.22.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch (100%)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-os-3.22.0/0002-core-Define-section-attributes-for-clang.patch (100%)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-os-3.22.0/0003-optee-enable-clang-support.patch (100%)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-os-3.22.0/0004-core-link-add-no-warn-rwx-segments.patch (100%)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-os-tadevkit_3.22.0.bb (70%)
 rename {meta-arm => meta-arm-bsp}/recipes-security/optee/optee-os_3.22.0.bb (89%)
 create mode 100644 meta-arm-bsp/recipes-security/optee/optee-test_3.22.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-client_4.0.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-examples_4.0.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-os-tadevkit_3.2%.bbappend
 create mode 100644 meta-arm/recipes-security/optee/optee-os-tadevkit_4.0.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-os/0001-allow-setting-sysroot-for-libgcc-lookup.patch
 create mode 100644 meta-arm/recipes-security/optee/optee-os/0002-core-Define-section-attributes-for-clang.patch
 create mode 100644 meta-arm/recipes-security/optee/optee-os/0003-optee-enable-clang-support.patch
 create mode 100644 meta-arm/recipes-security/optee/optee-os/0004-core-link-add-no-warn-rwx-segments.patch
 rename meta-arm/recipes-security/optee/{optee-os_3.2%.bbappend => optee-os_4.%.bbappend} (87%)
 create mode 100644 meta-arm/recipes-security/optee/optee-os_4.0.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-test/0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-test_3.22.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-test_4.%.bbappend
 rename meta-arm/recipes-security/optee/{optee-test_3.2%.bbappend => optee-test_4.0.0.bb} (63%)
meta-arm-bsp/recipes-security/optee/optee-client_3.22.0.bb renamed from meta-arm/recipes-security/optee/optee-client_3.22.0.bb +1 -1
similarity index 73%
rename from meta-arm/recipes-security/optee/optee-client_3.22.0.bb
rename to meta-arm-bsp/recipes-security/optee/optee-client_3.22.0.bb
index d0c75d0c..904c2565 100644
@@ -1,4 +1,4 @@
-require optee-client.inc
+require recipes-security/optee/optee-client.inc
 
 SRCREV = "8533e0e6329840ee96cf81b6453f257204227e6c"
 
meta-arm-bsp/recipes-security/optee/optee-examples_3.22.0.bb renamed from meta-arm/recipes-security/optee/optee-examples_3.22.0.bb +1 -1
similarity index 51%
rename from meta-arm/recipes-security/optee/optee-examples_3.22.0.bb
rename to meta-arm-bsp/recipes-security/optee/optee-examples_3.22.0.bb
index 8322c513..f082a25d 100644
@@ -1,3 +1,3 @@
-require optee-examples.inc
+require recipes-security/optee/optee-examples.inc
 
 SRCREV = "378dc0db2d5dd279f58a3b6cb3f78ffd6b165035"
meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch renamed from meta-arm/recipes-security/optee/optee-os-3.22.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch +0 -0
similarity index 100%
rename from meta-arm/recipes-security/optee/optee-os-3.22.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch
rename to meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0001-allow-setting-sysroot-for-libgcc-lookup.patch
meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0002-core-Define-section-attributes-for-clang.patch renamed from meta-arm/recipes-security/optee/optee-os-3.22.0/0002-core-Define-section-attributes-for-clang.patch +0 -0
similarity index 100%
rename from meta-arm/recipes-security/optee/optee-os-3.22.0/0002-core-Define-section-attributes-for-clang.patch
rename to meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0002-core-Define-section-attributes-for-clang.patch
meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0003-optee-enable-clang-support.patch renamed from meta-arm/recipes-security/optee/optee-os-3.22.0/0003-optee-enable-clang-support.patch +0 -0
similarity index 100%
rename from meta-arm/recipes-security/optee/optee-os-3.22.0/0003-optee-enable-clang-support.patch
rename to meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0003-optee-enable-clang-support.patch
meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0004-core-link-add-no-warn-rwx-segments.patch renamed from meta-arm/recipes-security/optee/optee-os-3.22.0/0004-core-link-add-no-warn-rwx-segments.patch +0 -0
similarity index 100%
rename from meta-arm/recipes-security/optee/optee-os-3.22.0/0004-core-link-add-no-warn-rwx-segments.patch
rename to meta-arm-bsp/recipes-security/optee/optee-os-3.22.0/0004-core-link-add-no-warn-rwx-segments.patch
meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_3.22.0.bb renamed from meta-arm/recipes-security/optee/optee-os-tadevkit_3.22.0.bb +5 -0
similarity index 70%
rename from meta-arm/recipes-security/optee/optee-os-tadevkit_3.22.0.bb
rename to meta-arm-bsp/recipes-security/optee/optee-os-tadevkit_3.22.0.bb
index 3d958168..44496164 100644
@@ -22,3 +22,8 @@ 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-bsp/recipes-security/optee/optee-os_3.22.0.bb renamed from meta-arm/recipes-security/optee/optee-os_3.22.0.bb +1 -1
similarity index 89%
rename from meta-arm/recipes-security/optee/optee-os_3.22.0.bb
rename to meta-arm-bsp/recipes-security/optee/optee-os_3.22.0.bb
index eba2c037..e1220192 100644
@@ -1,4 +1,4 @@
-require optee-os.inc
+require recipes-security/optee/optee-os.inc
 
 DEPENDS += "dtc-native"
 
meta-arm-bsp/recipes-security/optee/optee-os_3.22.0.bbappend +3 -1
index b5493e5e..ee4ca17f 100644
@@ -1,5 +1,7 @@
-# Machine specific configurations
+# Include Trusted Services Secure Partitions
+require recipes-security/optee/optee-os-ts.inc
 
+# Machine specific configurations
 MACHINE_OPTEE_OS_REQUIRE ?= ""
 MACHINE_OPTEE_OS_REQUIRE:corstone1000 = "optee-os-corstone1000-common.inc"
 MACHINE_OPTEE_OS_REQUIRE:n1sdp = "optee-os-n1sdp.inc"
meta-arm-bsp/recipes-security/optee/optee-test_3.22.0.bb new file +18 -0
new file mode 100644
index 00000000..f1444a1d
@@ -0,0 +1,18 @@
+require recipes-security/optee/optee-test.inc
+
+SRC_URI += " \
+    file://0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch \
+   "
+SRCREV = "a286b57f1721af215ace318d5807e63f40186df6"
+
+EXTRA_OEMAKE:append = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}"
+DEPENDS:append = " openssl"
+CFLAGS:append = " -Wno-error=deprecated-declarations"
+
+# 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)}"
meta-arm/recipes-security/optee/optee-client_4.0.0.bb new file +7 -0
new file mode 100644
index 00000000..dc9577c2
@@ -0,0 +1,7 @@
+require recipes-security/optee/optee-client.inc
+
+SRCREV = "acb0885c117e73cb6c5c9b1dd9054cb3f93507ee"
+
+inherit pkgconfig
+DEPENDS += "util-linux"
+EXTRA_OEMAKE += "PKG_CONFIG=pkg-config"
meta-arm/recipes-security/optee/optee-examples_4.0.0.bb new file +3 -0
new file mode 100644
index 00000000..f082a25d
@@ -0,0 +1,3 @@
+require recipes-security/optee/optee-examples.inc
+
+SRCREV = "378dc0db2d5dd279f58a3b6cb3f78ffd6b165035"
meta-arm/recipes-security/optee/optee-os-tadevkit_3.2%.bbappend deleted +0 -4
deleted file mode 100644
index a9732e4c..00000000
@@ -1,4 +0,0 @@
-# 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-tadevkit_4.0.0.bb new file +29 -0
new file mode 100644
index 00000000..9fe2697e
@@ -0,0 +1,29 @@
+require optee-os_4.0.0.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/0001-allow-setting-sysroot-for-libgcc-lookup.patch new file +35 -0
new file mode 100644
index 00000000..b060952c
@@ -0,0 +1,35 @@
+From d94ad6c6efb71f683b183e84919122bb6f3ac65d Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Tue, 26 May 2020 14:38:02 -0500
+Subject: [PATCH] allow setting sysroot for libgcc lookup
+
+Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching
+for the compiler libraries as there's no easy way to reliably pass --sysroot
+otherwise.
+
+Upstream-Status: Pending [https://github.com/OP-TEE/optee_os/issues/4188]
+Signed-off-by: Ross Burton <[email protected]>
+
+---
+ mk/gcc.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/mk/gcc.mk b/mk/gcc.mk
+index adc77a24f..81bfa78ad 100644
+--- a/mk/gcc.mk
++++ b/mk/gcc.mk
+@@ -13,11 +13,11 @@ nostdinc$(sm)	:= -nostdinc -isystem $(shell $(CC$(sm)) \
+ 			-print-file-name=include 2> /dev/null)
+ 
+ # Get location of libgcc from gcc
+-libgcc$(sm)  	:= $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
++libgcc$(sm)  	:= $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
+ 			-print-libgcc-file-name 2> /dev/null)
+-libstdc++$(sm)	:= $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
++libstdc++$(sm)	:= $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
+ 			-print-file-name=libstdc++.a 2> /dev/null)
+-libgcc_eh$(sm)	:= $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
++libgcc_eh$(sm)	:= $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
+ 			-print-file-name=libgcc_eh.a 2> /dev/null)
+ 
+ # Define these to something to discover accidental use
meta-arm/recipes-security/optee/optee-os/0002-core-Define-section-attributes-for-clang.patch new file +241 -0

241 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-os/0003-optee-enable-clang-support.patch new file +30 -0
new file mode 100644
index 00000000..299a24ea
@@ -0,0 +1,30 @@
+From b33de2f059f1394028a94ee9da081fa6644b50a2 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: Pending
+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 a045beee8..1ebe2f702 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/0004-core-link-add-no-warn-rwx-segments.patch new file +63 -0

63 lines not on this page · raw message

meta-arm/recipes-security/optee/optee-os_4.%.bbappend renamed from meta-arm/recipes-security/optee/optee-os_3.2%.bbappend +1 -1
similarity index 87%
rename from meta-arm/recipes-security/optee/optee-os_3.2%.bbappend
rename to meta-arm/recipes-security/optee/optee-os_4.%.bbappend
index 09650b9a..4f4a0006 100644
@@ -1,5 +1,5 @@
 # Include Trusted Services Secure Partitions
-require optee-os-ts.inc
+require recipes-security/optee/optee-os-ts.inc
 
 # Conditionally include platform specific Trusted Services related OPTEE build parameters
 EXTRA_OEMAKE:append:qemuarm64-secureboot = "${@oe.utils.conditional('SP_PATHS', '', '', ' CFG_CORE_HEAP_SIZE=131072 CFG_TEE_BENCHMARK=n CFG_TEE_CORE_LOG_LEVEL=4 CFG_CORE_SEL1_SPMC=y ', d)}"
meta-arm/recipes-security/optee/optee-os_4.0.0.bb new file +13 -0
new file mode 100644
index 00000000..10b16aa0
@@ -0,0 +1,13 @@
+require recipes-security/optee/optee-os.inc
+
+DEPENDS += "dtc-native"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRCREV = "2a5b1d1232f582056184367fb58a425ac7478ec6"
+SRC_URI += " \
+    file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \
+    file://0002-core-Define-section-attributes-for-clang.patch \
+    file://0003-optee-enable-clang-support.patch \
+    file://0004-core-link-add-no-warn-rwx-segments.patch \
+   "
meta-arm/recipes-security/optee/optee-test/0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch deleted +0 -34
deleted file mode 100644
index 5e075d6f..00000000
@@ -1,34 +0,0 @@
-From ddd5ad19732c9a2a9fe236662a8d264c6b2b1a0a Mon Sep 17 00:00:00 2001
-From: Jon Mason <[email protected]>
-Date: Sat, 15 Jul 2023 15:08:43 -0400
-Subject: [PATCH] xtest: regression_1000: remove unneeded stat.h include
-
-Hack to work around musl compile error:
- In file included from optee-test/3.17.0-r0/recipe-sysroot/usr/include/sys/stat.h:23,
-                  from optee-test/3.17.0-r0/git/host/xtest/regression_1000.c:25:
- optee-test/3.17.0-r0/recipe-sysroot/usr/include/bits/stat.h:17:26: error: expected identifier or '(' before '[' token
-    17 |         unsigned __unused[2];
-       |                          ^
-
-stat.h is not needed, since it is not being used in this file.  So removing it.
-
-Upstream-Status: Backport [https://github.com/OP-TEE/optee_test/pull/688]
-Signed-off-by: Jon Mason <[email protected]>
-Reviewed-by: Jerome Forissier <[email protected]>
-Acked-by: Jens Wiklander <[email protected]>
----
- host/xtest/regression_1000.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/host/xtest/regression_1000.c b/host/xtest/regression_1000.c
-index cd11f933ce43..8e338e59da21 100644
---- a/host/xtest/regression_1000.c
-+++ b/host/xtest/regression_1000.c
-@@ -24,7 +24,6 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/stat.h>
- #include <sys/types.h>
- #include <ta_arm_bti.h>
- #include <ta_concurrent.h>
meta-arm/recipes-security/optee/optee-test_3.22.0.bb deleted +0 -10
deleted file mode 100644
index 5d3f5a8a..00000000
@@ -1,10 +0,0 @@
-require optee-test.inc
-
-SRC_URI += " \
-    file://0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch \
-   "
-SRCREV = "a286b57f1721af215ace318d5807e63f40186df6"
-
-EXTRA_OEMAKE:append = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}"
-DEPENDS:append = " openssl"
-CFLAGS:append = " -Wno-error=deprecated-declarations"
meta-arm/recipes-security/optee/optee-test_4.%.bbappend new file +0 -0
new file mode 100644
index 00000000..e69de29b
meta-arm/recipes-security/optee/optee-test_4.0.0.bb renamed from meta-arm/recipes-security/optee/optee-test_3.2%.bbappend +8 -0
similarity index 63%
rename from meta-arm/recipes-security/optee/optee-test_3.2%.bbappend
rename to meta-arm/recipes-security/optee/optee-test_4.0.0.bb
index c052774c..c5a473be 100644
@@ -1,3 +1,11 @@
+require recipes-security/optee/optee-test.inc
+
+SRCREV = "1c3d6be5eaa6174e3dbabf60928d15628e39b994"
+
+EXTRA_OEMAKE:append = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}"
+DEPENDS:append = " openssl"
+CFLAGS:append = " -Wno-error=deprecated-declarations"
+
 # 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', \
Signature · 1 line
2.30.2
Applied
#1 lore raw
Quoted 4 lines · Jon Mason

Update the recipes and patches for OP-TEE 4.0.0. Migrate the 3.22.0 recipe to meta-arm-bsp for corstone1000 and n1sdp.

Applied, thanks!

[1/1] arm/optee: update to 4.0.0

      commit: cddaf8cb0c15cb935a120a3cb81feaafe6b1bb71

Best regards,

Signature · 1 line
Jon Mason <[email protected]>
#2 lore raw
In reply to Jon Mason
Quoted 2 lines · Jon Mason

Update the recipes and patches for OP-TEE 4.0.0. Migrate the 3.22.0 recipe to meta-arm-bsp for corstone1000 and n1sdp.

This mostly looks good. I had couple minor comments/questions:

meta-arm-bsp/recipes-security/optee/optee-test_3.22.0.bb line 10

Quoted 3 lines
meta-arm-bsp/recipes-security/optee/optee-test_3.22.0.bb new file +3 -0
+EXTRA_OEMAKE:append = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}"
+DEPENDS:append = " openssl"
+CFLAGS:append = " -Wno-error=deprecated-declarations"

1. The above section can probably now be moved to generic .inc files, instead of needing to be added to each versioned .bb recipe - this is now generically applicable to all supported versions.

2. Do we really need non-machine-specific :append there? Since it adjusts the values set right there in the .inc file, it can now be done directly to those variables in the first place. Or at least use += instead of :append - those are much easier to override downstram.

FWIW, meta-ti already updated OPTEE components to 4.0.0 a bit earlier through .bbappends and had to make the same patch changes and used the same SRCREVs, so that can be considered some testing on those platforms :)

https://git.yoctoproject.org/meta-ti/commit/?id=26729b38d3890e2cf850e30ef1171f2fc2534043

Quoted 2 lines

---

[snip]

Quoted 6 lines
 .../recipes-security/optee/optee-os_4.0.0.bb  |  13 +
 ..._1000-remove-unneeded-stat.h-include.patch |  34 ---
 .../optee/optee-test_3.22.0.bb                |  10 -
 .../optee/optee-test_4.%.bbappend             |   0
 ...test_3.2%.bbappend => optee-test_4.0.0.bb} |   8 +
 24 files changed, 459 insertions(+), 53 deletions(-)

[snip]

Quoted 4 lines
 create mode 100644 meta-arm/recipes-security/optee/optee-os_4.0.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-test/0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-test_3.22.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-test_4.%.bbappend

This ^^^ creates an empty .bbappend file

Quoted 1 line
 rename meta-arm/recipes-security/optee/{optee-test_3.2%.bbappend => optee-test_4.0.0.bb} (63%)
Signature · 1 line
Denys
#3 lore raw
Quoted 35 lines · Denys Dmytriyenko
Quoted 2 lines · Jon Mason

Update the recipes and patches for OP-TEE 4.0.0. Migrate the 3.22.0 recipe to meta-arm-bsp for corstone1000 and n1sdp.

This mostly looks good. I had couple minor comments/questions:

meta-arm-bsp/recipes-security/optee/optee-test_3.22.0.bb line 10

Quoted 3 lines
meta-arm-bsp/recipes-security/optee/optee-test_3.22.0.bb new file +3 -0
+EXTRA_OEMAKE:append = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}"
+DEPENDS:append = " openssl"
+CFLAGS:append = " -Wno-error=deprecated-declarations"

1. The above section can probably now be moved to generic .inc files, instead of needing to be added to each versioned .bb recipe - this is now generically applicable to all supported versions.

2. Do we really need non-machine-specific :append there? Since it adjusts the values set right there in the .inc file, it can now be done directly to those variables in the first place. Or at least use += instead of :append - those are much easier to override downstram.

FWIW, meta-ti already updated OPTEE components to 4.0.0 a bit earlier through .bbappends and had to make the same patch changes and used the same SRCREVs, so that can be considered some testing on those platforms :)

https://git.yoctoproject.org/meta-ti/commit/?id=26729b38d3890e2cf850e30ef1171f2fc2534043

Quoted 2 lines

---

[snip]

Quoted 6 lines
 .../recipes-security/optee/optee-os_4.0.0.bb  |  13 +
 ..._1000-remove-unneeded-stat.h-include.patch |  34 ---
 .../optee/optee-test_3.22.0.bb                |  10 -
 .../optee/optee-test_4.%.bbappend             |   0
 ...test_3.2%.bbappend => optee-test_4.0.0.bb} |   8 +
 24 files changed, 459 insertions(+), 53 deletions(-)
Quoted 7 lines

[snip]

Quoted 4 lines
 create mode 100644 meta-arm/recipes-security/optee/optee-os_4.0.0.bb
 delete mode 100644 meta-arm/recipes-security/optee/optee-test/0001-xtest-regression_1000-remove-unneeded-stat.h-include.patch
 delete mode 100644 meta-arm/recipes-security/optee/optee-test_3.22.0.bb
 create mode 100644 meta-arm/recipes-security/optee/optee-test_4.%.bbappend

This ^^^ creates an empty .bbappend file

Thanks for the review. I'll make these changes as a separate commit, as I had already merged this before seeing your response. Patch in-bound.

Thanks,
Jon

Quoted 7 lines
Quoted 3 lines

 rename meta-arm/recipes-security/optee/{optee-test_3.2%.bbappend => optee-test_4.0.0.bb} (63%)
Signature · 1 line
Denys