diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/run.sh | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/scripts/run.sh b/scripts/run.sh index 66f3d0b..94b0098 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,8 +1,19 @@ #!/bin/bash -UEFI_FW="/opt/homebrew/share/qemu/edk2-x86_64-code.fd" -if [ ! -f "$UEFI_FW" ]; then - UEFI_FW="/usr/share/edk2/x64/OVMF_CODE.fd" +for fw in \ + /opt/homebrew/share/qemu/edk2-x86_64-code.fd \ + /usr/share/edk2/x64/OVMF_CODE.fd \ + /usr/share/edk2/x64/OVMF_CODE.4m.fd +do + if [ -f "$fw" ]; then + UEFI_FW="$fw" + break + fi +done + +if [ -z "$UEFI_FW" ]; then + echo "UEFI firmware not found." + exit 1 fi qemu-system-x86_64 \ @@ -10,4 +21,4 @@ qemu-system-x86_64 \ -drive if=pflash,format=raw,readonly=on,file="$UEFI_FW" \ -drive file=iso/akiba.img,format=raw \ -m 2048M \ - -serial stdio
\ No newline at end of file + -serial stdio |
