fvp jobs: refactor yaml generation
Current yaml generation is static: templates consider only subset of
possibe artefacts (.bin files) leading to multiple failures mostly
related to missing binaries required from the model parameters [1].
The proposed approach considers all possible artifacts in the
templates then based on the model parameters, keeps the ones
needed. (Hash) Arrays are being used to keep track of variables and
URL values, making much more scalable and readable. As a secondary
change: shorter macro names are used in both templates and the
possibility to pass a different (Linux) 'prompt' depending on the
model.
In general, this is full refactor of the yaml generation code, this
time aware of all possible artifacts, improving code for easier future
maintenance.
Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I6bd89caee065849fe7422653c29e7bba6cb322b9
diff --git a/script/gen_fvp_linux_yaml.sh b/script/gen_fvp_linux_yaml.sh
index 526f280..903c48d 100755
--- a/script/gen_fvp_linux_yaml.sh
+++ b/script/gen_fvp_linux_yaml.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
-# Copyright (c) 2019-2020 Arm Limited. All rights reserved.
+# Copyright (c) 2019-2021 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -11,7 +11,7 @@
cat <<EOF
device_type: fvp
-job_name: fvp-linux-\${MODEL}
+job_name: fvp-linux-{MODEL}
timeouts:
connection:
@@ -35,30 +35,60 @@
- deploy:
to: fvp
images:
+ backup_fip:
+ url: {BACKUP_FIP}
bl1:
- url: \${ACTIONS_DEPLOY_IMAGES_BL1}
- fip:
- url: \${ACTIONS_DEPLOY_IMAGES_FIP}
+ url: {BL1}
+ bl2:
+ url: {BL2}
+ bl31:
+ url: {BL31}
+ bl32:
+ url: {BL32}
dtb:
- url: \${ACTIONS_DEPLOY_IMAGES_DTB}
+ url: {DTB}
+ el3_payload:
+ url: {EL3_PAYLOAD}
+ fip:
+ url: {FIP}
+ fwu_fip:
+ url: {FWU_FIP}
image:
- url: \${ACTIONS_DEPLOY_IMAGES_IMAGE}
+ url: {IMAGE}
+ ns_bl1u:
+ url: {NS_BL1U}
+ ns_bl2u:
+ url: {NS_BL2U}
ramdisk:
- url: \${ACTIONS_DEPLOY_IMAGES_RAMDISK}
+ url: {RAMDISK}
+ romlib:
+ url: {ROMLIB}
+ rootfs:
+ url: {ROOTFS}
+ compression: gz
+ spm:
+ url: {SPM}
+ tftf:
+ url: {TFTF}
+ tmp:
+ url: {TMP}
+ uboot:
+ url: {UBOOT}
- boot:
method: fvp
- license_variable: ARMLMD_LICENSE_FILE=\${ARMLMD_LICENSE_FILE}
+ license_variable: ARMLMD_LICENSE_FILE={ARMLMD_LICENSE_FILE}
docker:
- name: \${BOOT_DOCKER_NAME}
+ name: {BOOT_DOCKER_NAME}
local: true
- image: \${BOOT_IMAGE_DIR}/\${BOOT_IMAGE_BIN}
- version_string: \${BOOT_VERSION_STRING}
+ image: {BOOT_IMAGE_DIR}/{BOOT_IMAGE_BIN}
+ version_string: {BOOT_VERSION_STRING}
console_string: 'terminal_0: Listening for serial connection on port (?P<PORT>\d+)'
timeout:
minutes: 30
arguments:
-\${BOOT_ARGUMENTS}
+{BOOT_ARGUMENTS}
prompts:
- - '/ #'
+ - '{PROMPT1}'
+ - '{PROMPT2}'
EOF