From 3f501cdb5b1fb6da41a94a6d48e4d9d7cbe61b73 Mon Sep 17 00:00:00 2001 From: Ting Liu Date: Tue, 15 Dec 2020 16:45:57 +0800 Subject: optee-test-qoriq: upgrade to 3.8.0 Switch to use codes from https://github.com/OP-TEE/optee_test, tag: 3.8.0 Signed-off-by: Ting Liu --- .../0001-fix-build-failure-with-GCC-9.patch | 28 ------------ .../0001-use-python3-instead-of-python.patch | 48 --------------------- recipes-security/optee/optee-test-qoriq_3.8.0.bb | 47 ++++++++++++++++++++ recipes-security/optee/optee-test-qoriq_git.bb | 50 ---------------------- 4 files changed, 47 insertions(+), 126 deletions(-) delete mode 100644 recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch delete mode 100644 recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch create mode 100644 recipes-security/optee/optee-test-qoriq_3.8.0.bb delete mode 100644 recipes-security/optee/optee-test-qoriq_git.bb (limited to 'recipes-security') diff --git a/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch b/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch deleted file mode 100644 index 9b9127777..000000000 --- a/recipes-security/optee/optee-test-qoriq/0001-fix-build-failure-with-GCC-9.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 79330c8383e02e91a355964a3cc7b932d03c2517 Mon Sep 17 00:00:00 2001 -From: Chunrong Guo -Date: Wed, 10 Jul 2019 11:09:01 +0200 -Subject: [PATCH] fix build failure with GCC 9 - -Upstream-Status: Inappropriate [embedded specific] - -Signed-off-by: C.r. Guo ---- - host/xtest/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/host/xtest/Makefile b/host/xtest/Makefile -index e4e2881..e86e056 100644 ---- a/host/xtest/Makefile -+++ b/host/xtest/Makefile -@@ -152,7 +152,7 @@ CFLAGS += -Wall -Wcast-align -Werror \ - -Wmissing-include-dirs -Wmissing-noreturn \ - -Wmissing-prototypes -Wnested-externs -Wpointer-arith \ - -Wshadow -Wstrict-prototypes -Wswitch-default \ -- -Wwrite-strings \ -+ -Wwrite-strings -Wno-format-overflow \ - -Wno-missing-field-initializers -Wno-format-zero-length - endif - --- -2.7.4 - diff --git a/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch b/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch deleted file mode 100644 index 20f190af9..000000000 --- a/recipes-security/optee/optee-test-qoriq/0001-use-python3-instead-of-python.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 6271160639002a2580d80b75b5397a96d56329f2 Mon Sep 17 00:00:00 2001 -From: Scott Branden -Date: Fri, 27 Dec 2019 12:54:28 -0800 -Subject: [PATCH] use python3 instead of python - -use python3 instead of python as python2 is EOL January 2020. - -Signed-off-by: Scott Branden -Reviewed-by: Jerome Forissier -Tested-by: Jerome Forissier (QEMU, CFG_GCM_NIST_VECTORS=y) -Upstream-Status: Backport from v3.8.0 ---- - scripts/file_to_c.py | 4 ++-- - scripts/rsp_to_gcm_test.py | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/scripts/file_to_c.py b/scripts/file_to_c.py -index ae16f52..b4ce2a2 100755 ---- a/scripts/file_to_c.py -+++ b/scripts/file_to_c.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # SPDX-License-Identifier: BSD-2-Clause - # - # Copyright (c) 2018, Linaro Limited -@@ -29,7 +29,7 @@ def main(): - - f.write("const uint8_t " + args.name + "[] = {\n") - i = 0 -- for x in array.array("B", inf.read()): -+ for x in array.array("B", map(ord, (inf.read()))): - f.write("0x" + '{0:02x}'.format(x) + ",") - i = i + 1 - if i % 8 == 0: -diff --git a/scripts/rsp_to_gcm_test.py b/scripts/rsp_to_gcm_test.py -index 0543541..e4418be 100755 ---- a/scripts/rsp_to_gcm_test.py -+++ b/scripts/rsp_to_gcm_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - modes = {'encrypt': 0, 'decrypt': 1} - --- -2.7.4 - diff --git a/recipes-security/optee/optee-test-qoriq_3.8.0.bb b/recipes-security/optee/optee-test-qoriq_3.8.0.bb new file mode 100644 index 000000000..f46f8c6fd --- /dev/null +++ b/recipes-security/optee/optee-test-qoriq_3.8.0.bb @@ -0,0 +1,47 @@ +SUMMARY = "OP-TEE sanity testsuite" +HOMEPAGE = "https://github.com/OP-TEE/optee_test" + +LICENSE = "BSD & GPLv2" +LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" + +DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycryptodome-native" + +inherit python3native + +SRC_URI = "git://github.com/OP-TEE/optee_test;nobranch=1" +SRCREV = "30481e381cb4285706e7516853495a7699c93b2c" + +S = "${WORKDIR}/git" + +OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}" +TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" +TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" + +EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ + OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ + CFG_ARM64=y \ + CROSS_COMPILE_HOST=${TARGET_PREFIX} \ + CROSS_COMPILE_TA=${TARGET_PREFIX} \ + V=1 \ + " + +do_compile() { + # Top level makefile doesn't seem to handle parallel make gracefully + oe_runmake xtest + oe_runmake ta +} + +do_install () { + install -D -p -m0755 ${S}/out/xtest/xtest ${D}${bindir}/xtest + + # install path should match the value set in optee-client/tee-supplicant + # default TEEC_LOAD_PATH is /lib + mkdir -p ${D}/lib/optee_armtz/ + install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}/lib/optee_armtz/ +} + +FILES_${PN} += "/lib/optee_armtz/" + +# Imports machine specific configs from staging to build +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(qoriq-arm64)" diff --git a/recipes-security/optee/optee-test-qoriq_git.bb b/recipes-security/optee/optee-test-qoriq_git.bb deleted file mode 100644 index b66725c7b..000000000 --- a/recipes-security/optee/optee-test-qoriq_git.bb +++ /dev/null @@ -1,50 +0,0 @@ -SUMMARY = "OP-TEE sanity testsuite" -HOMEPAGE = "https://github.com/qoriq-open-source/optee_test" - -LICENSE = "BSD & GPLv2" -LIC_FILES_CHKSUM = "file://${S}/LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" - -DEPENDS = "optee-client-qoriq optee-os-qoriq python3-pycrypto-native" - -inherit python3native - -SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_test;nobranch=1 \ - file://0001-fix-build-failure-with-GCC-9.patch \ - file://0001-use-python3-instead-of-python.patch \ -" -S = "${WORKDIR}/git" - -SRCREV = "669058459e4a544be12f37dab103ee4c2b32e31d" - -OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}" -TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" -TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" - -EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ - OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ - CFG_ARM64=y \ - CROSS_COMPILE_HOST=${TARGET_PREFIX} \ - CROSS_COMPILE_TA=${TARGET_PREFIX} \ - V=1 \ - " - -do_compile() { - # Top level makefile doesn't seem to handle parallel make gracefully - oe_runmake xtest - oe_runmake ta -} - -do_install () { - install -D -p -m0755 ${S}/out/xtest/xtest ${D}${bindir}/xtest - - # install path should match the value set in optee-client/tee-supplicant - # default TEEC_LOAD_PATH is /lib - mkdir -p ${D}/lib/optee_armtz/ - install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}/lib/optee_armtz/ -} - -FILES_${PN} += "/lib/optee_armtz/" - -# Imports machine specific configs from staging to build -PACKAGE_ARCH = "${MACHINE_ARCH}" -COMPATIBLE_MACHINE = "(qoriq-arm64)" -- cgit v1.2.3-54-g00ecf