1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-06-04 14:10:01 +00:00

arm/trusted-services: clone dependencies under ts source tree

Clone all trusted-services dependencies into the TS source tree under
ts-external/ instead of ${UNPACKDIR}

This alignes the layout with devtool git-submodule handling.

NOTICE: we can't clone in external as TS already contains files there
and it would conflict.

Signed-off-by: Arthur Cassegrain <arthur.cassegrain@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Arthur Cassegrain
2026-02-26 11:53:12 +01:00
committed by Jon Mason
parent d5b265ecfd
commit be64772664
2 changed files with 40 additions and 36 deletions
@@ -2,74 +2,78 @@
LICENSE = "Apache-2.0 & BSD-3-Clause & BSD-2-Clause & Zlib"
SRC_URI = "git://git.trustedfirmware.org/TS/trusted-services.git;protocol=https;branch=main;name=trusted-services;destsuffix=trusted-services \
"
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append = "\
file://0001-Allow-configuring-flash-image-files-compile-time.patch \
file://0002-Fix-MbedTLS-3.6-and-GCC-14-compatibility.patch \
file://0001-Relax-pyelftools-dependency.patch \
file://0005-cpputest-fix-cmake-4.0-compatibility.patch \
"
# v1.2.0
SRCREV_trusted-services = "0d55b4c7a8e53958271feb7341e928853b7914cf"
LIC_FILES_CHKSUM = "file://${S}/license.rst;md5=ea160bac7f690a069c608516b17997f4"
S = "${UNPACKDIR}/trusted-services"
PV ?= "0.0+git"
UPSTREAM_CHECK_COMMITS = "1"
# DTC, tag "v1.6.1"
SRC_URI += "git://github.com/dgibson/dtc;name=dtc;protocol=https;branch=main;destsuffix=dtc"
SRC_URI_TRUSTED_SERVICES_DTC = "git://github.com/dgibson/dtc;protocol=https;branch=main"
SRCREV_dtc = "b6910bec11614980a21e46fbccc35934b671bd81"
LIC_FILES_CHKSUM += "file://${UNPACKDIR}/dtc/README.license;md5=a1eb22e37f09df5b5511b8a278992d0e"
LIC_FILES_CHKSUM += "file://ts-external/dtc/README.license;md5=a1eb22e37f09df5b5511b8a278992d0e"
# MbedTLS, tag "v3.6.0"
SRC_URI += "gitsm://github.com/Mbed-TLS/mbedtls;name=mbedtls;protocol=https;branch=master;destsuffix=mbedtls"
SRC_URI_TRUSTED_SERVICES_MBEDTLS = "gitsm://github.com/Mbed-TLS/mbedtls;protocol=https;branch=master"
SRCREV_mbedtls = "2ca6c285a0dd3f33982dd57299012dacab1ff206"
LIC_FILES_CHKSUM += "file://${UNPACKDIR}/mbedtls/LICENSE;md5=379d5819937a6c2f1ef1630d341e026d"
LIC_FILES_CHKSUM += "file://ts-external/mbedtls/LICENSE;md5=379d5819937a6c2f1ef1630d341e026d"
# Nanopb, tag "nanopb-0.4.8" plus some further fixes
SRC_URI += "git://github.com/nanopb/nanopb.git;name=nanopb;protocol=https;branch=master;destsuffix=nanopb"
SRC_URI_TRUSTED_SERVICES_NANOPB = "git://github.com/nanopb/nanopb.git;protocol=https;branch=master"
SRCREV_nanopb = "6cfe48d6f1593f8fa5c0f90437f5e6522587745e"
LIC_FILES_CHKSUM += "file://${UNPACKDIR}/nanopb/LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f"
LIC_FILES_CHKSUM += "file://ts-external/nanopb/LICENSE.txt;md5=9db4b73a55a3994384112efcdb37c01f"
# qcbor, tag "v1.0.0"
SRC_URI += "git://github.com/laurencelundblade/QCBOR.git;name=qcbor;protocol=https;branch=master;destsuffix=qcbor"
SRC_URI_TRUSTED_SERVICES_QCBOR = "git://github.com/laurencelundblade/QCBOR.git;protocol=https;branch=master"
SRCREV_qcbor = "56b17bf9f74096774944bcac0829adcd887d391e"
LIC_FILES_CHKSUM += "file://${UNPACKDIR}/qcbor/README.md;md5=e8ff2e88a722cdc55eddd0bb9aeca002"
LIC_FILES_CHKSUM += "file://ts-external/qcbor/README.md;md5=e8ff2e88a722cdc55eddd0bb9aeca002"
# T_Cose
SRC_URI += "git://github.com/laurencelundblade/t_cose.git;name=tcose;protocol=https;branch=master;destsuffix=tcose"
SRC_URI_TRUSTED_SERVICES_TCOSE = "git://github.com/laurencelundblade/t_cose.git;protocol=https;branch=master"
SRCREV_tcose = "fc3a4b2c7196ff582e8242de8bd4a1bc4eec577f"
LIC_FILES_CHKSUM += "file://${UNPACKDIR}/tcose/LICENSE;md5=b2ebdbfb82602b97aa628f64cf4b65ad"
LIC_FILES_CHKSUM += "file://ts-external/tcose/LICENSE;md5=b2ebdbfb82602b97aa628f64cf4b65ad"
# CppUTest, tag "v3.8"
SRC_URI += "git://github.com/cpputest/cpputest.git;name=cpputest;protocol=https;branch=master;destsuffix=cpputest"
SRC_URI_TRUSTED_SERVICES_CPPUTEST = "git://github.com/cpputest/cpputest.git;protocol=https;branch=master"
SRCREV_cpputest = "e25097614e1c4856036366877a02346c4b36bb5b"
LIC_FILES_CHKSUM += "file://${UNPACKDIR}/cpputest/COPYING;md5=ce5d5f1fe02bcd1343ced64a06fd4177"
LIC_FILES_CHKSUM += "file://ts-external/CppUTest/COPYING;md5=ce5d5f1fe02bcd1343ced64a06fd4177"
SRCREV_FORMAT = "trusted-services_dtc_mbedtls_nanopb_qcbor_tcose_cpputest"
SRC_URI = "git://git.trustedfirmware.org/TS/trusted-services.git;protocol=https;branch=main;name=trusted-services;destsuffix=ts; \
${SRC_URI_TRUSTED_SERVICES_DTC};name=dtc;destsuffix=ts/ts-external/dtc \
${SRC_URI_TRUSTED_SERVICES_MBEDTLS};name=mbedtls;destsuffix=ts/ts-external/mbedtls \
${SRC_URI_TRUSTED_SERVICES_NANOPB};name=nanopb;destsuffix=ts/ts-external/nanopb \
${SRC_URI_TRUSTED_SERVICES_QCBOR};name=qcbor;destsuffix=ts/ts-external/qcbor \
${SRC_URI_TRUSTED_SERVICES_TCOSE};name=tcose;destsuffix=ts/ts-external/tcose \
${SRC_URI_TRUSTED_SERVICES_CPPUTEST};branch=master;name=cpputest;destsuffix=ts/ts-external/CppUTest \
file://0001-Allow-configuring-flash-image-files-compile-time.patch \
file://0002-Fix-MbedTLS-3.6-and-GCC-14-compatibility.patch \
file://0001-Relax-pyelftools-dependency.patch \
file://0005-cpputest-fix-cmake-4.0-compatibility.patch \
"
S = "${UNPACKDIR}/ts"
inherit apply_local_src_patches
LOCAL_SRC_PATCHES_INPUT_DIR = "N/A"
do_apply_local_src_patches() {
apply_local_src_patches ${S}/external/qcbor ${UNPACKDIR}/qcbor
apply_local_src_patches ${S}/external/t_cose ${UNPACKDIR}/tcose
apply_local_src_patches ${S}/external/MbedTLS ${UNPACKDIR}/mbedtls
apply_local_src_patches ${S}/external/CppUTest ${UNPACKDIR}/cpputest
apply_local_src_patches ${S}/external/libfdt ${UNPACKDIR}/dtc
apply_local_src_patches ${S}/external/nanopb ${UNPACKDIR}/nanopb
apply_local_src_patches ${S}/external/qcbor ${S}/ts-external/qcbor
apply_local_src_patches ${S}/external/t_cose ${S}/ts-external/tcose
apply_local_src_patches ${S}/external/MbedTLS ${S}/ts-external/mbedtls
apply_local_src_patches ${S}/external/CppUTest ${S}/ts-external/CppUTest
apply_local_src_patches ${S}/external/libfdt ${S}/ts-external/dtc
apply_local_src_patches ${S}/external/nanopb ${S}/ts-external/nanopb
}
SRCREV_FORMAT = "trusted-services_dtc_mbedtls_nanopb_qcbor_tcose_cpputest"
# Paths to dependencies required by some TS SPs/tools
EXTRA_OECMAKE += "-DDTC_SOURCE_DIR=${UNPACKDIR}/dtc \
-DCPPUTEST_SOURCE_DIR=${UNPACKDIR}/cpputest \
-DNANOPB_SOURCE_DIR=${UNPACKDIR}/nanopb \
-DT_COSE_SOURCE_DIR=${UNPACKDIR}/tcose \
-DQCBOR_SOURCE_DIR=${UNPACKDIR}/qcbor \
-DMBEDTLS_SOURCE_DIR=${UNPACKDIR}/mbedtls \
EXTRA_OECMAKE += "-DDTC_SOURCE_DIR=${S}/ts-external/dtc \
-DMBEDTLS_SOURCE_DIR=${S}/ts-external/mbedtls \
-DNANOPB_SOURCE_DIR=${S}/ts-external/nanopb \
-DQCBOR_SOURCE_DIR=${S}/ts-external/qcbor \
-DT_COSE_SOURCE_DIR=${S}/ts-external/tcose \
-DCPPUTEST_SOURCE_DIR=${S}/ts-external/CppUTest \
"
@@ -28,7 +28,7 @@ SYSROOT_DIRS += "/usr/${TS_ENV} /usr/opteesp /usr/arm-linux"
# TS cmake files use find_file() to search through source code and build dirs.
# Yocto cmake class limits CMAKE_FIND_ROOT_PATH and find_file() fails.
# Include the source tree and build dirs into searchable path.
OECMAKE_EXTRA_ROOT_PATH = "${UNPACKDIR}/ ${B}"
OECMAKE_EXTRA_ROOT_PATH = "${S}/ ${B}"
EXTRA_OECMAKE += '-DLIBGCC_LOCATE_CFLAGS="--sysroot=${STAGING_DIR_HOST}" \
-DCROSS_COMPILE="${TARGET_PREFIX}" \