plat(fvp): use generic image fetching functions
Some generic functions have been provided for fetching prebuilt images -
use these for FVP runs.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: I785890c9b0370279230dfd6f71a54bcdc0ebc9c3
diff --git a/fvp_utils.sh b/fvp_utils.sh
index d62137c..7c651fa 100644
--- a/fvp_utils.sh
+++ b/fvp_utils.sh
@@ -33,7 +33,11 @@
backup_fip_addr="${backup_fip_addr:-0x09000000}"
romlib_addr="${romlib_addr:-0x03ff2000}"
+uefi_downloads="${uefi_downloads:-http://files.oss.arm.com/downloads/uefi}"
+uefi_ci_bin_url="${uefi_ci_bin_url:-$uefi_downloads/Artifacts/Linux/github/fvp/static/DEBUG_GCC5/FVP_AARCH64_EFI.fd}"
+
uboot32_fip_url="$linaro_release/fvp32-latest-busybox-uboot/fip.bin"
+uboot_url="$linaro_release/fvp-latest-busybox-uboot/bl33-uboot.bin"
rootfs_url="$linaro_release/lt-vexpress64-openembedded_minimal-armv8-gcc-5.2_20170127-761.img.gz"
@@ -116,8 +120,8 @@
# FVP Kernel URLs
-declare -A fvp_kernels
-fvp_kernels=(
+declare -A kernel_list
+kernel_list=(
[fvp-aarch32-zimage]="$linaro_release/fvp32-latest-busybox-uboot/Image"
[fvp-busybox-uboot]="$linaro_release/fvp-latest-busybox-uboot/Image"
[fvp-oe-uboot32]="$linaro_release/fvp32-latest-oe-uboot/Image"
@@ -126,20 +130,14 @@
)
# FVP initrd URLs
-declare -A fvp_initrd_urls
-fvp_initrd_urls=(
+declare -A initrd_list
+initrd_list=(
[aarch32-ramdisk]="$linaro_release/fvp32-latest-busybox-uboot/ramdisk.img"
[dummy-ramdisk]="$linaro_release/fvp-latest-oe-uboot/ramdisk.img"
[dummy-ramdisk32]="$linaro_release/fvp32-latest-oe-uboot/ramdisk.img"
[default]="$linaro_release/fvp-latest-busybox-uboot/ramdisk.img"
)
-get_optee_bin() {
- url="$tfa_downloads/optee/tee.bin" \
- saveas="bl32.bin" fetch_file
- archive_file "bl32.bin"
-}
-
# For Measured Boot tests using a TA based on OPTEE, it is necessary to use a
# specific build rather than the default one generated by Jenkins.
get_ftpm_optee_bin() {
@@ -157,47 +155,6 @@
archive_file "bl32_extra2.bin"
}
-get_uboot32_bin() {
- local tmpdir="$(mktempdir)"
-
- pushd "$tmpdir"
- extract_fip "$uboot32_fip_url"
- mv "nt-fw.bin" "uboot.bin"
- archive_file "uboot.bin"
- popd
-}
-
-get_uboot_bin() {
- local uboot_url="$linaro_release/fvp-latest-busybox-uboot/bl33-uboot.bin"
-
- url="$uboot_url" saveas="uboot.bin" fetch_file
- archive_file "uboot.bin"
-}
-
-get_uefi_bin() {
- uefi_downloads="${uefi_downloads:-http://files.oss.arm.com/downloads/uefi}"
- uefi_ci_bin_url="${uefi_ci_bin_url:-$uefi_downloads/Artifacts/Linux/github/fvp/static/DEBUG_GCC5/FVP_AARCH64_EFI.fd}"
-
- url=$uefi_ci_bin_url saveas="uefi.bin" fetch_file
- archive_file "uefi.bin"
-}
-
-get_kernel() {
- local kernel_type="${kernel_type:?}"
- local url="${fvp_kernels[$kernel_type]}"
-
- url="${url:?}" saveas="kernel.bin" fetch_file
- archive_file "kernel.bin"
-}
-
-get_initrd() {
- local initrd_type="${initrd_type:?}"
- local url="${fvp_initrd_urls[$initrd_type]}"
-
- url="${url:?}" saveas="initrd.bin" fetch_file
- archive_file "initrd.bin"
-}
-
get_dtb() {
local dtb_type="${dtb_type:?}"
local dtb_url