blob: c64a1d410028cd8b1f6035b7724cdd18f1635f88 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001SUMMARY ?= "The Trusted Services: framework for developing root-of-trust services"
2HOMEPAGE = "https://trusted-services.readthedocs.io/en/latest/index.html"
3
4LICENSE = "Apache-2.0 & BSD-3-Clause & Zlib"
5
6inherit python3native cmake
7
8COMPATIBLE_HOST = "aarch64.*-linux"
Andrew Geissler517393d2023-01-13 08:55:19 -06009COMPATIBLE_MACHINE ?= "invalid"
10COMPATIBLE_MACHINE:qemuarm64-secureboot = "qemuarm64-secureboot"
Patrick Williams92b42cb2022-09-03 06:53:57 -050011
12require trusted-services-src.inc
13
14# By default bitbake includes only ${S} (i.e git/trusted-services) in the maps.
15# We also need to include the TS dependencies source trees.
16DEBUG_PREFIX_MAP:append = "-fmacro-prefix-map=${WORKDIR}/git=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
17 -fdebug-prefix-map=${WORKDIR}/git=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
18"
19
20TS_PLATFORM ?= "ts/mock"
21
22# SP images are embedded into optee-os image
23# FIP packaging is not supported yet
24SP_PACKAGING_METHOD ?= "embedded"
25
26SYSROOT_DIRS += "/usr/opteesp /usr/arm-linux"
27
28# TS cmake files use find_file() to search through source code and build dirs.
29# Yocto cmake class limits CMAKE_FIND_ROOT_PATH and find_file() fails.
30# Include the source tree and build dirs into searchable path.
31OECMAKE_EXTRA_ROOT_PATH = "${WORKDIR}/git/ ${WORKDIR}/build/"
32
33EXTRA_OECMAKE += '-DLIBGCC_LOCATE_CFLAGS="--sysroot=${STAGING_DIR_HOST}" \
34 -DCROSS_COMPILE="${TARGET_PREFIX}" \
35 -DSP_PACKAGING_METHOD="${SP_PACKAGING_METHOD}" \
36 -DTS_PLATFORM="${TS_PLATFORM}" \
37 '
38export CROSS_COMPILE="${TARGET_PREFIX}"
39
40# Default TS installation path
41TS_INSTALL = "/usr/${TS_ENV}"
42
43# Use the Yocto cmake toolchain for arm-linux TS deployments and
44# the TS opteesp toolchain for opteesp TS deployments
45EXTRA_OECMAKE += "${@oe.utils.conditional('TS_ENV', 'opteesp', \
46 '-DCMAKE_TOOLCHAIN_FILE=${S}/environments/${TS_ENV}/default_toolchain_file.cmake', \
47 '-DTS_EXTERNAL_LIB_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake', \
48 d)} \
49 "
50
51# Paths to pre-built dependencies required by some TS SPs/tools
Patrick Williams2194f502022-10-16 14:26:09 -050052EXTRA_OECMAKE += "-Dlibts_ROOT=${STAGING_DIR_HOST}${TS_INSTALL}/lib/cmake/libts/ \
53 -DNEWLIB_INSTALL_DIR=${STAGING_DIR_HOST}${TS_INSTALL}/newlib \
Patrick Williams92b42cb2022-09-03 06:53:57 -050054 "