summaryrefslogtreecommitdiffstats
path: root/recipes-security
diff options
context:
space:
mode:
authorMatteo Facchinetti <matteo.facchinetti@opensource.tttech-auto.com>2023-07-19 11:43:22 +0200
committerMatteo Facchinetti <matteo.facchinetti@opensource.tttech-auto.com>2023-07-24 11:08:49 +0200
commit6171b948125308e40c33f867a624cbcdc476f048 (patch)
treedc59be972e308296e82aa616908e28de5e47de3d /recipes-security
parent52fa68c24a1252eda3399ed40838c2be280ba4ef (diff)
downloadmeta-freescale-6171b948125308e40c33f867a624cbcdc476f048.tar.gz
smw: Add "Security Middleware Library" recipe.
Imported from IMX 6.1.22-2.0.0 BSP. The recipes have been modified to be compatible with the current meta-frescale recipes of OP-TEE. Signed-off-by: Matteo Facchinetti <matteo.facchinetti@opensource.tttech-auto.com>
Diffstat (limited to 'recipes-security')
-rw-r--r--recipes-security/swm/smw_git.bb64
1 files changed, 64 insertions, 0 deletions
diff --git a/recipes-security/swm/smw_git.bb b/recipes-security/swm/smw_git.bb
new file mode 100644
index 00000000..3f77ad06
--- /dev/null
+++ b/recipes-security/swm/smw_git.bb
@@ -0,0 +1,64 @@
1# Copyright 2020-23 NXP
2
3SUMMARY = "NXP i.MX Security Middleware Library"
4DESCRIPTION = "NXP i.MX Security Middleware Library"
5SECTION = "base"
6LICENSE = "BSD-3-Clause"
7LICENSE = "Apache-2.0 & BSD-3-Clause & Zlib"
8LIC_FILES_CHKSUM = "file://LICENSE;md5=8636bd68fc00cc6a3809b7b58b45f982 \
9 file://../psa-arch-tests/LICENSE.md;md5=2a944942e1496af1886903d274dedb13"
10
11DEPENDS = "json-c optee-os optee-client python3-cryptography-native"
12DEPENDS:append:mx8qxp-nxp-bsp = " imx-seco-libs"
13DEPENDS:append:mx8dx-nxp-bsp = " imx-seco-libs"
14DEPENDS:append:mx8ulp-nxp-bsp = " imx-secure-enclave"
15
16SRC_URI = "git://github.com/nxp-imx/imx-smw.git;protocol=https;branch=release/version_2.x;name=smw;destsuffix=git/smw \
17 git://github.com/ARM-software/psa-arch-tests.git;protocol=https;branch=main;name=psa;destsuffix=git/psa-arch-tests \
18 "
19SRCREV_smw = "f0570b3e8cb5f68d54edc4f9dd7cb984f6f604ed"
20SRCREV_psa = "463cb95ada820bc6f758d50066cf8c0ed5cc3a02"
21SRCREV_FORMAT = "smw_psa"
22S = "${WORKDIR}/git/smw"
23
24inherit cmake python3native
25
26CFLAGS[unexport] = "1"
27CPPFLAGS[unexport] = "1"
28AS[unexport] = "1"
29LD[unexport] = "1"
30
31# setting the linker options
32TARGET_LDFLAGS:remove = "${DEBUG_PREFIX_MAP}"
33
34OPTEE_OS_TA_EXPORT_DIR:aarch64 = "${STAGING_INCDIR}/optee/export-user_ta_arm64"
35OPTEE_OS_TA_EXPORT_DIR:arm = "${STAGING_INCDIR}/optee/export-user_ta_arm32"
36
37# Needs to sign OPTEE TAs
38export OPENSSL_MODULES="${STAGING_LIBDIR_NATIVE}/ossl-modules"
39
40EXTRA_OECMAKE = " \
41 -DTA_DEV_KIT_ROOT=${OPTEE_OS_TA_EXPORT_DIR} \
42 -DTEEC_ROOT=${STAGING_DIR_HOST} \
43 -DJSONC_ROOT="${COMPONENTS_DIR}/${TARGET_ARCH}/json-c/usr" \
44 -DPSA_ARCH_TESTS_SRC_PATH=../${PSA_ARCH_TESTS_SRC_PATH} \
45"
46EXTRA_OECMAKE:append:mx8qxp-nxp-bsp = "-DSECO_ROOT=${STAGING_DIR_HOST}"
47EXTRA_OECMAKE:append:mx8dx-nxp-bsp = "-DSECO_ROOT=${STAGING_DIR_HOST}"
48EXTRA_OECMAKE:append:mx8ulp-nxp-bsp = "-DELE_ROOT=${STAGING_DIR_HOST}"
49EXTRA_OECMAKE_IMX:mx93-nxp-bsp = "-DELE_ROOT=${STAGING_DIR_HOST}"
50
51OECMAKE_TARGET_COMPILE += "build_tests"
52OECMAKE_TARGET_INSTALL += "install_tests"
53
54INSANE_SKIP_${PN}-tests = "textrel"
55
56PACKAGES =+ "${PN}-tests"
57
58FILES:${PN} += "${base_libdir}/optee_armtz/*"
59
60FILES:${PN}-tests = "${bindir}/* ${datadir}/${BPN}/*"
61
62RDEPENDS:${PN}-tests += "bash cmake"
63
64COMPATIBLE_MACHINE = "(imx-nxp-bsp)"