diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2022-07-25 19:41:28 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 19:41:28 -0300 |
commit | 3915c0fe53c9e692b1dfd1bbdb6a5b922bf472af (patch) | |
tree | f75cbcfae68356a4bde64f13f70a6ca8fd206d68 /recipes-security/optee-qoriq/optee-os.nxp.inc | |
parent | 28af4ece686e2dda0ae01258cdfafcc16cfaf77c (diff) | |
parent | 5142908182ceb1da79d8245cb2e612deac448508 (diff) | |
download | meta-freescale-3915c0fe53c9e692b1dfd1bbdb6a5b922bf472af.tar.gz |
Merge pull request #1145 from Freescale/backport-1144-to-kirkstone
[Backport kirkstone] [qoriq] Rework cst and optee recipes
Diffstat (limited to 'recipes-security/optee-qoriq/optee-os.nxp.inc')
-rw-r--r-- | recipes-security/optee-qoriq/optee-os.nxp.inc | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/recipes-security/optee-qoriq/optee-os.nxp.inc b/recipes-security/optee-qoriq/optee-os.nxp.inc new file mode 100644 index 00000000..72af6ca4 --- /dev/null +++ b/recipes-security/optee-qoriq/optee-os.nxp.inc | |||
@@ -0,0 +1,75 @@ | |||
1 | # Copyright 2020-2021 NXP | ||
2 | |||
3 | SUMMARY = "OPTEE OS" | ||
4 | DESCRIPTION = "OPTEE OS" | ||
5 | HOMEPAGE = "http://www.optee.org/" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | ||
8 | |||
9 | inherit deploy python3native autotools | ||
10 | DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native" | ||
11 | |||
12 | SRC_URI = "git://source.codeaurora.org/external/qoriq/qoriq-components/optee_os.git;nobranch=1" | ||
13 | SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e" | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" | ||
17 | |||
18 | PLATFORM_FLAVOR ?= "${MACHINE}" | ||
19 | |||
20 | OPTEE_ARCH ?= "arm64" | ||
21 | OPTEE_ARCH:armv7a = "arm32" | ||
22 | OPTEE_ARCH:aarch64 = "arm64" | ||
23 | |||
24 | OPTEE_CORE_LOG_LEVEL ?= "1" | ||
25 | OPTEE_TA_LOG_LEVEL ?= "0" | ||
26 | |||
27 | # Optee-os can be built for 32 bits and 64 bits at the same time | ||
28 | # as long as the compilers are correctly defined. | ||
29 | # For 64bits, CROSS_COMPILE64 must be set | ||
30 | # When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that | ||
31 | # any 32 or 64 bits builds will pass | ||
32 | EXTRA_OEMAKE = " \ | ||
33 | -C ${S} O=${B} \ | ||
34 | PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \ | ||
35 | CROSS_COMPILE=${HOST_PREFIX} \ | ||
36 | CROSS_COMPILE64=${HOST_PREFIX} \ | ||
37 | CFG_WERROR=y \ | ||
38 | CFG_TEE_CORE_LOG_LEVEL=${OPTEE_CORE_LOG_LEVEL} \ | ||
39 | CFG_TEE_TA_LOG_LEVEL=${OPTEE_TA_LOG_LEVEL} \ | ||
40 | " | ||
41 | |||
42 | do_compile() { | ||
43 | unset LDFLAGS | ||
44 | export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
45 | oe_runmake all | ||
46 | } | ||
47 | |||
48 | do_install() { | ||
49 | install -d ${D}${nonarch_base_libdir}/firmware/ | ||
50 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ | ||
51 | |||
52 | # Install the TA devkit | ||
53 | install -d ${D}${includedir}/optee/export-user_ta/ | ||
54 | |||
55 | for f in ${B}/export-ta_${OPTEE_ARCH}/*; do | ||
56 | cp -aR $f ${D}${includedir}/optee/export-user_ta/ | ||
57 | done | ||
58 | |||
59 | install -d ${D}${nonarch_base_libdir}/optee_armtz | ||
60 | find ${B}/export-ta_${OPTEE_ARCH}/ta -name '*.ta' | while read name; do | ||
61 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | ||
62 | done | ||
63 | } | ||
64 | |||
65 | do_deploy() { | ||
66 | install -d ${DEPLOYDIR}/optee | ||
67 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ | ||
68 | } | ||
69 | addtask deploy before do_build after do_install | ||
70 | |||
71 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" | ||
72 | FILES:${PN}-staticdev = "/usr/include/optee/" | ||
73 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | ||
74 | |||
75 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||