diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2023-05-02 12:56:21 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-02 12:56:21 -0300 |
commit | 5006985cc5afe9bd7d78c2863f75d84dea5d9790 (patch) | |
tree | adb120b871db114bb51973dccdfc1ef924e42082 | |
parent | 9e4dadb78ea72e871fd00e612b1d0fc7e4abaf39 (diff) | |
parent | 9a2a39a9fa9d6815e8bf51b18b2d1e545cc26241 (diff) | |
download | meta-freescale-5006985cc5afe9bd7d78c2863f75d84dea5d9790.tar.gz |
Merge pull request #1518 from MrCry0/master-op-tee
Update optee* to NXP BSP release L6.1.1-1.0.0
-rw-r--r-- | recipes-security/optee-imx/optee-client-fslc-imx.inc | 7 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-client-fslc.inc | 42 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-client_3.19.0.imx.bb | 50 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-fslc.inc | 26 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-os-fslc-imx.inc | 26 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-os-fslc.inc | 78 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-os_3.19.0.imx.bb | 131 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-test-fslc.inc | 38 | ||||
-rw-r--r-- | recipes-security/optee-imx/optee-test_3.19.0.imx.bb | 60 |
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 | |||
3 | require optee-client-fslc.inc | ||
4 | |||
5 | SRC_URI += "git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH}" | ||
6 | |||
7 | COMPATIBLE_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 | |||
3 | SUMMARY = "OPTEE Client libs" | ||
4 | HOMEPAGE = "http://www.optee.org/" | ||
5 | LICENSE = "BSD-2-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | ||
7 | |||
8 | SRC_URI = "file://tee-supplicant.service" | ||
9 | |||
10 | S = "${WORKDIR}/git" | ||
11 | B = "${WORKDIR}/build" | ||
12 | |||
13 | inherit python3native systemd features_check pkgconfig | ||
14 | |||
15 | DEPENDS = "util-linux-libuuid" | ||
16 | |||
17 | REQUIRED_MACHINE_FEATURES = "optee" | ||
18 | |||
19 | SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" | ||
20 | |||
21 | EXTRA_OEMAKE = " \ | ||
22 | -C ${S} O=${B} \ | ||
23 | " | ||
24 | |||
25 | do_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 | 1 | require optee-client-fslc-imx.inc |
2 | 2 | ||
3 | SUMMARY = "OPTEE Client libs" | 3 | SRCBRANCH = "lf-6.1.1_1.0.0" |
4 | HOMEPAGE = "http://www.optee.org/" | 4 | SRCREV = "01231b7a7ce03cdf9d3f48e7baa0bce17aac28f7" |
5 | LICENSE = "BSD-2-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | ||
7 | |||
8 | SRC_URI = " \ | ||
9 | git://github.com/nxp-imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \ | ||
10 | file://tee-supplicant.service" | ||
11 | SRCBRANCH = "lf-5.15.71_2.2.0" | ||
12 | SRCREV = "644022f8970c832a40be00747fcec70c7b5d488c" | ||
13 | |||
14 | S = "${WORKDIR}/git" | ||
15 | B = "${WORKDIR}/build" | ||
16 | |||
17 | inherit python3native systemd features_check pkgconfig | ||
18 | |||
19 | DEPENDS = "util-linux-libuuid" | ||
20 | |||
21 | REQUIRED_MACHINE_FEATURES = "optee" | ||
22 | |||
23 | SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" | ||
24 | |||
25 | EXTRA_OEMAKE = " \ | ||
26 | -C ${S} O=${B} \ | ||
27 | " | ||
28 | |||
29 | do_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 | |||
48 | COMPATIBLE_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 @@ | |||
1 | HOMEPAGE = "http://www.optee.org/" | ||
2 | |||
3 | inherit python3native features_check | ||
4 | |||
5 | REQUIRED_MACHINE_FEATURES = "optee" | ||
6 | |||
7 | DEPENDS = "python3-cryptography-native" | ||
8 | |||
9 | S = "${WORKDIR}/git" | ||
10 | B = "${WORKDIR}/build" | ||
11 | |||
12 | OPTEE_ARCH:arm = "arm32" | ||
13 | OPTEE_ARCH:aarch64 = "arm64" | ||
14 | |||
15 | COMPILER ?= "gcc" | ||
16 | COMPILER:toolchain-clang = "clang" | ||
17 | |||
18 | CFLAGS += "--sysroot=${STAGING_DIR_HOST}" | ||
19 | CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" | ||
20 | |||
21 | EXTRA_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 @@ | |||
1 | require optee-os-fslc.inc | ||
2 | |||
3 | SRC_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'. | ||
6 | PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}" | ||
7 | PLATFORM_FLAVOR:imx6qdlsabresd = "mx6qsabresd" | ||
8 | PLATFORM_FLAVOR:imx6qdlsabreauto = "mx6qsabreauto" | ||
9 | PLATFORM_FLAVOR:imx6qpdlsolox = "mx6qsabresd" | ||
10 | PLATFORM_FLAVOR:mx6ul-nxp-bsp = "mx6ulevk" | ||
11 | PLATFORM_FLAVOR:mx6ull-nxp-bsp = "mx6ullevk" | ||
12 | PLATFORM_FLAVOR:mx6ulz-nxp-bsp = "mx6ulzevk" | ||
13 | PLATFORM_FLAVOR:mx8mq-nxp-bsp = "mx8mqevk" | ||
14 | PLATFORM_FLAVOR:mx8mm-nxp-bsp = "mx8mmevk" | ||
15 | PLATFORM_FLAVOR:mx8mn-nxp-bsp = "mx8mnevk" | ||
16 | PLATFORM_FLAVOR:mx8mnul-nxp-bsp = "mx8mnevk" | ||
17 | PLATFORM_FLAVOR:mx8mp-nxp-bsp = "mx8mpevk" | ||
18 | PLATFORM_FLAVOR:mx8mpul-nxp-bsp = "mx8mpevk" | ||
19 | PLATFORM_FLAVOR:mx8qm-nxp-bsp = "mx8qmmek" | ||
20 | PLATFORM_FLAVOR:mx8qxp-nxp-bsp = "mx8qxpmek" | ||
21 | PLATFORM_FLAVOR:mx8dx-nxp-bsp = "mx8dxmek" | ||
22 | PLATFORM_FLAVOR:mx8dxl-nxp-bsp = "mx8dxlevk" | ||
23 | PLATFORM_FLAVOR:mx8ulp-nxp-bsp = "mx8ulpevk" | ||
24 | PLATFORM_FLAVOR:mx93-nxp-bsp = "mx93evk" | ||
25 | |||
26 | COMPATIBLE_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 | |||
3 | SUMMARY = "OPTEE OS" | ||
4 | DESCRIPTION = "OPTEE OS" | ||
5 | LICENSE = "BSD-2-Clause" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | ||
7 | |||
8 | require optee-fslc.inc | ||
9 | |||
10 | DEPENDS += "python3-pyelftools-native u-boot-mkimage-native" | ||
11 | DEPENDS:append:toolchain-clang = " compiler-rt" | ||
12 | |||
13 | inherit 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 | ||
20 | EXTRA_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 | |||
28 | LDFLAGS[unexport] = "1" | ||
29 | CPPFLAGS[unexport] = "1" | ||
30 | AS[unexport] = "1" | ||
31 | LD[unexport] = "1" | ||
32 | |||
33 | do_configure[noexec] = "1" | ||
34 | |||
35 | do_compile:prepend() { | ||
36 | PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name) | ||
37 | } | ||
38 | |||
39 | do_compile:arm () { | ||
40 | oe_runmake all uTee | ||
41 | } | ||
42 | |||
43 | do_compile:aarch64 () { | ||
44 | oe_runmake all | ||
45 | } | ||
46 | do_compile[cleandirs] = "${B}" | ||
47 | |||
48 | do_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 | |||
54 | do_deploy:append:arm () { | ||
55 | cp ${B}/core/uTee ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT} | ||
56 | } | ||
57 | |||
58 | do_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 | |||
72 | addtask deploy after do_compile before do_install | ||
73 | |||
74 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" | ||
75 | FILES:${PN}-staticdev = "${includedir}/optee/" | ||
76 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | ||
77 | |||
78 | PACKAGE_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 | ||
3 | SUMMARY = "OPTEE OS" | 3 | require optee-os-fslc-imx.inc |
4 | DESCRIPTION = "OPTEE OS" | 4 | |
5 | HOMEPAGE = "http://www.optee.org/" | 5 | SRC_URI += "file://0001-core-Define-section-attributes-for-clang.patch \ |
6 | LICENSE = "BSD-2-Clause" | 6 | file://0006-allow-setting-sysroot-for-libgcc-lookup.patch \ |
7 | LIC_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" | |
9 | DEPENDS = "python3-pyelftools-native u-boot-mkimage-native \ | 9 | SRCBRANCH = "lf-6.1.1_1.0.0" |
10 | python3-cryptography-native" | 10 | SRCREV = "ad4e8389bb2c38efe39853925eec571ac778c575" |
11 | DEPENDS:append:toolchain-clang = " compiler-rt" | ||
12 | |||
13 | SRC_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" | ||
18 | SRCBRANCH = "lf-5.15.71_2.2.0" | ||
19 | SRCREV = "00919403f040fad4f8603e605932281ff8451b1d" | ||
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | B = "${WORKDIR}/build" | ||
23 | |||
24 | inherit deploy python3native autotools features_check | ||
25 | |||
26 | REQUIRED_MACHINE_FEATURES = "optee" | ||
27 | |||
28 | # The platform flavor corresponds to the Yocto machine without the leading 'i'. | ||
29 | PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}" | ||
30 | PLATFORM_FLAVOR:imx6qdlsabresd = "mx6qsabresd" | ||
31 | PLATFORM_FLAVOR:imx6qdlsabreauto = "mx6qsabreauto" | ||
32 | PLATFORM_FLAVOR:imx6qpdlsolox = "mx6qsabresd" | ||
33 | PLATFORM_FLAVOR:mx6ul-nxp-bsp = "mx6ulevk" | ||
34 | PLATFORM_FLAVOR:mx6ull-nxp-bsp = "mx6ullevk" | ||
35 | PLATFORM_FLAVOR:mx6ulz-nxp-bsp = "mx6ulzevk" | ||
36 | PLATFORM_FLAVOR:mx8mq-nxp-bsp = "mx8mqevk" | ||
37 | PLATFORM_FLAVOR:mx8mm-nxp-bsp = "mx8mmevk" | ||
38 | PLATFORM_FLAVOR:mx8mn-nxp-bsp = "mx8mnevk" | ||
39 | PLATFORM_FLAVOR:mx8mnul-nxp-bsp = "mx8mnevk" | ||
40 | PLATFORM_FLAVOR:mx8mp-nxp-bsp = "mx8mpevk" | ||
41 | PLATFORM_FLAVOR:mx8mpul-nxp-bsp = "mx8mpevk" | ||
42 | PLATFORM_FLAVOR:mx8qm-nxp-bsp = "mx8qmmek" | ||
43 | PLATFORM_FLAVOR:mx8qxp-nxp-bsp = "mx8qxpmek" | ||
44 | PLATFORM_FLAVOR:mx8dx-nxp-bsp = "mx8dxmek" | ||
45 | PLATFORM_FLAVOR:mx8dxl-nxp-bsp = "mx8dxlevk" | ||
46 | PLATFORM_FLAVOR:mx8ulp-nxp-bsp = "mx8ulpevk" | ||
47 | PLATFORM_FLAVOR:mx93-nxp-bsp = "mx93evk" | ||
48 | |||
49 | OPTEE_ARCH:arm = "arm32" | ||
50 | OPTEE_ARCH:aarch64 = "arm64" | ||
51 | |||
52 | COMPILER ?= "gcc" | ||
53 | COMPILER: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 | ||
60 | EXTRA_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 | |||
71 | LDFLAGS[unexport] = "1" | ||
72 | CPPFLAGS[unexport] = "1" | ||
73 | AS[unexport] = "1" | ||
74 | LD[unexport] = "1" | ||
75 | |||
76 | CFLAGS += "--sysroot=${STAGING_DIR_HOST}" | ||
77 | CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" | ||
78 | |||
79 | do_configure[noexec] = "1" | ||
80 | |||
81 | do_compile:prepend() { | ||
82 | PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name) | ||
83 | } | ||
84 | |||
85 | do_compile:arm () { | ||
86 | oe_runmake all uTee | ||
87 | } | ||
88 | |||
89 | do_compile:aarch64 () { | ||
90 | oe_runmake all | ||
91 | } | ||
92 | do_compile[cleandirs] = "${B}" | ||
93 | |||
94 | do_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 | |||
100 | do_deploy:append:arm () { | ||
101 | cp ${B}/core/uTee ${DEPLOYDIR}/uTee-${OPTEE_BIN_EXT} | ||
102 | } | ||
103 | |||
104 | do_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 | |||
118 | addtask deploy after do_compile before do_install | ||
119 | |||
120 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" | ||
121 | FILES:${PN}-staticdev = "${includedir}/optee/" | ||
122 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | ||
123 | |||
124 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
125 | COMPATIBLE_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 | |||
3 | SUMMARY = "OPTEE test" | ||
4 | LICENSE = "BSD-2-Clause & GPL-2.0-only" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | ||
6 | |||
7 | require optee-fslc.inc | ||
8 | |||
9 | DEPENDS += "optee-os optee-client openssl" | ||
10 | |||
11 | EXTRA_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 | |||
18 | do_compile() { | ||
19 | oe_runmake all | ||
20 | } | ||
21 | do_compile[cleandirs] = "${B}" | ||
22 | |||
23 | do_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 | |||
36 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ ${libdir}/tee-supplicant/plugins/" | ||
37 | |||
38 | RDEPENDS:${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 | ||
3 | SUMMARY = "OPTEE test" | 3 | require optee-test-fslc.inc |
4 | HOMEPAGE = "http://www.optee.org/" | ||
5 | |||
6 | LICENSE = "BSD-2-Clause & GPL-2.0-only" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | ||
8 | |||
9 | DEPENDS = "python3-cryptography-native optee-os optee-client openssl" | ||
10 | 4 | ||
11 | SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" | 5 | SRC_URI = "git://github.com/nxp-imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" |
12 | SRCBRANCH = "lf-5.15.71_2.2.0" | ||
13 | SRCREV = "5c1dbb531b304f7ae100958f6261b6cefea49b62" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | B = "${WORKDIR}/build" | ||
17 | |||
18 | inherit python3native features_check | ||
19 | |||
20 | REQUIRED_MACHINE_FEATURES = "optee" | ||
21 | |||
22 | OPTEE_ARCH:arm = "arm32" | ||
23 | OPTEE_ARCH:aarch64 = "arm64" | ||
24 | |||
25 | COMPILER ?= "gcc" | ||
26 | COMPILER:toolchain-clang = "clang" | ||
27 | |||
28 | CFLAGS += "--sysroot=${STAGING_DIR_HOST}" | ||
29 | CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" | ||
30 | |||
31 | EXTRA_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 | |||
42 | do_compile() { | ||
43 | oe_runmake all | ||
44 | } | ||
45 | do_compile[cleandirs] = "${B}" | ||
46 | |||
47 | do_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 | |||
60 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ ${libdir}/tee-supplicant/plugins/" | ||
61 | 6 | ||
62 | RDEPENDS:${PN} = "optee-os" | 7 | SRCBRANCH = "lf-6.1.1_1.0.0" |
8 | SRCREV = "7c314e6a0cec0ba19246eb4f1959859d7a6536d6" | ||
63 | 9 | ||
64 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | 10 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" |