Setup EFI vars device when EFI booting.

This also allows Virgil 3D to work when EFI booting
pull/8/head
Martin Wimpress 5 years ago
parent c61c3dad2a
commit 44ca3689d8
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 3
      README.md
  2. 9
      quickemu.sh

@ -83,7 +83,7 @@ Usage
You can also pass optional parameters
--delete : Delete the disk image.
--efi : Enable EFI BIOS (experimental).
--efi : Enable EFI BIOS.
--restore : Restore the snapshot.
--snapshot : Create a disk snapshot.
```
@ -95,4 +95,5 @@ You can also pass optional parameters
- [x] Make disk image optionally size configurable
- [ ] Improve snapshot management
- [ ] Create desktop launcher for a VM
- [x] Fix Virgil 3D on EFI boot
- [x] Get QEMU `-audiodev` working for audio input, something like:

@ -44,6 +44,7 @@ function get_port() {
function vm_boot() {
local VMNAME=$(basename ${VM} .conf)
local VMDIR=$(dirname ${disk_img})
local BIOS=""
local GL="on"
local VIRGL="on"
@ -66,8 +67,10 @@ function vm_boot() {
if [ ${ENABLE_EFI} -eq 1 ]; then
if [ -e /snap/qemu-virgil/current/usr/share/qemu/edk2-x86_64-code.fd ] ; then
BIOS="-drive if=pflash,format=raw,readonly,file=/snap/qemu-virgil/current/usr/share/qemu/edk2-x86_64-code.fd"
VIRGL="off"
if [ ! -e ${VMDIR}/${VMNAME}-vars.fd ]; then
cp /snap/qemu-virgil/current/usr/share/qemu/edk2-i386-vars.fd ${VMDIR}/${VMNAME}-vars.fd
fi
BIOS="-drive if=pflash,format=raw,readonly,file=/snap/qemu-virgil/current/usr/share/qemu/edk2-x86_64-code.fd -drive if=pflash,format=raw,file=${VMDIR}/${VMNAME}-vars.fd"
else
echo " - EFI: Booting requested but no EFI firmware found."
echo " Booting from Legacy BIOS."
@ -201,7 +204,7 @@ function usage() {
echo
echo "You can also pass optional parameters"
echo " --delete : Delete the disk image."
echo " --efi : Enable EFI BIOS (experimental)."
echo " --efi : Enable EFI BIOS."
echo " --restore : Restore the snapshot."
echo " --snapshot : Create a disk snapshot."
exit 1

Loading…
Cancel
Save