summaryrefslogtreecommitdiffstats
path: root/recipes-security/optee-imx
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/optee-imx')
-rw-r--r--recipes-security/optee-imx/optee-client-fslc.inc10
-rw-r--r--recipes-security/optee-imx/optee-fslc.inc2
-rw-r--r--recipes-security/optee-imx/optee-os-common-fslc-imx.inc42
-rw-r--r--recipes-security/optee-imx/optee-os-fslc.inc9
-rw-r--r--recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc2
-rw-r--r--recipes-security/optee-imx/optee-test-fslc-imx.inc6
-rw-r--r--recipes-security/optee-imx/optee-test-fslc.inc14
-rw-r--r--recipes-security/optee-imx/optee-test_4.8.0.imx.bb1
8 files changed, 44 insertions, 42 deletions
diff --git a/recipes-security/optee-imx/optee-client-fslc.inc b/recipes-security/optee-imx/optee-client-fslc.inc
index ab7c8bc69..61629209d 100644
--- a/recipes-security/optee-imx/optee-client-fslc.inc
+++ b/recipes-security/optee-imx/optee-client-fslc.inc
@@ -10,14 +10,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
10 10
11inherit systemd update-rc.d cmake useradd 11inherit systemd update-rc.d cmake useradd
12 12
13SRC_URI = " \ 13SRC_URI = "\
14 git://github.com/OP-TEE/optee_client.git;branch=master;protocol=https \ 14 git://github.com/OP-TEE/optee_client.git;branch=master;protocol=https \
15 file://tee-supplicant.sh \ 15 file://tee-supplicant.sh \
16" 16"
17 17
18UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" 18UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$"
19 19
20EXTRA_OECMAKE = " \ 20EXTRA_OECMAKE = "\
21 -DBUILD_SHARED_LIBS=ON \ 21 -DBUILD_SHARED_LIBS=ON \
22 -DCFG_USE_PKGCONFIG=ON \ 22 -DCFG_USE_PKGCONFIG=ON \
23" 23"
@@ -25,9 +25,9 @@ EXTRA_OECMAKE = " \
25# libts uses /dev/tee devices too. Add a common variable to allow configuring the same group. 25# libts uses /dev/tee devices too. Add a common variable to allow configuring the same group.
26TEE_GROUP_NAME ?= "tee" 26TEE_GROUP_NAME ?= "tee"
27 27
28EXTRA_OECMAKE += " -DCFG_ENABLE_SYSTEMD=On -DSYSTEMD_UNIT_DIR=${systemd_system_unitdir}/" 28EXTRA_OECMAKE += "-DCFG_ENABLE_SYSTEMD=On -DSYSTEMD_UNIT_DIR=${systemd_system_unitdir}/"
29EXTRA_OECMAKE += " -DCFG_ENABLE_UDEV=On -DUDEV_UDEV_DIR=${nonarch_base_libdir}/udev/rules.d/" 29EXTRA_OECMAKE += "-DCFG_ENABLE_UDEV=On -DUDEV_UDEV_DIR=${nonarch_base_libdir}/udev/rules.d/"
30EXTRA_OECMAKE += " -DCFG_TEE_GROUP=${TEE_GROUP_NAME} -DCFG_TEEPRIV_GROUP=teepriv" 30EXTRA_OECMAKE += "-DCFG_TEE_GROUP=${TEE_GROUP_NAME} -DCFG_TEEPRIV_GROUP=teepriv"
31 31
32EXTRA_OECMAKE:append:toolchain-clang = " -DCFG_WERROR=0" 32EXTRA_OECMAKE:append:toolchain-clang = " -DCFG_WERROR=0"
33 33
diff --git a/recipes-security/optee-imx/optee-fslc.inc b/recipes-security/optee-imx/optee-fslc.inc
index dadbfa802..906001d24 100644
--- a/recipes-security/optee-imx/optee-fslc.inc
+++ b/recipes-security/optee-imx/optee-fslc.inc
@@ -28,7 +28,7 @@ EXTRA_OEMAKE += "V=1 \
28 COMPILER=${TOOLCHAIN} \ 28 COMPILER=${TOOLCHAIN} \
29 OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \ 29 OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \
30 TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \ 30 TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \
31 " 31 "
32# python3-cryptography needs the legacy provider, so set OPENSSL_MODULES to the 32# python3-cryptography needs the legacy provider, so set OPENSSL_MODULES to the
33# right path until this is relocated automatically. 33# right path until this is relocated automatically.
34export OPENSSL_MODULES = "${STAGING_LIBDIR_NATIVE}/ossl-modules" 34export OPENSSL_MODULES = "${STAGING_LIBDIR_NATIVE}/ossl-modules"
diff --git a/recipes-security/optee-imx/optee-os-common-fslc-imx.inc b/recipes-security/optee-imx/optee-os-common-fslc-imx.inc
index 16ed8cea7..ed11d0ca6 100644
--- a/recipes-security/optee-imx/optee-os-common-fslc-imx.inc
+++ b/recipes-security/optee-imx/optee-os-common-fslc-imx.inc
@@ -2,7 +2,7 @@
2# See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L39 2# See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L39
3require optee-os-fslc.inc 3require optee-os-fslc.inc
4 4
5DEPENDS:append:arm = "u-boot-mkimage-native" 5DEPENDS:append:arm = " u-boot-mkimage-native"
6 6
7FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os:" 7FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os:"
8 8
@@ -18,26 +18,26 @@ inherit features_check
18 18
19REQUIRED_MACHINE_FEATURES = "optee" 19REQUIRED_MACHINE_FEATURES = "optee"
20 20
21OPTEEMACHINE = "imx-${@d.getVar('MACHINE')[1:]}" 21OPTEEMACHINE = "imx-${@d.getVar('MACHINE')[1:]}"
22OPTEEMACHINE:imx6qpdlsolox = "imx-mx6qsabresd" 22OPTEEMACHINE:imx6qpdlsolox = "imx-mx6qsabresd"
23OPTEEMACHINE:mx6ul-nxp-bsp = "imx-mx6ulevk" 23OPTEEMACHINE:mx6ul-nxp-bsp = "imx-mx6ulevk"
24OPTEEMACHINE:mx6ull-nxp-bsp = "imx-mx6ullevk" 24OPTEEMACHINE:mx6ull-nxp-bsp = "imx-mx6ullevk"
25OPTEEMACHINE:mx6ulz-nxp-bsp = "imx-mx6ulzevk" 25OPTEEMACHINE:mx6ulz-nxp-bsp = "imx-mx6ulzevk"
26OPTEEMACHINE:mx8mq-nxp-bsp = "imx-mx8mqevk" 26OPTEEMACHINE:mx8mq-nxp-bsp = "imx-mx8mqevk"
27OPTEEMACHINE:mx8mm-nxp-bsp = "imx-mx8mmevk" 27OPTEEMACHINE:mx8mm-nxp-bsp = "imx-mx8mmevk"
28OPTEEMACHINE:mx8mn-nxp-bsp = "imx-mx8mnevk" 28OPTEEMACHINE:mx8mn-nxp-bsp = "imx-mx8mnevk"
29OPTEEMACHINE:mx8mp-nxp-bsp = "imx-mx8mpevk" 29OPTEEMACHINE:mx8mp-nxp-bsp = "imx-mx8mpevk"
30OPTEEMACHINE:mx8mpul-nxp-bsp = "imx-mx8mpevk" 30OPTEEMACHINE:mx8mpul-nxp-bsp = "imx-mx8mpevk"
31OPTEEMACHINE:mx8qm-nxp-bsp = "imx-mx8qmmek" 31OPTEEMACHINE:mx8qm-nxp-bsp = "imx-mx8qmmek"
32OPTEEMACHINE:mx8qxp-nxp-bsp = "imx-mx8qxpmek" 32OPTEEMACHINE:mx8qxp-nxp-bsp = "imx-mx8qxpmek"
33OPTEEMACHINE:mx8dx-nxp-bsp = "imx-mx8dxmek" 33OPTEEMACHINE:mx8dx-nxp-bsp = "imx-mx8dxmek"
34OPTEEMACHINE:mx8dxl-nxp-bsp = "imx-mx8dxlevk" 34OPTEEMACHINE:mx8dxl-nxp-bsp = "imx-mx8dxlevk"
35OPTEEMACHINE:mx8mnul-nxp-bsp = "imx-mx8mnevk" 35OPTEEMACHINE:mx8mnul-nxp-bsp = "imx-mx8mnevk"
36OPTEEMACHINE:mx8ulp-nxp-bsp = "imx-mx8ulpevk" 36OPTEEMACHINE:mx8ulp-nxp-bsp = "imx-mx8ulpevk"
37OPTEEMACHINE:mx91-nxp-bsp = "imx-mx91evk" 37OPTEEMACHINE:mx91-nxp-bsp = "imx-mx91evk"
38OPTEEMACHINE:mx93-nxp-bsp = "imx-mx93evk" 38OPTEEMACHINE:mx93-nxp-bsp = "imx-mx93evk"
39OPTEEMACHINE:mx943-nxp-bsp = "imx-mx943evk" 39OPTEEMACHINE:mx943-nxp-bsp = "imx-mx943evk"
40OPTEEMACHINE:mx95-nxp-bsp = "imx-mx95evk" 40OPTEEMACHINE:mx95-nxp-bsp = "imx-mx95evk"
41 41
42# Strip the leading imx- 42# Strip the leading imx-
43PLATFORM_FLAVOR = "${@d.getVar('OPTEEMACHINE')[4:]}" 43PLATFORM_FLAVOR = "${@d.getVar('OPTEEMACHINE')[4:]}"
diff --git a/recipes-security/optee-imx/optee-os-fslc.inc b/recipes-security/optee-imx/optee-os-fslc.inc
index febdd2c73..b36810c60 100644
--- a/recipes-security/optee-imx/optee-os-fslc.inc
+++ b/recipes-security/optee-imx/optee-os-fslc.inc
@@ -13,7 +13,7 @@ require optee-fslc.inc
13 13
14CVE_PRODUCT = "linaro:op-tee op-tee:op-tee_os" 14CVE_PRODUCT = "linaro:op-tee op-tee:op-tee_os"
15 15
16DEPENDS = "python3-pyelftools-native python3-cryptography-native" 16DEPENDS = "python3-cryptography-native python3-pyelftools-native"
17 17
18DEPENDS:append:toolchain-clang = " lld-native compiler-rt" 18DEPENDS:append:toolchain-clang = " lld-native compiler-rt"
19 19
@@ -21,7 +21,7 @@ SRC_URI = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https"
21 21
22B = "${WORKDIR}/build" 22B = "${WORKDIR}/build"
23 23
24EXTRA_OEMAKE += " \ 24EXTRA_OEMAKE += "\
25 PLATFORM=${OPTEEMACHINE} \ 25 PLATFORM=${OPTEEMACHINE} \
26 CFG_${OPTEE_CORE}_core=y \ 26 CFG_${OPTEE_CORE}_core=y \
27 CROSS_COMPILE_core=${HOST_PREFIX} \ 27 CROSS_COMPILE_core=${HOST_PREFIX} \
@@ -30,8 +30,8 @@ EXTRA_OEMAKE += " \
30 ta-targets=ta_${OPTEE_ARCH} \ 30 ta-targets=ta_${OPTEE_ARCH} \
31 O=${B} \ 31 O=${B} \
32" 32"
33EXTRA_OEMAKE += " HOST_PREFIX=${HOST_PREFIX}" 33EXTRA_OEMAKE += "HOST_PREFIX=${HOST_PREFIX}"
34EXTRA_OEMAKE += " CROSS_COMPILE64=${HOST_PREFIX}" 34EXTRA_OEMAKE += "CROSS_COMPILE64=${HOST_PREFIX}"
35 35
36# Enable BTI in optee 36# Enable BTI in optee
37EXTRA_OEMAKE += "${@bb.utils.contains('MACHINE_FEATURES', 'arm-branch-protection', ' CFG_TA_BTI=1 CFG_CORE_PAUTH=y CFG_TA_PAUTH=y', '', d)}" 37EXTRA_OEMAKE += "${@bb.utils.contains('MACHINE_FEATURES', 'arm-branch-protection', ' CFG_TA_BTI=1 CFG_CORE_PAUTH=y CFG_TA_PAUTH=y', '', d)}"
@@ -74,7 +74,6 @@ PACKAGES += "${PN}-ta"
74FILES:${PN} = "${nonarch_base_libdir}/firmware/" 74FILES:${PN} = "${nonarch_base_libdir}/firmware/"
75FILES:${PN}-ta = "${nonarch_base_libdir}/optee_armtz/*" 75FILES:${PN}-ta = "${nonarch_base_libdir}/optee_armtz/*"
76 76
77
78# note: "textrel" is not triggered on all archs 77# note: "textrel" is not triggered on all archs
79INSANE_SKIP:${PN} = "textrel" 78INSANE_SKIP:${PN} = "textrel"
80INSANE_SKIP:${PN}-dev = "staticdev" 79INSANE_SKIP:${PN}-dev = "staticdev"
diff --git a/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc b/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc
index 68918414c..0fac7771f 100644
--- a/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc
+++ b/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc
@@ -18,7 +18,7 @@ do_install() {
18} 18}
19 19
20do_deploy() { 20do_deploy() {
21 echo "Do not inherit do_deploy from optee-os." 21 echo "Do not inherit do_deploy from optee-os."
22} 22}
23 23
24FILES:${PN} = "${includedir}/optee/" 24FILES:${PN} = "${includedir}/optee/"
diff --git a/recipes-security/optee-imx/optee-test-fslc-imx.inc b/recipes-security/optee-imx/optee-test-fslc-imx.inc
index 2c0d278e3..23e22bc9f 100644
--- a/recipes-security/optee-imx/optee-test-fslc-imx.inc
+++ b/recipes-security/optee-imx/optee-test-fslc-imx.inc
@@ -4,6 +4,10 @@ require optee-test-fslc.inc
4 4
5DEPENDS += "openssl" 5DEPENDS += "openssl"
6 6
7inherit features_check
8
9REQUIRED_MACHINE_FEATURES = "optee"
10
7FILESEXTRAPATHS:prepend := "${THISDIR}/optee-test:" 11FILESEXTRAPATHS:prepend := "${THISDIR}/optee-test:"
8 12
9SRC_URI:remove = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https" 13SRC_URI:remove = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https"
@@ -13,6 +17,6 @@ OPTEE_TEST_SRC ?= "git://github.com/nxp-imx/imx-optee-test.git;protocol=https"
13 17
14EXTRA_OEMAKE:append:libc-musl = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}" 18EXTRA_OEMAKE:append:libc-musl = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}"
15CFLAGS:append:libc-musl = " -Wno-error=deprecated-declarations" 19CFLAGS:append:libc-musl = " -Wno-error=deprecated-declarations"
16CFLAGS += " -Wno-error=unterminated-string-initialization" 20CFLAGS += "-Wno-error=unterminated-string-initialization"
17 21
18COMPATIBLE_MACHINE = "(imx-nxp-bsp)" 22COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-security/optee-imx/optee-test-fslc.inc b/recipes-security/optee-imx/optee-test-fslc.inc
index a5183b7e1..e0870a3a3 100644
--- a/recipes-security/optee-imx/optee-test-fslc.inc
+++ b/recipes-security/optee-imx/optee-test-fslc.inc
@@ -5,18 +5,18 @@ SUMMARY = "OP-TEE sanity testsuite"
5DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite" 5DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite"
6HOMEPAGE = "https://www.op-tee.org/" 6HOMEPAGE = "https://www.op-tee.org/"
7 7
8LICENSE = "BSD-2-Clause & GPL-2.0-only" 8LICENSE = "BSD-2-Clause AND GPL-2.0-only"
9 9
10inherit python3native ptest 10inherit python3native ptest
11inherit deploy 11inherit deploy
12require optee-fslc.inc 12require optee-fslc.inc
13 13
14DEPENDS = "optee-client optee-os-tadevkit python3-cryptography-native openssl" 14DEPENDS = "openssl optee-client optee-os-tadevkit python3-cryptography-native"
15DEPENDS:append:toolchain-clang = " lld-native" 15DEPENDS:append:toolchain-clang = " lld-native"
16 16
17SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \ 17SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \
18 file://run-ptest \ 18 file://run-ptest \
19 " 19 "
20 20
21B = "${WORKDIR}/build" 21B = "${WORKDIR}/build"
22 22
@@ -25,7 +25,7 @@ EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
25 CROSS_COMPILE_HOST=${HOST_PREFIX} \ 25 CROSS_COMPILE_HOST=${HOST_PREFIX} \
26 CROSS_COMPILE_TA=${HOST_PREFIX} \ 26 CROSS_COMPILE_TA=${HOST_PREFIX} \
27 O=${B} \ 27 O=${B} \
28 " 28 "
29 29
30CFLAGS += "-Wno-error=deprecated-declarations" 30CFLAGS += "-Wno-error=deprecated-declarations"
31 31
@@ -43,9 +43,9 @@ do_install () {
43 43
44 # install path should match the value set in optee-client/tee-supplicant 44 # install path should match the value set in optee-client/tee-supplicant
45 # default TEEC_LOAD_PATH is /lib 45 # default TEEC_LOAD_PATH is /lib
46 mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ 46 install -d ${D}${nonarch_base_libdir}/optee_armtz/
47 install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ 47 install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/
48 mkdir -p ${D}${libdir}/tee-supplicant/plugins 48 install -d ${D}${libdir}/tee-supplicant/plugins
49 install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/ 49 install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/
50} 50}
51 51
@@ -58,7 +58,7 @@ addtask deploy before do_build after do_install
58 58
59FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \ 59FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \
60 ${libdir}/tee-supplicant/plugins/ \ 60 ${libdir}/tee-supplicant/plugins/ \
61 " 61 "
62 62
63# Imports machine specific configs from staging to build 63# Imports machine specific configs from staging to build
64PACKAGE_ARCH = "${MACHINE_ARCH}" 64PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-security/optee-imx/optee-test_4.8.0.imx.bb b/recipes-security/optee-imx/optee-test_4.8.0.imx.bb
index 2f2b40e09..42d525855 100644
--- a/recipes-security/optee-imx/optee-test_4.8.0.imx.bb
+++ b/recipes-security/optee-imx/optee-test_4.8.0.imx.bb
@@ -8,6 +8,5 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560 \
8 file://LICENSE-BSD;md5=dca16d6efa93b55d0fd662ae5cd6feeb \ 8 file://LICENSE-BSD;md5=dca16d6efa93b55d0fd662ae5cd6feeb \
9 file://LICENSE-GPL;md5=10e86b5d2a6cb0e2b9dcfdd26a9ac58d" 9 file://LICENSE-GPL;md5=10e86b5d2a6cb0e2b9dcfdd26a9ac58d"
10 10
11
12SRCBRANCH = "lf-6.18.2_1.0.0" 11SRCBRANCH = "lf-6.18.2_1.0.0"
13SRCREV = "3383a744a5997fdb3457b3cbe95aea3ce27879b3" 12SRCREV = "3383a744a5997fdb3457b3cbe95aea3ce27879b3"