21 lines
789 B
Bash
Executable File
21 lines
789 B
Bash
Executable File
#!/bin/bash
|
|
# Boot the installed niri disk in an interactive QEMU GUI window.
|
|
set -Eeuo pipefail
|
|
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
OUT="$PROJECT_DIR/out/niri"
|
|
DISK="$OUT/niri-disk.img"
|
|
VARS="$OUT/OVMF_VARS.installed.fd"
|
|
|
|
[[ -r "$DISK" ]] || { echo "no $DISK — run tests/run-niri-install.sh first"; exit 1; }
|
|
cp "$OUT/OVMF_VARS.fd" "$VARS"
|
|
|
|
DISPLAY="${DISPLAY:-:0}" exec qemu-system-x86_64 \
|
|
-name void-niri-installed \
|
|
-machine q35,accel=kvm:tcg \
|
|
-cpu max -m 4096 -smp 4 \
|
|
-drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd \
|
|
-drive "if=pflash,format=raw,file=$VARS" \
|
|
-drive "if=virtio,file=$DISK,format=raw,cache=none" \
|
|
-netdev user,id=n0 -device virtio-net-pci,netdev=n0 \
|
|
-vga virtio -display gtk
|