diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2022-02-24 21:45:56 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-24 21:45:56 -0300 |
| commit | e4f465dbcb083028ca29807a342e0fec0e0e25ed (patch) | |
| tree | b87d5ae0e5c1009d44bef2eaea31a2c5b24e21f0 | |
| parent | 12f30e596061e1dd5b43c3a1d532a8f55d0075eb (diff) | |
| parent | c661ec7a177b90a76494a23ecbd44c6a840c97e7 (diff) | |
| download | meta-freescale-e4f465dbcb083028ca29807a342e0fec0e0e25ed.tar.gz | |
Merge pull request #985 from thochstein/optee
Optee: Upgrade 3.10.0.imx -> 3.15.0.imx
| -rw-r--r-- | conf/machine/include/imx-base.inc | 6 | ||||
| -rw-r--r-- | recipes-security/optee-imx/optee-client_3.15.0.imx.bb (renamed from recipes-security/optee-imx/optee-client_3.10.0.imx.bb) | 30 | ||||
| -rw-r--r-- | recipes-security/optee-imx/optee-os_3.15.0.imx.bb (renamed from recipes-security/optee-imx/optee-os_3.10.0.imx.bb) | 25 | ||||
| -rw-r--r-- | recipes-security/optee-imx/optee-test_3.15.0.imx.bb (renamed from recipes-security/optee-imx/optee-test_3.10.0.imx.bb) | 29 |
4 files changed, 51 insertions, 39 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index b074ec014..fff3c56de 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
| @@ -428,9 +428,9 @@ PREFERRED_VERSION_libdrm:mx7-nxp-bsp ?= "2.4.107.imx" | |||
| 428 | PREFERRED_VERSION_libdrm:mx8-nxp-bsp ?= "2.4.107.imx" | 428 | PREFERRED_VERSION_libdrm:mx8-nxp-bsp ?= "2.4.107.imx" |
| 429 | 429 | ||
| 430 | # Use i.MX optee Version | 430 | # Use i.MX optee Version |
| 431 | PREFERRED_VERSION_optee-os:mx8-nxp-bsp ?= "3.10.0.imx" | 431 | PREFERRED_VERSION_optee-os:mx8-nxp-bsp ?= "3.15.0.imx" |
| 432 | PREFERRED_VERSION_optee-client:mx8-nxp-bsp ?= "3.10.0.imx" | 432 | PREFERRED_VERSION_optee-client:mx8-nxp-bsp ?= "3.15.0.imx" |
| 433 | PREFERRED_VERSION_optee-test:mx8-nxp-bsp ?= "3.10.0.imx" | 433 | PREFERRED_VERSION_optee-test:mx8-nxp-bsp ?= "3.15.0.imx" |
| 434 | 434 | ||
| 435 | #Use i.MX opencv Version for mx8 | 435 | #Use i.MX opencv Version for mx8 |
| 436 | PREFERRED_VERSION_opencv:mx8-nxp-bsp ?= "4.5.2.imx" | 436 | PREFERRED_VERSION_opencv:mx8-nxp-bsp ?= "4.5.2.imx" |
diff --git a/recipes-security/optee-imx/optee-client_3.10.0.imx.bb b/recipes-security/optee-imx/optee-client_3.15.0.imx.bb index 2ad55a645..6e8f1e541 100644 --- a/recipes-security/optee-imx/optee-client_3.10.0.imx.bb +++ b/recipes-security/optee-imx/optee-client_3.15.0.imx.bb | |||
| @@ -1,22 +1,24 @@ | |||
| 1 | # Copyright (C) 2017-2020 NXP | 1 | # Copyright (C) 2017-2021 NXP |
| 2 | 2 | ||
| 3 | SUMMARY = "OPTEE Client libs" | 3 | SUMMARY = "OPTEE Client libs" |
| 4 | HOMEPAGE = "http://www.optee.org/" | 4 | HOMEPAGE = "http://www.optee.org/" |
| 5 | LICENSE = "BSD-2-Clause" | 5 | LICENSE = "BSD-2-Clause" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" |
| 7 | 7 | ||
| 8 | SRCBRANCH = "imx_5.4.70_2.3.0" | 8 | SRCBRANCH = "lf-5.10.72_2.2.0" |
| 9 | SRC_URI = " \ | 9 | SRC_URI = " \ |
| 10 | git://source.codeaurora.org/external/imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \ | 10 | git://source.codeaurora.org/external/imx/imx-optee-client.git;protocol=https;branch=${SRCBRANCH} \ |
| 11 | file://tee-supplicant.service \ | 11 | file://tee-supplicant.service \ |
| 12 | " | 12 | " |
| 13 | 13 | ||
| 14 | SRCREV = "2a77cf88d956c34cb4a1c191bea6113e327f5fe0" | 14 | SRCREV = "182874320395787a389e5b0f7df02b32f3c0a1b0" |
| 15 | 15 | ||
| 16 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
| 17 | B = "${WORKDIR}/build" | 17 | B = "${WORKDIR}/build" |
| 18 | 18 | ||
| 19 | inherit python3native systemd | 19 | inherit python3native systemd features_check |
| 20 | |||
| 21 | REQUIRED_MACHINE_FEATURES = "optee" | ||
| 20 | 22 | ||
| 21 | SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" | 23 | SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" |
| 22 | 24 | ||
| @@ -29,24 +31,20 @@ EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} O=${B}" | |||
| 29 | do_install () { | 31 | do_install () { |
| 30 | oe_runmake -C ${S} install | 32 | oe_runmake -C ${S} install |
| 31 | 33 | ||
| 32 | install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0 | 34 | 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 ${D}${libdir}/libteec.so | 35 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1 |
| 34 | ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1 | 36 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so |
| 37 | |||
| 38 | install -D -p -m0644 ${B}/export/usr/lib/libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1.0 | ||
| 39 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0 | ||
| 40 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so | ||
| 35 | 41 | ||
| 36 | install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant | 42 | install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant |
| 37 | 43 | ||
| 38 | cp -a ${B}/export/usr/include ${D}/usr/ | 44 | cp -a ${B}/export/usr/include ${D}${includedir} |
| 39 | 45 | ||
| 40 | sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${WORKDIR}/tee-supplicant.service | 46 | 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 | 47 | install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service |
| 42 | } | 48 | } |
| 43 | 49 | ||
| 44 | PACKAGES += "tee-supplicant" | ||
| 45 | FILES:${PN} += "${libdir}/* ${includedir}/*" | ||
| 46 | FILES:tee-supplicant += "${bindir}/tee-supplicant" | ||
| 47 | |||
| 48 | INSANE_SKIP:${PN} = "ldflags dev-elf" | ||
| 49 | INSANE_SKIP:${PN}-dev = "ldflags dev-elf" | ||
| 50 | INSANE_SKIP:tee-supplicant = "ldflags" | ||
| 51 | |||
| 52 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | 50 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" |
diff --git a/recipes-security/optee-imx/optee-os_3.10.0.imx.bb b/recipes-security/optee-imx/optee-os_3.15.0.imx.bb index 003aeba2f..ffa3cc850 100644 --- a/recipes-security/optee-imx/optee-os_3.10.0.imx.bb +++ b/recipes-security/optee-imx/optee-os_3.15.0.imx.bb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Copyright (C) 2017-2020 NXP | 1 | # Copyright (C) 2017-2021 NXP |
| 2 | 2 | ||
| 3 | SUMMARY = "OPTEE OS" | 3 | SUMMARY = "OPTEE OS" |
| 4 | DESCRIPTION = "OPTEE OS" | 4 | DESCRIPTION = "OPTEE OS" |
| @@ -8,17 +8,18 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | |||
| 8 | 8 | ||
| 9 | DEPENDS = "python3-pycryptodomex-native python3-pyelftools-native u-boot-mkimage-native" | 9 | DEPENDS = "python3-pycryptodomex-native python3-pyelftools-native u-boot-mkimage-native" |
| 10 | 10 | ||
| 11 | SRCBRANCH = "imx_5.4.70_2.3.0" | 11 | SRCBRANCH = "lf-5.10.72_2.2.0" |
| 12 | |||
| 13 | SRC_URI = "\ | 12 | SRC_URI = "\ |
| 14 | git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH} \ | 13 | git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=https;branch=${SRCBRANCH} \ |
| 15 | " | 14 | " |
| 16 | 15 | ||
| 17 | SRCREV = "a991c90475bb1c715651e5fe27f7f32cbe61aef9" | 16 | SRCREV = "c939619d64dea014ad1b8382356eee4d1cbfbb22" |
| 18 | 17 | ||
| 19 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
| 20 | 19 | ||
| 21 | inherit deploy python3native autotools | 20 | inherit deploy python3native autotools features_check |
| 21 | |||
| 22 | REQUIRED_MACHINE_FEATURES = "optee" | ||
| 22 | 23 | ||
| 23 | # The platform flavor corresponds to the Yocto machine without the leading 'i'. | 24 | # The platform flavor corresponds to the Yocto machine without the leading 'i'. |
| 24 | PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}" | 25 | PLATFORM_FLAVOR = "${@d.getVar('MACHINE')[1:]}" |
| @@ -63,7 +64,7 @@ CXXFLAGS += "--sysroot=${STAGING_DIR_HOST}" | |||
| 63 | 64 | ||
| 64 | do_deploy () { | 65 | do_deploy () { |
| 65 | install -d ${DEPLOYDIR} | 66 | install -d ${DEPLOYDIR} |
| 66 | ${TARGET_PREFIX}objcopy -O binary ${B}/core/tee.elf ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin | 67 | cp ${B}/core/tee-raw.bin ${DEPLOYDIR}/tee.${PLATFORM_FLAVOR}.bin |
| 67 | ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin | 68 | ln -sf tee.${PLATFORM_FLAVOR}.bin ${DEPLOYDIR}/tee.bin |
| 68 | 69 | ||
| 69 | if [ "${OPTEE_ARCH}" != "arm64" ]; then | 70 | if [ "${OPTEE_ARCH}" != "arm64" ]; then |
| @@ -78,17 +79,23 @@ do_install () { | |||
| 78 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ | 79 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ |
| 79 | 80 | ||
| 80 | # Install the TA devkit | 81 | # Install the TA devkit |
| 81 | install -d ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/ | 82 | install -d ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ |
| 82 | 83 | ||
| 83 | for f in ${B}/export-ta_${OPTEE_ARCH}/*; do | 84 | for f in ${B}/export-ta_${OPTEE_ARCH}/*; do |
| 84 | cp -aR $f ${D}/usr/include/optee/export-user_ta_${OPTEE_ARCH}/ | 85 | cp -aR $f ${D}${includedir}/optee/export-user_ta_${OPTEE_ARCH}/ |
| 86 | done | ||
| 87 | |||
| 88 | # Install embedded TAs | ||
| 89 | install -d ${D}${nonarch_base_libdir}/optee_armtz | ||
| 90 | find ${B}/ta -name '*.ta' | while read name; do | ||
| 91 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | ||
| 85 | done | 92 | done |
| 86 | } | 93 | } |
| 87 | 94 | ||
| 88 | addtask deploy after do_compile before do_install | 95 | addtask deploy after do_compile before do_install |
| 89 | 96 | ||
| 90 | 97 | ||
| 91 | FILES:${PN} = "${nonarch_base_libdir}/firmware/" | 98 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" |
| 92 | FILES:${PN}-staticdev = "/usr/include/optee/" | 99 | FILES:${PN}-staticdev = "/usr/include/optee/" |
| 93 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | 100 | RDEPENDS:${PN}-dev += "${PN}-staticdev" |
| 94 | 101 | ||
diff --git a/recipes-security/optee-imx/optee-test_3.10.0.imx.bb b/recipes-security/optee-imx/optee-test_3.15.0.imx.bb index 7039d0c4c..1d6de2432 100644 --- a/recipes-security/optee-imx/optee-test_3.10.0.imx.bb +++ b/recipes-security/optee-imx/optee-test_3.15.0.imx.bb | |||
| @@ -1,23 +1,25 @@ | |||
| 1 | # Copyright (C) 2017-2020 NXP | 1 | # Copyright (C) 2017-2021 NXP |
| 2 | 2 | ||
| 3 | SUMMARY = "OPTEE test" | 3 | SUMMARY = "OPTEE test" |
| 4 | HOMEPAGE = "http://www.optee.org/" | 4 | HOMEPAGE = "http://www.optee.org/" |
| 5 | 5 | ||
| 6 | LICENSE = "BSD-2-Clause" | 6 | LICENSE = "BSD-2-Clause & GPL-2.0-only" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" |
| 8 | 8 | ||
| 9 | DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native optee-os optee-client openssl" | 9 | DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native optee-os optee-client openssl" |
| 10 | 10 | ||
| 11 | SRCBRANCH = "imx_5.4.70_2.3.0" | 11 | SRCBRANCH = "lf-5.10.72_2.2.0" |
| 12 | 12 | ||
| 13 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" | 13 | SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https;branch=${SRCBRANCH}" |
| 14 | 14 | ||
| 15 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
| 16 | B = "${WORKDIR}/build" | 16 | B = "${WORKDIR}/build" |
| 17 | 17 | ||
| 18 | SRCREV = "0c998f42a3fb87b9f2929955cf4b0116cc515091" | 18 | SRCREV = "4d81b964a72e89a62d04187b3f055d8346b383c9" |
| 19 | 19 | ||
| 20 | inherit python3native | 20 | inherit python3native features_check |
| 21 | |||
| 22 | REQUIRED_MACHINE_FEATURES = "optee" | ||
| 21 | 23 | ||
| 22 | OPTEE_ARCH ?= "arm32" | 24 | OPTEE_ARCH ?= "arm32" |
| 23 | OPTEE_ARCH:armv7a = "arm32" | 25 | OPTEE_ARCH:armv7a = "arm32" |
| @@ -36,7 +38,6 @@ EXTRA_OEMAKE = " \ | |||
| 36 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ | 38 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ |
| 37 | CROSS_COMPILE_TA=${HOST_PREFIX} \ | 39 | CROSS_COMPILE_TA=${HOST_PREFIX} \ |
| 38 | CROSS_COMPILE=${HOST_PREFIX} \ | 40 | CROSS_COMPILE=${HOST_PREFIX} \ |
| 39 | OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \ | ||
| 40 | -C ${S} O=${B} \ | 41 | -C ${S} O=${B} \ |
| 41 | " | 42 | " |
| 42 | 43 | ||
| @@ -45,19 +46,25 @@ do_compile() { | |||
| 45 | # Top level makefile doesn't seem to handle parallel make gracefully | 46 | # Top level makefile doesn't seem to handle parallel make gracefully |
| 46 | oe_runmake xtest | 47 | oe_runmake xtest |
| 47 | oe_runmake ta | 48 | oe_runmake ta |
| 49 | oe_runmake test_plugin | ||
| 48 | } | 50 | } |
| 49 | do_compile[cleandirs] = "${B}" | 51 | do_compile[cleandirs] = "${B}" |
| 50 | 52 | ||
| 51 | do_install () { | 53 | do_install () { |
| 52 | install -d ${D}/usr/bin | 54 | install -d ${D}${bindir} |
| 53 | install ${B}/xtest/xtest ${D}/usr/bin/ | 55 | install ${B}/xtest/xtest ${D}${bindir} |
| 54 | 56 | ||
| 55 | install -d ${D}/lib/optee_armtz | 57 | install -d ${D}${nonarch_base_libdir}/optee_armtz |
| 56 | find ${B}/ta -name '*.ta' | while read name; do | 58 | find ${B}/ta -name '*.ta' | while read name; do |
| 57 | install -m 444 $name ${D}/lib/optee_armtz/ | 59 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ |
| 58 | done | 60 | done |
| 61 | |||
| 62 | install -d ${D}${libdir}/tee-supplicant/plugins/ | ||
| 63 | install ${B}/supp_plugin/*plugin ${D}${libdir}/tee-supplicant/plugins/ | ||
| 59 | } | 64 | } |
| 60 | 65 | ||
| 61 | FILES:${PN} = "/usr/bin/ /lib*/optee_armtz/" | 66 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ ${libdir}/tee-supplicant/plugins/" |
| 67 | |||
| 68 | RDEPENDS:${PN} = "optee-os" | ||
| 62 | 69 | ||
| 63 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | 70 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" |
