Files
jsix_import/qemu.sh
Justin C. Miller 29747f4891 Allow modules to specify defines
The modules.yaml now has an optional defines: list per module that adds
preprocessor definitions to the build scripts. Also added a --debug flag
to qemu.sh to run QEMU's debugger host.
2019-02-08 21:22:53 -08:00

29 lines
463 B
Bash
Executable File

#!/usr/bin/env bash
debug=""
if [[ $1 = "--debug" ]]; then
debug="-s"
shift
fi
build=${1:-"$(dirname $0)/build"}
kvm=""
if [[ -f /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 \
-nographic \
$kvm $debug