@@ -39,29 +39,11 @@ toolchain_dir=""
39
39
toolchain_md5_checksum=" "
40
40
41
41
if [[ " ${ARCH} " == " x86_64" ]]; then
42
- # FVPs
43
- corstone300_url=" https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-300/FVP_Corstone_SSE-300_11.22_20_Linux64.tgz?rev=018659bd574f4e7b95fa647e7836ccf4&hash=22A79103C6FA5FFA7AFF3BE0447F3FF9"
44
- corstone300_model_dir=" Linux64_GCC-9.3"
45
- corstone300_md5_checksum=" 98e93b949d0fbac977292d8668d34523"
46
-
47
- corstone320_url=" https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-320/FVP_Corstone_SSE-320_11.27_25_Linux64.tgz?rev=a507bffc219a4d5792f1192ab7002d89&hash=D9A824AA8227D2E679C9B9787FF4E8B6FBE3D7C6"
48
- corstone320_model_dir=" Linux64_GCC-9.3"
49
- corstone320_md5_checksum=" 3deb3c68f9b2d145833f15374203514d"
50
-
51
42
# Vulkan SDK
52
43
vulkan_sdk_url=" https://sdk.lunarg.com/sdk/download/${vulkan_sdk_version} /linux/vulkansdk-linux-x86_64-${vulkan_sdk_version} .tar.xz"
53
44
vulkan_sdk_sha256=" f22a3625bd4d7a32e7a0d926ace16d5278c149e938dac63cecc00537626cbf73"
54
45
55
46
elif [[ " ${ARCH} " == " aarch64" ]] || [[ " ${ARCH} " == " arm64" ]]; then
56
- # FVPs
57
- corstone300_url=" https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-300/FVP_Corstone_SSE-300_11.22_20_Linux64_armv8l.tgz?rev=9cc6e9a32bb947ca9b21fa162144cb01&hash=7657A4CF27D42E892E3F08D452AAB073"
58
- corstone300_model_dir=" Linux64_armv8l_GCC-9.3"
59
- corstone300_md5_checksum=" cbbabbe39b07939cff7a3738e1492ef1"
60
-
61
- corstone320_url=" https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-320/FVP_Corstone_SSE-320_11.27_25_Linux64_armv8l.tgz?rev=b6ebe0923cb84f739e017385fd3c333c&hash=8965C4B98E2FF7F792A099B08831FE3CB6120493"
62
- corstone320_model_dir=" Linux64_armv8l_GCC-9.3"
63
- corstone320_md5_checksum=" 3889f1d80a6d9861ea4aa6f1c88dd0ae"
64
-
65
47
# Vulkan SDK
66
48
vulkan_sdk_url=" https://github.com/jakoch/vulkan-sdk-arm/releases/download/1.4.321.1/vulkansdk-ubuntu-22.04-arm-1.4.321.1.tar.xz"
67
49
vulkan_sdk_sha256=" c57e318d0940394d3a304034bb7ddabda788b5b0b54638e80e90f7264efe9f84"
@@ -216,76 +198,6 @@ function setup_root_dir() {
216
198
setup_path_script=" ${root_dir} /setup_path"
217
199
}
218
200
219
- function check_fvp_eula () {
220
- # Mandatory user arg --i-agree-to-the-contained-eula
221
- eula_acceptance_by_variable=" ${ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA:- False} "
222
-
223
- if [[ " ${eula_acceptance} " -eq 0 ]]; then
224
- if [[ ${eula_acceptance_by_variable} != " True" ]]; then
225
- echo " Must pass argument '--i-agree-to-the-contained-eula' to agree to EULA associated with downloading the FVP."
226
- echo " Alternativly set environment variable ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA=True."
227
- echo " Exiting!"
228
- exit 1
229
- else
230
- echo " Arm EULA for FVP agreed to with ARM_FVP_INSTALL_I_AGREE_TO_THE_CONTAINED_EULA=True environment variable"
231
- fi
232
- fi
233
- }
234
-
235
- function setup_fvp() {
236
- # check EULA, forward argument
237
- check_fvp_eula
238
-
239
- if [[ " ${OS} " != " Linux" ]]; then
240
- # Check if FVP is callable
241
- if command -v FVP_Corstone_SSE-300_Ethos-U55 & > /dev/null; then
242
- echo " [${FUNCNAME[0]} ] Info: FVP for MacOS seem to be installed. Continuing..."
243
- return 0 # If true exit gracefully and proceed with setup
244
- else
245
- echo " [${FUNCNAME[0]} ] Warning: FVP only supported with Linux OS, skipping FVP setup..."
246
- echo " [${FUNCNAME[0]} ] Warning: For MacOS, using https://github.com/Arm-Examples/FVPs-on-Mac is recommended."
247
- echo " [${FUNCNAME[0]} ] Warning: Follow the instructions and make sure the path is set correctly."
248
- return 1 # Throw error. User need to install FVP according to ^^^
249
- fi
250
- fi
251
-
252
- # Download and install the Corstone 300 FVP simulator platform
253
- fvps=(" corstone300" " corstone320" )
254
-
255
- for fvp in " ${fvps[@]} " ; do
256
- cd " ${root_dir} "
257
- if [[ ! -e " FVP_${fvp} .tgz" ]]; then
258
- echo " [${FUNCNAME[0]} ] Downloading FVP ${fvp} ..."
259
- url_variable=${fvp} _url
260
- fvp_url=${! url_variable}
261
- curl --output " FVP_${fvp} .tgz" " ${fvp_url} "
262
- md5_variable=${fvp} _md5_checksum
263
- fvp_md5_checksum=${! md5_variable}
264
- verify_md5 ${fvp_md5_checksum} FVP_${fvp} .tgz || exit 1
265
- fi
266
-
267
- echo " [${FUNCNAME[0]} ] Installing FVP ${fvp} ..."
268
- rm -rf FVP-${fvp}
269
- mkdir -p FVP-${fvp}
270
- cd FVP-${fvp}
271
- tar xf ../FVP_${fvp} .tgz
272
-
273
- # Install the FVP
274
- case ${fvp} in
275
- corstone300)
276
- ./FVP_Corstone_SSE-300.sh --i-agree-to-the-contained-eula --force --destination ./ --quiet --no-interactive
277
- ;;
278
- corstone320)
279
- ./FVP_Corstone_SSE-320.sh --i-agree-to-the-contained-eula --force --destination ./ --quiet --no-interactive
280
- ;;
281
- * )
282
- echo " [${FUNCNAME[0]} ] Error: Unknown FVP model ${fvp} . Exiting."
283
- exit 1
284
- ;;
285
- esac
286
- done
287
- }
288
-
289
201
function setup_vulkan_sdk() {
290
202
291
203
if command -v vulkaninfo > /dev/null 2>&1 ; then
@@ -395,20 +307,7 @@ function create_setup_path(){
395
307
echo " " > " ${setup_path_script} .fish"
396
308
397
309
if [[ " ${enable_fvps} " -eq 1 ]]; then
398
- fvps=(" corstone300" " corstone320" )
399
- for fvp in " ${fvps[@]} " ; do
400
- model_dir_variable=${fvp} _model_dir
401
- fvp_model_dir=${! model_dir_variable}
402
- fvp_bin_path=" ${root_dir} /FVP-${fvp} /models/${fvp_model_dir} "
403
- append_env_in_setup_path PATH ${fvp_bin_path}
404
- done
405
-
406
- # Fixup for Corstone-320 python dependency
407
- append_env_in_setup_path LD_LIBRARY_PATH " ${root_dir} /FVP-corstone320/python/lib/"
408
-
409
- echo " hash FVP_Corstone_SSE-300_Ethos-U55" >> ${setup_path_script} .sh
410
- echo " hash FVP_Corstone_SSE-300_Ethos-U65" >> ${setup_path_script} .sh
411
- echo " hash FVP_Corstone_SSE-320" >> ${setup_path_script} .sh
310
+ setup_path_fvp
412
311
fi
413
312
414
313
if [[ " ${enable_baremetal_toolchain} " -eq 1 ]]; then
@@ -468,6 +367,8 @@ if [[ $is_script_sourced -eq 0 ]]; then
468
367
469
368
check_options " $@ "
470
369
370
+ source $et_dir /backends/arm/scripts/fvp_utils.sh
371
+
471
372
check_platform_support
472
373
473
374
cd " ${script_dir} "
@@ -499,7 +400,9 @@ if [[ $is_script_sourced -eq 0 ]]; then
499
400
500
401
# Setup FVP
501
402
if [[ " ${enable_fvps} " -eq 1 ]]; then
403
+ check_fvp_eula
502
404
setup_fvp
405
+ install_fvp
503
406
fi
504
407
505
408
# Setup Vulkan SDK
0 commit comments