blob: 88c46a74b9982683713e601824d92476274f603b [file] [log] [blame]
Brad Bishopbec4ebc2022-08-03 09:55:16 -04001FILESEXTRAPATHS:prepend := "${THISDIR}/secure-partitions/corstone1000:"
2
3COMPATIBLE_MACHINE = "corstone1000"
4
5LIC_FILES_CHKSUM += "file://../mbedtls/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
6 file://../nanopb/LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f \
7 file://../openamp/LICENSE.md;md5=a8d8cf662ef6bf9936a1e1413585ecbf \
8 file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c \
9 file://../psa-arch-tests/LICENSE.md;md5=2a944942e1496af1886903d274dedb13 \
10 "
11
12SRC_URI:append = " \
13 ${SRC_URI_MBEDTLS} ${SRC_URI_NANOPB} ${SRC_URI_OPENAMP} ${SRC_URI_LIBMETAL} ${SRC_URI_ARCH-TESTS}\
14 file://0001-tools-cmake-common-applying-lowercase-project-conven.patch \
15 file://0002-fix-EARLY_TA_PATHS-env-variable.patch \
16 file://0003-se-proxy-dts-add-se-proxy-as-child-node.patch \
17 file://0004-Update-mm-comm-buffer-region-in-dts-file.patch \
18 file://0005-Configure-NV-storage-macro.patch \
19 file://0006-Use-device-region.patch \
20 file://0007-Add-openamp-to-SE-proxy-deployment.patch \
21 file://0008-Implement-mhu-driver-and-the-OpenAmp-conversion-laye.patch \
22 file://0009-Add-openamp-rpc-caller.patch \
23 file://0010-add-psa-client-definitions-for-ff-m.patch \
24 file://0011-Add-common-service-component-to-ipc-support.patch \
25 file://0012-Add-secure-storage-ipc-backend.patch \
26 file://0013-Use-secure-storage-ipc-and-openamp-for-se_proxy.patch \
27 file://0014-Add-uefi-variable-append-write-support.patch \
28 file://0015-Add-UEFI-variable-support-for-QueryVariableInfo.patch \
29 file://0016-Add-uefi-test-deployment.patch \
30 file://0017-Fix-interface-ID-parameter-setting-in-sp-ffarpc_call.patch \
31 file://0018-Support-FFARPC-call-requests-with-no-shared-buffer.patch \
32 file://0019-Run-psa-arch-test.patch \
33 file://0020-Use-address-instead-of-pointers.patch \
34 file://0021-Add-psa-ipc-attestation-to-se-proxy.patch \
35 file://0022-Setup-its-backend-as-openamp-rpc-using-secure-storag.patch \
36 file://0023-add-psa-ipc-crypto-backend.patch \
37 file://0024-Increase-SMM-gateway-UEFI-variable-macro-value.patch \
38 file://0025-Add-stub-capsule-update-service-components.patch \
39 file://0026-Add-logs-to-functions-in-SMM-gateway-SP.patch \
40 file://0027-Configure-storage-size.patch \
41 file://0028-Revert-Add-uefi-variable-append-write-support.patch \
42 file://0029-Change-UID-of-variable-index-in-SMM.patch \
43 file://0030-Add-missing-features-to-setVariable.patch \
44 file://0031-Add-invalid-parameter-check-in-getNextVariableName.patch \
45 file://0032-smm_gateway-add-checks-for-null-attributes.patch \
46 file://0033-Enhance-mbedtls-fetch-process.patch \
47 file://0034-Fix-format-specifier-in-logging_caller.patch \
48 file://0035-Update-refspecs-for-mbedtls-and-psa-arch-tests-for-v.patch \
49 file://0036-Separate-sign-verify-message-and-hash-operations.patch \
50 file://0037-Add-defence-against-uninitialised-multi-part-transac.patch \
51 file://0038-Integrate-AEAD-operation-support.patch \
52 file://0039-Add-IV-generation-to-one-shot-cipher-operation.patch \
53 file://0040-Fix-multi-part-termination-on-error.patch \
54 file://0041-Abort-AEAD-operation-if-client-provided-buffer-is-to.patch \
55 file://0042-Peg-to-updated-t_cose-version-fc3a4b2c.patch \
56 file://0043-pass-sysroot_yocto.patch \
57 file://0044-Fix-Crypto-interface-structure-aligned-with-tf-m-cha.patch \
58 file://0045-Integrate-remaining-psa-ipc-client-APIs.patch \
59 file://0046-Fix-update-psa_set_key_usage_flags-definition-to-the.patch \
60 file://0047-Fixes-in-AEAD-for-psa-arch-test-54-and-58.patch \
61 file://0003-corstone1000-port-crypto-config.patch;patchdir=../psa-arch-tests \
62 "
63
64SRC_URI_MBEDTLS = "git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=development;name=mbedtls;destsuffix=git/mbedtls"
65SRCREV_mbedtls = "d65aeb37349ad1a50e0f6c9b694d4b5290d60e49"
66
67SRC_URI_NANOPB = "git://github.com/nanopb/nanopb.git;name=nanopb;protocol=https;branch=master;destsuffix=git/nanopb"
68SRCREV_nanopb = "df0e92f474f9cca704fe2b31483f0b4d1b1715a4"
69
70SRC_URI_OPENAMP = "git://github.com/OpenAMP/open-amp.git;name=openamp;protocol=https;branch=main;destsuffix=git/openamp"
71SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d"
72
73SRC_URI_LIBMETAL = "git://github.com/OpenAMP/libmetal.git;name=libmetal;protocol=https;branch=main;destsuffix=git/libmetal"
74SRCREV_libmetal = "f252f0e007fbfb8b3a52b1d5901250ddac96baad"
75
76SRC_URI_ARCH-TESTS = "git://github.com/bensze01/psa-arch-tests.git;name=psa-arch-tests;protocol=https;nobranch=1;destsuffix=git/psa-arch-tests"
77SRCREV_psa-arch-tests = "5d1a87f9c0a82e1632a3145687b4c8d7cbbeed2d"
78
79TS_ENVIRONMENT_LINUX = "arm-linux"
80TS_PLATFORM = "arm/corstone1000"
81TS_ENVIRONMENT = "opteesp"
82SP_PACKAGING_METHOD = "embedded"
83
84# Secure Enclave proxy secure partition
85TS_DEPLOYMENTS += "'deployments/se-proxy/${TS_ENVIRONMENT}'"
86
87# smm-gateway secure partition
88TS_DEPLOYMENTS += "'deployments/smm-gateway/${TS_ENVIRONMENT}'"
89
90PSA_API_TESTS = "deployments/psa-api-test/protected_storage/${TS_ENVIRONMENT_LINUX}"
91PSA_API_TESTS += "deployments/psa-api-test/internal_trusted_storage/${TS_ENVIRONMENT_LINUX}"
92PSA_API_TESTS += "deployments/psa-api-test/initial_attestation/${TS_ENVIRONMENT_LINUX}"
93PSA_API_TESTS += "deployments/psa-api-test/crypto/${TS_ENVIRONMENT_LINUX}"
94
95# ffa-debugfs-mod provides arm_ffa_user.h needed by psa-arch-tests source-code
96DEPENDS += "ffa-debugfs-mod"
97
98do_configure:append() {
99 for PSA_API_TEST in ${PSA_API_TESTS}; do
100 cmake \
101 -DSYSROOT_YOCTO=${RECIPE_SYSROOT} \
102 -S ${S}/$PSA_API_TEST -B "${B}/$PSA_API_TEST"
103 done
104}
105
106do_compile:append() {
107 for PSA_API_TEST in ${PSA_API_TESTS}; do
108 cmake --build "${B}/$PSA_API_TEST"
109 done
110}
111
112do_install:append() {
113 for PSA_API_TEST in ${PSA_API_TESTS}; do
114 install -d -m 0755 ${D}${libdir}/${PSA_API_TEST}
115 install -d -m 0755 ${D}${includedir}/${PSA_API_TEST}
116 psafile_fullpath=`ls ${B}/${PSA_API_TEST}/psa-*`
117 psafile_filename="`basename -s .bin ${psafile_fullpath}`"
118 install -D -p -m 0755 ${psafile_fullpath} ${D}/${bindir}/${psafile_filename}
119 done
120 cp -rf ${B}/${PSA_API_TEST}/libts_install/arm-linux/lib/*.so* ${D}/${libdir}
121}
122
123FILES:${PN}-dev = "${includedir}/deployments/psa-api-test/"
124INSANE_SKIP:${PN}-psa-api-tests += "rpaths dev-so buildpaths"
125PACKAGES += "${PN}-psa-api-tests"
126FILES:${PN}-psa-api-tests = "${libdir} ${bindir}"