mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-06-06 02:40:18 +00:00
arm/trusted-firmware-m: clean up configure/compile
Move B up a level so the build tree is entirely separate from the source tree. Use [cleandirs] to ensure that B is present and empty when rebuilding, and remove now redundant code. Finally add some comments to explain why trying to use cmake.bbclass is pointless. Change-Id: Ic8ddc08c46b9e945023e0b0a6e4ca1a6294b726b Signed-off-by: Ross Burton <ross.burton@arm.com>
This commit is contained in:
@@ -30,6 +30,11 @@ SRCREV_mbed-crypto ?= "mbedcrypto-3.0.1"
|
||||
SRCREV_mbedtls ?= "mbedtls-2.7.14"
|
||||
SRCREV_cmsis ?= "5.5.0"
|
||||
|
||||
# Note to future readers of this recipe: until the CMakeLists don't abuse
|
||||
# installation (see do_install) there is no point in trying to inherit
|
||||
# cmake here. You can easily short-circuit the toolchain but the install
|
||||
# is so convoluted there's no gain.
|
||||
|
||||
inherit python3native deploy
|
||||
|
||||
TFM_DEPENDS ?= ""
|
||||
@@ -39,7 +44,7 @@ DEPENDS += "python3-cryptography-native python3-pyasn1-native"
|
||||
DEPENDS += "python3-jinja2-native python3-cbor-native python3-pyyaml-native"
|
||||
|
||||
S = "${WORKDIR}/git/tfm"
|
||||
B = "${S}/build"
|
||||
B = "${WORKDIR}/build"
|
||||
|
||||
COMPATIBLE_MACHINE ?= "invalid"
|
||||
|
||||
@@ -89,28 +94,21 @@ do_check_config() {
|
||||
fi
|
||||
}
|
||||
|
||||
do_configure[cleandirs] = "${B}"
|
||||
do_configure() {
|
||||
cd ${S}
|
||||
python3 "tools/tfm_parse_manifest_list.py"
|
||||
python3 tools/tfm_parse_manifest_list.py
|
||||
cd -
|
||||
|
||||
if [ ! -d "${B}" ]
|
||||
then
|
||||
install -d ${B}
|
||||
else
|
||||
rm -f ${B}/CMakeCache.txt
|
||||
fi
|
||||
|
||||
cd ${B}
|
||||
cmake -G"Unix Makefiles" --build ${S} ${EXTRA_OECMAKE}
|
||||
}
|
||||
|
||||
# Invoke install here as there's no point in splitting compile from install: the
|
||||
# first thing the build does is 'install' inside the build tree thus causing a
|
||||
# rebuild. It also overrides the install prefix to be in the build tree, so you
|
||||
# can't use the usual install prefix variables.
|
||||
do_compile() {
|
||||
if [ -d "${B}" ]
|
||||
then
|
||||
oe_runmake -C ${B} install
|
||||
else
|
||||
bbfatal "TF-M CMake not generated!"
|
||||
fi
|
||||
oe_runmake install
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
||||
Reference in New Issue
Block a user