summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx/optee-fslc.inc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/optee-imx/optee-fslc.inc')
-rw-r--r--recipes-security/optee-imx/optee-fslc.inc50
1 files changed, 32 insertions, 18 deletions
diff --git a/recipes-security/optee-imx/optee-fslc.inc b/recipes-security/optee-imx/optee-fslc.inc
index 6c96dc2bc..c89746dc4 100644
--- a/recipes-security/optee-imx/optee-fslc.inc
+++ b/recipes-security/optee-imx/optee-fslc.inc
@@ -1,26 +1,40 @@
1HOMEPAGE = "http://www.optee.org/" 1# Copied from meta-arm/recipes-security/optee/optee.inc.
2# See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-scarthgap/imx-6.6.52-2.2.0.xml#L30
2 3
3inherit python3native features_check 4UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$"
4 5
5REQUIRED_MACHINE_FEATURES = "optee" 6COMPATIBLE_MACHINE ?= "invalid"
7COMPATIBLE_MACHINE:qemuarm64 ?= "qemuarm64"
8COMPATIBLE_MACHINE:qemuarm ?= "qemuarm"
9# Please add supported machines below or set it in .bbappend or .conf
6 10
7DEPENDS = "python3-cryptography-native" 11OPTEEMACHINE ?= "${MACHINE}"
12OPTEEMACHINE:aarch64:qemuall ?= "vexpress-qemu_armv8a"
13OPTEEMACHINE:arm:qemuall ?= "vexpress-qemu_virt"
8 14
9S = "${WORKDIR}/git" 15OPTEE_ARCH = "null"
10B = "${WORKDIR}/build" 16OPTEE_ARCH:arm = "arm32"
11
12OPTEE_ARCH:arm = "arm32"
13OPTEE_ARCH:aarch64 = "arm64" 17OPTEE_ARCH:aarch64 = "arm64"
18OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
19
20OPTEE_TOOLCHAIN = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
21OPTEE_COMPILER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "clang-layer", "${OPTEE_TOOLCHAIN}", "gcc", d)}"
14 22
15COMPILER ?= "gcc" 23# Set here but not passed to EXTRA_OEMAKE by default as that breaks
16COMPILER:toolchain-clang = "clang" 24# the optee-os build
25TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
26
27EXTRA_OEMAKE += "V=1 \
28 LIBGCC_LOCATE_CFLAGS='${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \
29 COMPILER=${OPTEE_COMPILER} \
30 OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \
31 TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \
32 "
33# python3-cryptography needs the legacy provider, so set OPENSSL_MODULES to the
34# right path until this is relocated automatically.
35export OPENSSL_MODULES = "${STAGING_LIBDIR_NATIVE}/ossl-modules"
17 36
18CFLAGS += "--sysroot=${STAGING_DIR_HOST}" 37CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
19CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" 38
20 39# See the rationale in https://github.com/f-secure-foundry/advisories/blob/master/Security_Advisory-Ref_FSC-HWSEC-VR2021-0001-OP-TEE_TrustZone_bypass.txt.
21EXTRA_OEMAKE = " \ 40CVE_STATUS[CVE-2021-36133] = "disputed: devices shipped open for development purposes"
22 COMPILER=${COMPILER} \
23 OPENSSL_MODULES=${STAGING_LIBDIR_NATIVE}/ossl-modules \
24 OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${exec_prefix} \
25 -C ${S} O=${B} \
26"