Skip to content

Commit

Permalink
run-qemu.sh - fixed startup to allow QEMU -nographic to read from stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbond7 committed Feb 22, 2024
1 parent 12905f7 commit 9c41406
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ for arg; do
gdb) GDB='-S -gdb tcp::1234' ;;
serial) SERIAL='-serial tcp::7777,server,nodelay' ;;
*.ELF|*.elf) IMAGE="$arg" ;;
--nographic) GRAPHIC=; DIAG= ;;
--nographic|-nographic)
GRAPHIC=; DIAG= ;;
--sdl2) GRAPHIC=y; DIAG= ;;
-*) OPTIONS="$OPTIONS $arg" ;;
*) echo "Unrecognised command argument: $arg" >&2
Expand All @@ -55,12 +56,11 @@ if [[ -z $QEMU ]]; then
fi

if [[ -z "$GRAPHIC" ]]; then
OPTIONS="$OPTIONS -nographic"
OPTIONS="$OPTIONS -nographic --chardev file,path=/dev/tty,mux=on,id=c0 -mon chardev=c0 -serial chardev:c0"
fi

set -x
$QEMU --verbose --board Feabhas-WMS -d unimp,guest_errors \
--semihosting-config enable=on,target=native \
$OPTIONS $GDB $SERIAL $DIAG \
--image $IMAGE

0 comments on commit 9c41406

Please sign in to comment.