From b4d6c787d5cfb1948db7ccb1cfcd493283ecbba3 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 2 Nov 2024 14:31:52 +0100 Subject: [PATCH] board/common: allow more logging to stdout before starting qemu Creating/Recreating the qcow2 image now logs to stdout, as does the check using qemu-img, which looks funny in raw mode. So let's delay the start of raw mode until just before starting qemu. Signed-off-by: Joachim Wiberg --- board/common/qemu/qemu.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/board/common/qemu/qemu.sh b/board/common/qemu/qemu.sh index 3d3f8391..ac13dd7d 100755 --- a/board/common/qemu/qemu.sh +++ b/board/common/qemu/qemu.sh @@ -299,11 +299,17 @@ run_qemu() $CONFIG_QEMU_EXTRA EOF + echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor" + line=$(stty -g) + stty raw + if [ "$CONFIG_QEMU_KERNEL" ]; then $qemu -append "$(append_args)" "$@" else $qemu "$@" fi + + stty "$line" } dtb_args() @@ -409,8 +415,4 @@ fi generate_dot -echo "Starting Qemu :: Ctrl-a x -- exit | Ctrl-a c -- toggle console/monitor" -line=$(stty -g) -stty raw run_qemu $(dtb_args) -stty "$line"