Add qemu UEFI firmware support.
This commit is contained in:
@@ -131,6 +131,23 @@ fi
|
||||
# I'm lazy but I just remove GDB flags when running this script.
|
||||
debug_flags=""
|
||||
|
||||
if [ $USE_LEGACY_BIOS ]; then
|
||||
boot_flags=""
|
||||
else
|
||||
# Check for the presence of the OVMF firmware.
|
||||
if [ ! -f $build_dir/RELEASEX64_OVMF_CODE.fd ]; then
|
||||
info "Downloading OVMF UEFI firmware for QEMU"
|
||||
info "To disable this, set USE_LEGACY_BIOS=1."
|
||||
pushd $build_dir
|
||||
curl https://retrage.github.io/edk2-nightly/bin/RELEASEX64_OVMF_CODE.fd -LO || error "failed to download OVMF firmware for UEFI"
|
||||
curl https://retrage.github.io/edk2-nightly/bin/RELEASEX64_OVMF_VARS.fd -LO || error "failed to download OVMF firmware for UEFI"
|
||||
popd
|
||||
fi
|
||||
|
||||
boot_flags="-drive if=pflash,format=raw,readonly=on,file=$build_dir/RELEASEX64_OVMF_CODE.fd \
|
||||
-drive if=pflash,format=raw,file=$build_dir/RELEASEX64_OVMF_VARS.fd"
|
||||
fi
|
||||
|
||||
# Set up test-specific flags
|
||||
if [ $is_test -eq 1 ]; then
|
||||
test_flags="-device isa-debug-exit,iobase=0xf4,iosize=0x04 -display none"
|
||||
|
||||
Reference in New Issue
Block a user