diff --git a/qemu.sh b/qemu.sh index 35dbfc4..2f98de2 100755 --- a/qemu.sh +++ b/qemu.sh @@ -23,10 +23,18 @@ if [[ -c /dev/kvm ]]; then kvm="-enable-kvm" fi -ninja -C "${build}" && \ +if ! ninja -C "${build}"; then + exit 1 +fi + +if [[ -n $TMUX ]]; then + tmux split-window "sleep 1; telnet localhost 45454" & +fi + exec qemu-system-x86_64 \ -drive "if=pflash,format=raw,file=${build}/flash.img" \ -drive "format=raw,file=${build}/popcorn.img" \ + -monitor telnet:localhost:45454,server,nowait \ -smp 1 \ -m 512 \ -d mmu,int,guest_errors \