aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-02-14 00:37:44 +0530
committerBobby <[email protected]>2026-02-14 00:37:44 +0530
commit5b6519e2af33286d5f9bb0d75e7d76f2caec7d7b (patch)
treee8a3ea6bcd9a980eafc7a88f544be6f52551e4ac
parentae2f2dfcbc7d404fee3188f62d5b8f34937c6589 (diff)
downloadakiba-5b6519e2af33286d5f9bb0d75e7d76f2caec7d7b.tar.xz
akiba-5b6519e2af33286d5f9bb0d75e7d76f2caec7d7b.zip
refactor: Enhance UEFI firmware detection logic in run script
-rwxr-xr-xscripts/run.sh19
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