aboutsummaryrefslogtreecommitdiff
path: root/scripts/run.sh
blob: f6c5d5a14052537628de4c4d9dcfbeb33ee6623f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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.4m.fd"
fi
if [ ! -f "$UEFI_FW" ]; then
    UEFI_FW="/usr/share/edk2/x64/OVMF_CODE.fd"
fi
if [ ! -f "$UEFI_FW" ]; then
    UEFI_FW="/usr/share/OVMF/OVMF_CODE.fd"
fi
if [ ! -f "$UEFI_FW" ]; then
    UEFI_FW="/usr/share/qemu/OVMF.fd"
fi

if [ ! -f "$UEFI_FW" ]; then
    echo "Error: UEFI firmware not found"
    echo "Please install OVMF/EDK2"
    exit 1
fi

qemu-system-x86_64 \
    -M q35 \
    -drive if=pflash,format=raw,readonly=on,file="$UEFI_FW" \
    -drive file=iso/akiba.img,format=raw \
    -m 2048M \
    -serial stdio