diff options
| author | Oleksandr Suvorov <oleksandr.suvorov@foundries.io> | 2023-05-01 18:14:59 +0300 |
|---|---|---|
| committer | Oleksandr Suvorov <oleksandr.suvorov@foundries.io> | 2023-05-02 17:30:14 +0300 |
| commit | c4288a04f82cea6763f12448e87d95e5c0364cf7 (patch) | |
| tree | 1102b21395908b4427ca053a93a27f12ded53729 | |
| parent | c112655d9b4b4ca79a14237c658a9fec7db325c0 (diff) | |
| download | meta-freescale-c4288a04f82cea6763f12448e87d95e5c0364cf7.tar.gz | |
optee: optimize optee-os and optee-test recipes to reuse code
Add include files for optee-os and optee-test.
The include files feature requirements that are specific to
optee/optee-os/optee-test projects and i.MX platforms.
Recipe files with version number feature the git branch, commit hash
and optionally repo URL/patch set.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
| -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 | 125 | ||||
| -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 | 58 |
6 files changed, 175 insertions, 176 deletions
diff --git a/recipes-security/optee-imx/optee-fslc.inc b/recipes-security/optee-imx/optee-fslc.inc new file mode 100644 index 000000000..6c96dc2bc --- /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 000000000..6b72e8277 --- /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 000000000..faa8c993b --- /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 82751a80a..9059b5387 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" | ||
| 5 | HOMEPAGE = "http://www.optee.org/" | ||
| 6 | LICENSE = "BSD-2-Clause" | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | ||
| 8 | 4 | ||
| 9 | DEPENDS = "python3-pyelftools-native u-boot-mkimage-native \ | 5 | SRC_URI += "file://0001-core-Define-section-attributes-for-clang.patch \ |
| 10 | python3-cryptography-native" | 6 | file://0006-allow-setting-sysroot-for-libgcc-lookup.patch \ |
| 11 | DEPENDS:append:toolchain-clang = " compiler-rt" | 7 | file://0007-allow-setting-sysroot-for-clang.patch \ |
| 12 | 8 | file://0010-add-note-GNU-stack-section.patch" | |
| 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" | 9 | SRCBRANCH = "lf-5.15.71_2.2.0" |
| 19 | SRCREV = "00919403f040fad4f8603e605932281ff8451b1d" | 10 | 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 000000000..e0c133a7c --- /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 a75b577c6..9cc21efab 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}" |
| 6 | |||
| 12 | SRCBRANCH = "lf-5.15.71_2.2.0" | 7 | SRCBRANCH = "lf-5.15.71_2.2.0" |
| 13 | SRCREV = "5c1dbb531b304f7ae100958f6261b6cefea49b62" | 8 | SRCREV = "5c1dbb531b304f7ae100958f6261b6cefea49b62" |
| 14 | 9 | ||
| 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 | |||
| 62 | RDEPENDS:${PN} = "optee-os" | ||
| 63 | |||
| 64 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | 10 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" |
