From efbe96589bb4fb7d5dd8fe548f9b4d7e4c4e945c Mon Sep 17 00:00:00 2001 From: Fredrik Knutsson Date: Wed, 5 Feb 2025 10:29:43 +0100 Subject: [PATCH] [ArmBackend] Fix in setup.sh for MacOS Make sure setup continues if FVP's are already installed Change-Id: Ic35ca364c239e5795f9250ddb7621a3c5bae4bcf --- examples/arm/setup.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/arm/setup.sh b/examples/arm/setup.sh index 8b4cd275e4d..79a15f55383 100755 --- a/examples/arm/setup.sh +++ b/examples/arm/setup.sh @@ -96,10 +96,16 @@ function setup_fvp() { shift; # drop this arg fi if [[ "${OS}" != "Linux" ]]; then - echo "[${FUNCNAME[0]}] Warning: FVP only supported with Linux OS, skipping FVP setup..." - echo "[${FUNCNAME[0]}] Warning: For MacOS, using https://github.com/Arm-Examples/FVPs-on-Mac is recommended." - echo "[${FUNCNAME[0]}] Warning: Follow the instructions and make sure the path is set correctly." - return 1 + # Check if FVP is callable + if command -v FVP_Corstone_SSE-300_Ethos-U55 &> /dev/null; then + echo "[${FUNCNAME[0]}] Info: FVP for MacOS seem to be installed. Continuing..." + return 0 # If true exit gracefully and proceed with setup + else + echo "[${FUNCNAME[0]}] Warning: FVP only supported with Linux OS, skipping FVP setup..." + echo "[${FUNCNAME[0]}] Warning: For MacOS, using https://github.com/Arm-Examples/FVPs-on-Mac is recommended." + echo "[${FUNCNAME[0]}] Warning: Follow the instructions and make sure the path is set correctly." + return 1 # Throw error. User need to install FVP according to ^^^ + fi fi # Download and install the Corstone 300 FVP simulator platform