Message ID | 20220301161604.1959493-1-ross.burton@arm.com |
---|---|
State | New |
Headers | show |
Series | arm/fvp: check that FVP binaries are present | expand |
On Tue, 1 Mar 2022 16:16:04 +0000, Ross Burton wrote: > 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. Applied, thanks! [1/1] arm/fvp: check that FVP binaries are present commit: b9fefa2482846c0f2ee43cc5d791989b3e486850 Best regards,
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
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 <ross.burton@arm.com> --- meta-arm/recipes-devtools/fvp/fvp-common.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)