From b9fefa2482846c0f2ee43cc5d791989b3e486850 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Tue, 1 Mar 2022 16:16:04 +0000 Subject: [PATCH] arm/fvp: check that FVP binaries are present If any of the path computation goes wrong (for example, the compiler changed so FVP_ARCH needs updating) for the real FVP binaries then bindir contains broken link called FVP_*. Solve this by checking that the directory contains FVP binaries and error out if not. Signed-off-by: Ross Burton Signed-off-by: Jon Mason --- meta-arm/recipes-devtools/fvp/fvp-common.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta-arm/recipes-devtools/fvp/fvp-common.inc b/meta-arm/recipes-devtools/fvp/fvp-common.inc index e9978c16..9667892b 100644 --- a/meta-arm/recipes-devtools/fvp/fvp-common.inc +++ b/meta-arm/recipes-devtools/fvp/fvp-common.inc @@ -20,7 +20,11 @@ FVPDIR = "${libdir}/fvp/${BPN}" # Used in do_install to create symlinks in $bindir to $FVPDIR fvp_link_binaries() { - for FVP in ${D}${FVPDIR}/models/${FVP_ARCH}/FVP_*; do + DIR="${D}${FVPDIR}/models/${FVP_ARCH}" + + stat $DIR/FVP_* >/dev/null 2>&1 || bbfatal Cannot find FVP binaries in $DIR + + for FVP in $DIR/FVP_*; do ln -rs $FVP ${D}${bindir}/$(basename $FVP) done # But not the .so files too