summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2023-05-02 12:56:54 -0300
committerGitHub <noreply@github.com>2023-05-02 12:56:54 -0300
commit465598263e416459f36a49c396133e44574c528e (patch)
tree85ac41f4ac59a1d7e66d91b6e048c69d752e7161
parent91a9885b98de7dcb7de9551d7a5d5f1b9da651c8 (diff)
parente2bef5cbf00ae9d704ee5e7d5fa5ad94e818319b (diff)
downloadmeta-freescale-465598263e416459f36a49c396133e44574c528e.tar.gz
Merge pull request #1521 from Freescale/backport-1518-to-mickledore
[Backport mickledore] Update optee* to NXP BSP release L6.1.1-1.0.0
-rw-r--r--recipes-security/optee-imx/optee-client-fslc-imx.inc7
-rw-r--r--recipes-security/optee-imx/optee-client-fslc.inc42
-rw-r--r--recipes-security/optee-imx/optee-client_3.19.0.imx.bb50
-rw-r--r--recipes-security/optee-imx/optee-fslc.inc26
-rw-r--r--recipes-security/optee-imx/optee-os-fslc-imx.inc26
-rw-r--r--recipes-security/optee-imx/optee-os-fslc.inc78
-rw-r--r--recipes-security/optee-imx/optee-os_3.19.0.imx.bb131
-rw-r--r--recipes-security/optee-imx/optee-test-fslc.inc38
-rw-r--r--recipes-security/optee-imx/optee-test_3.19.0.imx.bb60
9 files changed, 231 insertions, 227 deletions
diff --git a/recipes-security/optee-imx/optee-client-fslc-imx.inc b/recipes-security/optee-imx/optee-client-fslc-imx.inc
new file mode 100644
index 00000000..4cfe18bf
--- /dev/null
+++ b/recipes-security/optee-imx/optee-client-fslc-imx.inc
@@ -0,0 +1,7 @@
1# Copyright (C) 2017-2021 NXP
2
3require optee-client-fslc.inc
4
5SRC_URI += "git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH}"
6
7COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-security/optee-imx/optee-client-fslc.inc b/recipes-security/optee-imx/optee-client-fslc.inc
new file mode 100644
index 00000000..92f9f1d1
--- /dev/null
+++ b/recipes-security/optee-imx/optee-client-fslc.inc
@@ -0,0 +1,42 @@
1# Copyright (C) 2017-2021 NXP
2
3SUMMARY = "OPTEE Client libs"
4HOMEPAGE = "http://www.optee.org/"
5LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
7
8SRC_URI = "file://tee-supplicant.service"
9
10S = "${WORKDIR}/git"
11B = "${WORKDIR}/build"
12
13inherit python3native systemd features_check pkgconfig
14
15DEPENDS = "util-linux-libuuid"
16
17REQUIRED_MACHINE_FEATURES = "optee"
18
19SYSTEMD_SERVICE:${PN} = "tee-supplicant.service"
20
21EXTRA_OEMAKE = " \
22 -C ${S} O=${B} \
23"
24
25do_install () {
26 oe_runmake -C ${S} install
27
28 install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0.0
29 ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1
30 ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so
31
32 install -D -p -m0644 ${B}/export/usr/lib/libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1.0
33 ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0
34 ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so
35
36 install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant
37
38 cp -a ${B}/export/usr/include ${D}${includedir}
39
40 sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${WORKDIR}/tee-supplicant.service
41 install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
42}
diff --git a/recipes-security/optee-imx/optee-client_3.19.0.imx.bb b/recipes-security/optee-imx/optee-client_3.19.0.imx.bb
index b0fb9178..102b3ce9 100644
--- a/recipes-security/optee-imx/optee-client_3.19.0.imx.bb
+++ b/recipes-security/optee-imx/optee-client_3.19.0.imx.bb
@@ -1,48 +1,4 @@
1# Copyright (C) 2017-2021 NXP 1require optee-client-fslc-imx.inc
2 2
3SUMMARY = "OPTEE Client libs" 3SRCBRANCH = "lf-6.1.1_1.0.0"
4HOMEPAGE = "http://www.optee.org/" 4SRCREV = "01231b7a7ce03cdf9d3f48e7baa0bce17aac28f7"
5LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
7
8SRC_URI = " \
9 git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \
10 file://tee-supplicant.service"
11SRCBRANCH = "lf-5.15.71_2.2.0"
12SRCREV = "644022f8970c832a40be00747fcec70c7b5d488c"
13
14S = "${WORKDIR}/git"
15B = "${WORKDIR}/build"
16
17inherit python3native systemd features_check pkgconfig
18
19DEPENDS = "util-linux-libuuid"
20
21REQUIRED_MACHINE_FEATURES = "optee"
22
23SYSTEMD_SERVICE:${PN} = "tee-supplicant.service"
24
25EXTRA_OEMAKE = " \
26 -C ${S} O=${B} \
27"
28
29do_install () {
30 oe_runmake -C ${S} install
31
32 install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0.0
33 ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1
34 ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so
35
36 install -D -p -m0644 ${B}/export/usr/lib/libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1.0
37 ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0
38 ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so
39
40 install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant
41
42 cp -a ${B}/export/usr/include ${D}${includedir}
43
44 sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${WORKDIR}/tee-supplicant.service
45 install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
46}
47
48COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-security/optee-imx/optee-fslc.inc b/recipes-security/optee-imx/optee-fslc.inc
new file mode 100644
index 00000000..6c96dc2b
--- /dev/null
+++ b/recipes-security/optee-imx/optee-fslc.inc
@@ -0,0 +1,26 @@
1HOMEPAGE = "http://www.optee.org/"
2
3inherit python3native features_check
4
5REQUIRED_MACHINE_FEATURES = "optee"
6
7DEPENDS = "python3-cryptography-native"
8
9S = "${WORKDIR}/git"
10B = "${WORKDIR}/build"
11
12OPTEE_ARCH:arm = "arm32"
13OPTEE_ARCH:aarch64 = "arm64"
14
15COMPILER ?= "gcc"
16COMPILER:toolchain-clang = "clang"
17
18CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
19CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
20
21EXTRA_OEMAKE = " \
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"
diff --git a/recipes-security/optee-imx/optee-os-fslc-imx.inc b/recipes-security/optee-imx/optee-os-fslc-imx.inc
new file mode 100644
index 00000000..6b72e827
--- /dev/null
+++ b/recipes-security/optee-imx/optee-os-fslc-imx.inc
@@ -0,0 +1,26 @@
1require optee-os-fslc.inc
2
3SRC_URI = "git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH}"
4
5# The platform flavor corresponds to the Yocto machine without the leading 'i'.
6PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}"
7PLATFORM_FLAVOR:imx6qdlsabresd = "mx6qsabresd"
8PLATFORM_FLAVOR:imx6qdlsabreauto = "mx6qsabreauto"
9PLATFORM_FLAVOR:imx6qpdlsolox = "mx6qsabresd"
10PLATFORM_FLAVOR:mx6ul-nxp-bsp = "mx6ulevk"
11PLATFORM_FLAVOR:mx6ull-nxp-bsp = "mx6ullevk"
12PLATFORM_FLAVOR:mx6ulz-nxp-bsp = "mx6ulzevk"
13PLATFORM_FLAVOR:mx8mq-nxp-bsp = "mx8mqevk"
14PLATFORM_FLAVOR:mx8mm-nxp-bsp = "mx8mmevk"
15PLATFORM_FLAVOR:mx8mn-nxp-bsp = "mx8mnevk"
16PLATFORM_FLAVOR:mx8mnul-nxp-bsp = "mx8mnevk"
17PLATFORM_FLAVOR:mx8mp-nxp-bsp = "mx8mpevk"
18PLATFORM_FLAVOR:mx8mpul-nxp-bsp = "mx8mpevk"
19PLATFORM_FLAVOR:mx8qm-nxp-bsp = "mx8qmmek"
20PLATFORM_FLAVOR:mx8qxp-nxp-bsp = "mx8qxpmek"
21PLATFORM_FLAVOR:mx8dx-nxp-bsp = "mx8dxmek"
22PLATFORM_FLAVOR:mx8dxl-nxp-bsp = "mx8dxlevk"
23PLATFORM_FLAVOR:mx8ulp-nxp-bsp = "mx8ulpevk"
24PLATFORM_FLAVOR:mx93-nxp-bsp = "mx93evk"
25
26COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-security/optee-imx/optee-os-fslc.inc b/recipes-security/optee-imx/optee-os-fslc.inc
new file mode 100644
index 00000000..faa8c993
--- /dev/null
+++ b/recipes-security/optee-imx/optee-os-fslc.inc
@@ -0,0 +1,78 @@
1# Copyright (C) 2017-2021 NXP
2
3SUMMARY = "OPTEE OS"
4DESCRIPTION = "OPTEE OS"
5LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
7
8require optee-fslc.inc
9
10DEPENDS += "python3-pyelftools-native u-boot-mkimage-native"
11DEPENDS:append:toolchain-clang = " compiler-rt"
12
13inherit deploy autotools
14
15# Optee-os can be built for 32 bits and 64 bits at the same time
16# as long as the compilers are correctly defined.
17# For 64bits, CROSS_COMPILE64 must be set
18# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that
19# any 32 or 64 bits builds will pass
20EXTRA_OEMAKE += " \
21 PLATFORM=imx-${PLATFORM_FLAVOR} \
22 CROSS_COMPILE=${HOST_PREFIX} \
23 CROSS_COMPILE64=${HOST_PREFIX} \
24 CFG_TEE_TA_LOG_LEVEL=0 \
25 CFG_TEE_CORE_LOG_LEVEL=0 \
26"
27
28LDFLAGS[unexport] = "1"
29CPPFLAGS[unexport] = "1"
30AS[unexport] = "1"
31LD[unexport] = "1"
32
33do_configure[noexec] = "1"
34
35do_compile:prepend() {
36 PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name)
37}
38
39do_compile:arm () {
40 oe_runmake all uTee
41}
42
43do_compile:aarch64 () {
44 oe_runmake all
45}
46do_compile[cleandirs] = "${B}"
47
48do_deploy () {
49 install -d ${DEPLOYDIR}
50 cp ${B}/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
51 ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin
52}
53
54do_deploy:append:arm () {
55 cp ${B}/core/uTee ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
56}
57
58do_install () {
59 install -d ${D}${nonarch_base_libdir}/firmware/
60 install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
61
62 # Install embedded TAs
63 install -d ${D}${nonarch_base_libdir}/optee_armtz/
64 install -m 444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/
65
66 # Install the TA devkit
67 install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
68 cp -aR ${B}/export-ta_${OPTEE_ARCH}/* \
69 ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
70}
71
72addtask deploy after do_compile before do_install
73
74FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/"
75FILES:${PN}-staticdev = "${includedir}/optee/"
76RDEPENDS:${PN}-dev += "${PN}-staticdev"
77
78PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/recipes-security/optee-imx/optee-os_3.19.0.imx.bb b/recipes-security/optee-imx/optee-os_3.19.0.imx.bb
index 82751a80..aec204c6 100644
--- a/recipes-security/optee-imx/optee-os_3.19.0.imx.bb
+++ b/recipes-security/optee-imx/optee-os_3.19.0.imx.bb
@@ -1,125 +1,10 @@
1# Copyright (C) 2017-2021 NXP 1# Copyright (C) 2017-2021 NXP
2 2
3SUMMARY = "OPTEE OS" 3require optee-os-fslc-imx.inc
4DESCRIPTION = "OPTEE OS" 4
5HOMEPAGE = "http://www.optee.org/" 5SRC_URI += "file://0001-core-Define-section-attributes-for-clang.patch \
6LICENSE = "BSD-2-Clause" 6 file://0006-allow-setting-sysroot-for-libgcc-lookup.patch \
7LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" 7 file://0007-allow-setting-sysroot-for-clang.patch \
8 8 file://0010-add-note-GNU-stack-section.patch"
9DEPENDS = "python3-pyelftools-native u-boot-mkimage-native \ 9SRCBRANCH = "lf-6.1.1_1.0.0"
10 python3-cryptography-native" 10SRCREV = "ad4e8389bb2c38efe39853925eec571ac778c575"
11DEPENDS:append:toolchain-clang = " compiler-rt"
12
13SRC_URI = "git://github.com/nxp-imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH} \
14 file://0001-core-Define-section-attributes-for-clang.patch \
15 file://0006-allow-setting-sysroot-for-libgcc-lookup.patch \
16 file://0007-allow-setting-sysroot-for-clang.patch \
17 file://0010-add-note-GNU-stack-section.patch"
18SRCBRANCH = "lf-5.15.71_2.2.0"
19SRCREV = "00919403f040fad4f8603e605932281ff8451b1d"
20
21S = "${WORKDIR}/git"
22B = "${WORKDIR}/build"
23
24inherit deploy python3native autotools features_check
25
26REQUIRED_MACHINE_FEATURES = "optee"
27
28# The platform flavor corresponds to the Yocto machine without the leading 'i'.
29PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}"
30PLATFORM_FLAVOR:imx6qdlsabresd = "mx6qsabresd"
31PLATFORM_FLAVOR:imx6qdlsabreauto = "mx6qsabreauto"
32PLATFORM_FLAVOR:imx6qpdlsolox = "mx6qsabresd"
33PLATFORM_FLAVOR:mx6ul-nxp-bsp = "mx6ulevk"
34PLATFORM_FLAVOR:mx6ull-nxp-bsp = "mx6ullevk"
35PLATFORM_FLAVOR:mx6ulz-nxp-bsp = "mx6ulzevk"
36PLATFORM_FLAVOR:mx8mq-nxp-bsp = "mx8mqevk"
37PLATFORM_FLAVOR:mx8mm-nxp-bsp = "mx8mmevk"
38PLATFORM_FLAVOR:mx8mn-nxp-bsp = "mx8mnevk"
39PLATFORM_FLAVOR:mx8mnul-nxp-bsp = "mx8mnevk"
40PLATFORM_FLAVOR:mx8mp-nxp-bsp = "mx8mpevk"
41PLATFORM_FLAVOR:mx8mpul-nxp-bsp = "mx8mpevk"
42PLATFORM_FLAVOR:mx8qm-nxp-bsp = "mx8qmmek"
43PLATFORM_FLAVOR:mx8qxp-nxp-bsp = "mx8qxpmek"
44PLATFORM_FLAVOR:mx8dx-nxp-bsp = "mx8dxmek"
45PLATFORM_FLAVOR:mx8dxl-nxp-bsp = "mx8dxlevk"
46PLATFORM_FLAVOR:mx8ulp-nxp-bsp = "mx8ulpevk"
47PLATFORM_FLAVOR:mx93-nxp-bsp = "mx93evk"
48
49OPTEE_ARCH:arm = "arm32"
50OPTEE_ARCH:aarch64 = "arm64"
51
52COMPILER ?= "gcc"
53COMPILER:toolchain-clang = "clang"
54
55# Optee-os can be built for 32 bits and 64 bits at the same time
56# as long as the compilers are correctly defined.
57# For 64bits, CROSS_COMPILE64 must be set
58# When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that
59# any 32 or 64 bits builds will pass
60EXTRA_OEMAKE = " \
61 PLATFORM=imx-${PLATFORM_FLAVOR} \
62 CROSS_COMPILE=${HOST_PREFIX} \
63 CROSS_COMPILE64=${HOST_PREFIX} \
64 CFG_TEE_TA_LOG_LEVEL=0 \
65 CFG_TEE_CORE_LOG_LEVEL=0 \
66 OPENSSL_MODULES=${STAGING_LIBDIR_NATIVE}/ossl-modules \
67 COMPILER=${COMPILER} \
68 -C ${S} O=${B} \
69"
70
71LDFLAGS[unexport] = "1"
72CPPFLAGS[unexport] = "1"
73AS[unexport] = "1"
74LD[unexport] = "1"
75
76CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
77CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
78
79do_configure[noexec] = "1"
80
81do_compile:prepend() {
82 PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name)
83}
84
85do_compile:arm () {
86 oe_runmake all uTee
87}
88
89do_compile:aarch64 () {
90 oe_runmake all
91}
92do_compile[cleandirs] = "${B}"
93
94do_deploy () {
95 install -d ${DEPLOYDIR}
96 cp ${B}/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin
97 ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin
98}
99
100do_deploy:append:arm () {
101 cp ${B}/core/uTee ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT}
102}
103
104do_install () {
105 install -d ${D}${nonarch_base_libdir}/firmware/
106 install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
107
108 # Install embedded TAs
109 install -d ${D}${nonarch_base_libdir}/optee_armtz/
110 install -m 444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/
111
112 # Install the TA devkit
113 install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
114 cp -aR ${B}/export-ta_${OPTEE_ARCH}/* \
115 ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/
116}
117
118addtask deploy after do_compile before do_install
119
120FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/"
121FILES:${PN}-staticdev = "${includedir}/optee/"
122RDEPENDS:${PN}-dev += "${PN}-staticdev"
123
124PACKAGE_ARCH = "${MACHINE_ARCH}"
125COMPATIBLE_MACHINE = "(imx-nxp-bsp)"
diff --git a/recipes-security/optee-imx/optee-test-fslc.inc b/recipes-security/optee-imx/optee-test-fslc.inc
new file mode 100644
index 00000000..e0c133a7
--- /dev/null
+++ b/recipes-security/optee-imx/optee-test-fslc.inc
@@ -0,0 +1,38 @@
1# Copyright (C) 2017-2021 NXP
2
3SUMMARY = "OPTEE test"
4LICENSE = "BSD-2-Clause & GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
6
7require optee-fslc.inc
8
9DEPENDS += "optee-os optee-client openssl"
10
11EXTRA_OEMAKE += " \
12 TA_DEV_KIT_DIR=${STAGING_INCDIR}/optee/export-user_ta_${OPTEE_ARCH}/ \
13 CROSS_COMPILE_HOST=${HOST_PREFIX} \
14 CROSS_COMPILE_TA=${HOST_PREFIX} \
15 CROSS_COMPILE=${HOST_PREFIX} \
16"
17
18do_compile() {
19 oe_runmake all
20}
21do_compile[cleandirs] = "${B}"
22
23do_install () {
24 install -d ${D}${bindir}
25 install ${B}/xtest/xtest ${D}${bindir}
26
27 install -d ${D}${nonarch_base_libdir}/optee_armtz
28 find ${B}/ta -name '*.ta' | while read name; do
29 install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/
30 done
31
32 install -d ${D}${libdir}/tee-supplicant/plugins/
33 install ${B}/supp_plugin/*plugin ${D}${libdir}/tee-supplicant/plugins/
34}
35
36FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ ${libdir}/tee-supplicant/plugins/"
37
38RDEPENDS:${PN} = "optee-os"
diff --git a/recipes-security/optee-imx/optee-test_3.19.0.imx.bb b/recipes-security/optee-imx/optee-test_3.19.0.imx.bb
index a75b577c..1ef4cad5 100644
--- a/recipes-security/optee-imx/optee-test_3.19.0.imx.bb
+++ b/recipes-security/optee-imx/optee-test_3.19.0.imx.bb
@@ -1,64 +1,10 @@
1# Copyright (C) 2017-2021 NXP 1# Copyright (C) 2017-2021 NXP
2 2
3SUMMARY = "OPTEE test" 3require optee-test-fslc.inc
4HOMEPAGE = "http://www.optee.org/"
5
6LICENSE = "BSD-2-Clause & GPL-2.0-only"
7LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa"
8
9DEPENDS = "python3-cryptography-native optee-os optee-client openssl"
10 4
11SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" 5SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}"
12SRCBRANCH = "lf-5.15.71_2.2.0"
13SRCREV = "5c1dbb531b304f7ae100958f6261b6cefea49b62"
14
15S = "${WORKDIR}/git"
16B = "${WORKDIR}/build"
17
18inherit python3native features_check
19
20REQUIRED_MACHINE_FEATURES = "optee"
21
22OPTEE_ARCH:arm = "arm32"
23OPTEE_ARCH:aarch64 = "arm64"
24
25COMPILER ?= "gcc"
26COMPILER:toolchain-clang = "clang"
27
28CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
29CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}"
30
31EXTRA_OEMAKE = " \
32 TA_DEV_KIT_DIR=${STAGING_INCDIR}/optee/export-user_ta_${OPTEE_ARCH}/ \
33 OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${exec_prefix} \
34 CROSS_COMPILE_HOST=${HOST_PREFIX} \
35 CROSS_COMPILE_TA=${HOST_PREFIX} \
36 CROSS_COMPILE=${HOST_PREFIX} \
37 OPENSSL_MODULES=${STAGING_LIBDIR_NATIVE}/ossl-modules \
38 COMPILER=${COMPILER} \
39 -C ${S} O=${B} \
40"
41
42do_compile() {
43 oe_runmake all
44}
45do_compile[cleandirs] = "${B}"
46
47do_install () {
48 install -d ${D}${bindir}
49 install ${B}/xtest/xtest ${D}${bindir}
50
51 install -d ${D}${nonarch_base_libdir}/optee_armtz
52 find ${B}/ta -name '*.ta' | while read name; do
53 install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/
54 done
55
56 install -d ${D}${libdir}/tee-supplicant/plugins/
57 install ${B}/supp_plugin/*plugin ${D}${libdir}/tee-supplicant/plugins/
58}
59
60FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ ${libdir}/tee-supplicant/plugins/"
61 6
62RDEPENDS:${PN} = "optee-os" 7SRCBRANCH = "lf-6.1.1_1.0.0"
8SRCREV = "7c314e6a0cec0ba19246eb4f1959859d7a6536d6"
63 9
64COMPATIBLE_MACHINE = "(imx-nxp-bsp)" 10COMPATIBLE_MACHINE = "(imx-nxp-bsp)"