From c8b32341043831f4e8933b00ddf83831e7d015ce Mon Sep 17 00:00:00 2001 From: Peter Griffin Date: Fri, 25 Oct 2019 11:30:40 +0200 Subject: optee-test: add optee-test imx fork This also includes some backported gcc 8 fixes from upstream. Signed-off-by: Peter Griffin --- recipes-security/optee-imx/optee-test_3.2.0.imx.bb | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 recipes-security/optee-imx/optee-test_3.2.0.imx.bb (limited to 'recipes-security/optee-imx/optee-test_3.2.0.imx.bb') diff --git a/recipes-security/optee-imx/optee-test_3.2.0.imx.bb b/recipes-security/optee-imx/optee-test_3.2.0.imx.bb new file mode 100644 index 000000000..187c24a96 --- /dev/null +++ b/recipes-security/optee-imx/optee-test_3.2.0.imx.bb @@ -0,0 +1,57 @@ +# Copyright (C) 2017-2018 NXP + +SUMMARY = "OPTEE test" +HOMEPAGE = "http://www.optee.org/" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" + +DEPENDS = "optee-os optee-client python-pycrypto-native openssl" +inherit pythonnative + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRCBRANCH = "imx_4.14.78_1.0.0_ga" +OPTEE_TEST_SRC ?= "git://source.codeaurora.org/external/imx/imx-optee-test.git;protocol=https" + +SRC_URI = "${OPTEE_TEST_SRC};branch=${SRCBRANCH} \ + file://0001-regression-4011-correct-potential-overflow.patch \ + file://0001-xtest-prevent-unexpected-build-warning-with-strncpy.patch \ +" + +S = "${WORKDIR}/git" + +SRCREV = "eb7f698da9a7fa1587f96aa92ad8668abb0f0f48" + + + +do_compile () { + if [ ${DEFAULTTUNE} = "aarch64" ];then + export TA_DEV_KIT_DIR=${STAGING_INCDIR}/optee/export-user_ta_arm64/ + export ARCH=arm64 + else + export TA_DEV_KIT_DIR=${STAGING_INCDIR}/optee/export-user_ta_arm32/ + export ARCH=arm + fi + export OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}/usr + export CROSS_COMPILE_HOST=${HOST_PREFIX} + export CROSS_COMPILE_TA=${HOST_PREFIX} + export CROSS_COMPILE=${HOST_PREFIX} + export OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ + oe_runmake V=1 +} + +do_install () { + install -d ${D}/usr/bin + install ${S}/out/xtest/xtest ${D}/usr/bin/ + + install -d ${D}/lib/optee_armtz + find ${S}/out/ta -name '*.ta' | while read name; do + install -m 444 $name ${D}/lib/optee_armtz/ + done + +} + +FILES_${PN} = "/usr/bin/ /lib*/optee_armtz/" + +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" -- cgit v1.2.3-54-g00ecf