blob: 59f461d3b05168ac77e7b6ba8952a146b6fd5fa1 [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"
9
10require trusted-services-src.inc
11
12# By default bitbake includes only ${S} (i.e git/trusted-services) in the maps.
13# We also need to include the TS dependencies source trees.
14DEBUG_PREFIX_MAP:append = "-fmacro-prefix-map=${WORKDIR}/git=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
15 -fdebug-prefix-map=${WORKDIR}/git=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
16"
17
18TS_PLATFORM ?= "ts/mock"
19
20# SP images are embedded into optee-os image
21# FIP packaging is not supported yet
22SP_PACKAGING_METHOD ?= "embedded"
23
24SYSROOT_DIRS += "/usr/opteesp /usr/arm-linux"
25
26# TS cmake files use find_file() to search through source code and build dirs.
27# Yocto cmake class limits CMAKE_FIND_ROOT_PATH and find_file() fails.
28# Include the source tree and build dirs into searchable path.
29OECMAKE_EXTRA_ROOT_PATH = "${WORKDIR}/git/ ${WORKDIR}/build/"
30
31EXTRA_OECMAKE += '-DLIBGCC_LOCATE_CFLAGS="--sysroot=${STAGING_DIR_HOST}" \
32 -DCROSS_COMPILE="${TARGET_PREFIX}" \
33 -DSP_PACKAGING_METHOD="${SP_PACKAGING_METHOD}" \
34 -DTS_PLATFORM="${TS_PLATFORM}" \
35 '
36export CROSS_COMPILE="${TARGET_PREFIX}"
37
38# Default TS installation path
39TS_INSTALL = "/usr/${TS_ENV}"
40
41# Use the Yocto cmake toolchain for arm-linux TS deployments and
42# the TS opteesp toolchain for opteesp TS deployments
43EXTRA_OECMAKE += "${@oe.utils.conditional('TS_ENV', 'opteesp', \
44 '-DCMAKE_TOOLCHAIN_FILE=${S}/environments/${TS_ENV}/default_toolchain_file.cmake', \
45 '-DTS_EXTERNAL_LIB_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake', \
46 d)} \
47 "
48
49# Paths to pre-built dependencies required by some TS SPs/tools
Patrick Williams2194f502022-10-16 14:26:09 -050050EXTRA_OECMAKE += "-Dlibts_ROOT=${STAGING_DIR_HOST}${TS_INSTALL}/lib/cmake/libts/ \
51 -DNEWLIB_INSTALL_DIR=${STAGING_DIR_HOST}${TS_INSTALL}/newlib \
Patrick Williams92b42cb2022-09-03 06:53:57 -050052 "