mouse/cheesed
Blob: scripts/run-qemu.sh
#!/bin/sh
set -eu
if [ "$#" -ne 2 ]; then
printf '%s\n' "usage: $0 LINUX_KERNEL INITRAMFS" >&2
exit 2
fi
kernel=$1
initramfs=$2
for input in "$kernel" "$initramfs"; do
if [ ! -f "$input" ]; then
printf '%s\n' "file does not exist: $input" >&2
exit 1
fi
done
exec qemu-system-x86_64 \
-machine accel=tcg \
-m 256M \
-no-reboot \
-nographic \
-kernel "$kernel" \
-initrd "$initramfs" \
-append "console=ttyS0 init=/sbin/cheesed panic=-1"