scripts: create download_ovmf helper function

Move the duplicated logic to download OVMF into a helper function.
Explicitly specify the OVMF_FW_TAG instead of downloading the latest
so that new OVMF versions can be easily tested.

Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
This commit is contained in:
Thomas Barrett
2024-01-18 18:50:11 +00:00
committed by Bo Chen
parent e61c6a1382
commit 76dbe660f5
3 changed files with 13 additions and 14 deletions

View File

@@ -124,3 +124,13 @@ download_hypervisor_fw() {
time wget --quiet $FW_URL || exit 1
popd
}
download_ovmf() {
OVMF_FW_TAG="ch-6624aa331f"
OVMF_FW_URL="https://github.com/cloud-hypervisor/edk2/releases/download/$OVMF_FW_TAG/CLOUDHV.fd"
OVMF_FW="$WORKLOADS_DIR/CLOUDHV.fd"
pushd $WORKLOADS_DIR
rm -f $OVMF_FW
time wget --quiet $OVMF_FW_URL || exit 1
popd
}