mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
38 lines
548 B
Bash
Executable File
38 lines
548 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
build="$(dirname $0)/build"
|
|
debug=""
|
|
gfx="-nographic"
|
|
|
|
for arg in $@; do
|
|
case "${arg}" in
|
|
--debug)
|
|
debug="-s"
|
|
;;
|
|
--gfx)
|
|
gfx=""
|
|
;;
|
|
*)
|
|
build="${arg}"
|
|
;;
|
|
esac
|
|
done
|
|
|
|
kvm=""
|
|
if [[ -c /dev/kvm ]]; then
|
|
kvm="-enable-kvm"
|
|
fi
|
|
|
|
ninja -C "${build}" && \
|
|
exec qemu-system-x86_64 \
|
|
-drive "if=pflash,format=raw,file=${build}/flash.img" \
|
|
-drive "format=raw,file=${build}/popcorn.img" \
|
|
-smp 1 \
|
|
-m 512 \
|
|
-d mmu,int,guest_errors \
|
|
-D popcorn.log \
|
|
-cpu Broadwell \
|
|
-M q35 \
|
|
-no-reboot \
|
|
$gfx $kvm $debug
|