1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-05 02:20:30 +00:00

arm/optee: update to 4.1

Add 4.1.0 recipes and move 4.0.0 to meta-arm-bsp for n1sdp

Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Jon Mason
2024-01-26 10:12:35 -05:00
parent b422688735
commit 5a78c75f35
17 changed files with 129 additions and 2 deletions
@@ -37,8 +37,7 @@ UBOOT_ARCH = "arm"
UBOOT_EXTLINUX = "0"
#optee
PREFERRED_VERSION_optee-os ?= "4.0.%"
PREFERRED_VERSION_optee-client ?= "3.22%"
PREFERRED_VERSION_optee-os ?= "4.1.%"
EXTRA_IMAGEDEPENDS += "optee-os"
OPTEE_ARCH = "arm64"
OPTEE_BINARY = "tee-pager_v2.bin"
+3
View File
@@ -38,6 +38,9 @@ PREFERRED_VERSION_edk2-firmware ?= "202305"
#optee
PREFERRED_VERSION_optee-os ?= "4.0.%"
PREFERRED_VERSION_optee-os-tadevkit ?= "4.0.%"
PREFERRED_VERSION_optee-test ?= "4.0.%"
PREFERRED_VERSION_optee-client ?= "4.0.%"
#grub-efi
EFI_PROVIDER ?= "grub-efi"
@@ -0,0 +1,30 @@
From 59d4c190eae11c93b26cca5a7b005a17dadc8248 Mon Sep 17 00:00:00 2001
From: Brett Warren <brett.warren@arm.com>
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 <brett.warren@arm.com>
---
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
@@ -0,0 +1,7 @@
require recipes-security/optee/optee-client.inc
SRCREV = "f7e4ced15d1fefd073bbfc484fe0e1f74afe96c2"
inherit pkgconfig
DEPENDS += "util-linux"
EXTRA_OEMAKE += "PKG_CONFIG=pkg-config"
@@ -0,0 +1,3 @@
require recipes-security/optee/optee-examples.inc
SRCREV = "378dc0db2d5dd279f58a3b6cb3f78ffd6b165035"
@@ -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)}"
@@ -0,0 +1,10 @@
require recipes-security/optee/optee-os.inc
DEPENDS += "dtc-native"
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRCREV = "18b424c23aa5a798dfe2e4d20b4bde3919dc4e99"
SRC_URI += " \
file://0003-optee-enable-clang-support.patch \
"
@@ -0,0 +1,34 @@
From 236ebb968a298fa5d461e734559ad8a13b667eb6 Mon Sep 17 00:00:00 2001
From: Jon Mason <jon.mason@arm.com>
Date: Wed, 24 Jan 2024 11:35:50 -0500
Subject: [PATCH] xtest: stats: remove unneeded stat.h include
Hack to work around musl compile error:
| In file included from optee-test/4.1.0/recipe-sysroot/usr/include/sys/stat.h:23,
| from optee-test/4.1.0/git/host/xtest/stats.c:17:
| optee-test/4.1.0/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: Inappropriate [https://github.com/OP-TEE/optee_test/issues/722]
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
host/xtest/stats.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/host/xtest/stats.c b/host/xtest/stats.c
index fb16d55586da..05aa3adac611 100644
--- a/host/xtest/stats.c
+++ b/host/xtest/stats.c
@@ -14,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat.h>
#include <sys/types.h>
#include <tee_client_api.h>
#include <unistd.h>
@@ -0,0 +1,12 @@
require recipes-security/optee/optee-test.inc
SRCREV = "2e1e7a9c9d659585566a75fc8802f4758c42bcb2"
SRC_URI += "file://0001-xtest-stats-remove-unneeded-stat.h-include.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)}"