From 01825739a4a49d857f7b1a839374da4381b92c2e Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Thu, 14 May 2020 16:47:28 -0400 Subject: [PATCH] trusted-firmware-a: install/deploy multiple variants of the target Installing and deploying .bin and .elf shouldn't be mutually exclusive. There are scenarios where both can be useful - .bin for booting and .elf for debugging. Signed-off-by: Denys Dmytriyenko Reviewed-by: Diego Sueiro Signed-off-by: Jon Mason --- .../trusted-firmware-a/trusted-firmware-a.inc | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc index 25d5179a..f5b5bc16 100644 --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc @@ -116,29 +116,39 @@ do_install() { install -d -m 755 ${D}/firmware for atfbin in ${TFA_INSTALL_TARGET}; do + processes="0" if [ "$atfbin" = "all" ]; then # Target all is not handled by default bberror "all as TFA_INSTALL_TARGET is not handled by do_install" bberror "Please specify valid targets in TFA_INSTALL_TARGET or" bberror "rewrite or turn off do_install" exit 1 - elif [ -f $BUILD_PLAT/$atfbin.bin ]; then + fi + + if [ -f $BUILD_PLAT/$atfbin.bin ]; then echo "Install $atfbin.bin" install -m 0644 $BUILD_PLAT/$atfbin.bin \ ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin - elif [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then + processes="1" + fi + if [ -f $BUILD_PLAT/$atfbin/$atfbin.elf ]; then echo "Install $atfbin.elf" install -m 0644 $BUILD_PLAT/$atfbin/$atfbin.elf \ ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf - elif [ -f $BUILD_PLAT/$atfbin ]; then + processes="1" + fi + if [ -f $BUILD_PLAT/$atfbin ]; then echo "Install $atfbin" install -m 0644 $BUILD_PLAT/$atfbin \ ${D}/firmware/$atfbin-${TFA_PLATFORM} - elif [ "$atfbin" = "dtbs" ]; then + processes="1" + fi + + if [ "$atfbin" = "dtbs" ]; then echo "dtbs install, skipped" elif [ -f ${B}/tools/$atfbin/$atfbin ]; then echo "Tools $atfbin install, skipped" - else + elif [ "$processed" = "0" ]; then bberror "Unsupported TFA_INSTALL_TARGET target $atfbin" exit 1 fi