Add qemu UEFI firmware support.
This commit is contained in:
@@ -135,6 +135,23 @@ else
|
||||
debug_flags=""
|
||||
fi
|
||||
|
||||
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"
|
||||
@@ -189,5 +206,6 @@ qemu-system-x86_64 -M q35 \
|
||||
-no-reboot \
|
||||
${test_flags} \
|
||||
${debug_flags} \
|
||||
${boot_flags} \
|
||||
${QEMU_FLAGS:-}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user