Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | SUMMARY ?= "The Trusted Services: framework for developing root-of-trust services" |
| 2 | HOMEPAGE = "https://trusted-services.readthedocs.io/en/latest/index.html" |
| 3 | |
| 4 | LICENSE = "Apache-2.0 & BSD-3-Clause & Zlib" |
| 5 | |
| 6 | inherit python3native cmake |
| 7 | |
| 8 | COMPATIBLE_HOST = "aarch64.*-linux" |
| 9 | |
| 10 | require 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. |
| 14 | DEBUG_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 | |
| 18 | TS_PLATFORM ?= "ts/mock" |
| 19 | |
| 20 | # SP images are embedded into optee-os image |
| 21 | # FIP packaging is not supported yet |
| 22 | SP_PACKAGING_METHOD ?= "embedded" |
| 23 | |
| 24 | SYSROOT_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. |
| 29 | OECMAKE_EXTRA_ROOT_PATH = "${WORKDIR}/git/ ${WORKDIR}/build/" |
| 30 | |
| 31 | EXTRA_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 | ' |
| 36 | export CROSS_COMPILE="${TARGET_PREFIX}" |
| 37 | |
| 38 | # Default TS installation path |
| 39 | TS_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 |
| 43 | EXTRA_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 Williams | 2194f50 | 2022-10-16 14:26:09 -0500 | [diff] [blame^] | 50 | EXTRA_OECMAKE += "-Dlibts_ROOT=${STAGING_DIR_HOST}${TS_INSTALL}/lib/cmake/libts/ \ |
| 51 | -DNEWLIB_INSTALL_DIR=${STAGING_DIR_HOST}${TS_INSTALL}/newlib \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 52 | " |