From 42ff6bd1de346e63bf90800b279fa02144101c90 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 26 Dec 2021 18:23:02 -0600 Subject: [PATCH] Move QEMU bug workaround from host wrapper to target init script. (QEMU's bios inexplicably outputs the DEC private mode wordwrap disable sequence from "man 4 console_codes", meaning typing off the right edge of the screen just sits there overwriting the last character over and over. This confuses all SORTS of stuff, such as bash's command line history editing, and persists basically forever because nothing knows how to undo it. Nope, "reset" leaves it, "stty" hasn't got a flag for it... You've got to output the corresponding magic undo sequence.) --- scripts/mkroot.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/mkroot.sh b/scripts/mkroot.sh index 69246950..8936d0ae 100755 --- a/scripts/mkroot.sh +++ b/scripts/mkroot.sh @@ -115,7 +115,7 @@ if [ $$ -eq 1 ]; then # Setup networking for QEMU (needs /proc) for i in $(ls -1 /etc/rc 2>/dev/null | sort); do . /etc/rc/"$i"; done [ -z "$CONSOLE" ] && CONSOLE="$( /proc/sys/kernel/printk exec oneit -c /dev/"${CONSOLE:-console}" $HANDOFF else # for chroot @@ -228,8 +228,7 @@ CONFIG_CMDLINE="console=ttyUL0 earlycon"' BUILTIN=1 echo qemu-system-"$QEMU" '"$@"' $QEMU_MORE -nographic -no-reboot -m 256 \ -kernel $(basename $VMLINUX) $INITRD \ "-append \"panic=1 HOST=$TARGET console=$KARGS \$KARGS\"" \ - ${DTB:+-dtb "$(basename "$DTB")"} ";echo -e '\e[?7h'" \ - > "$OUTPUT/qemu-$TARGET.sh" && + ${DTB:+-dtb "$(basename "$DTB")"} > "$OUTPUT/qemu-$TARGET.sh" && chmod +x "$OUTPUT/qemu-$TARGET.sh" || exit 1 fi -- 2.39.2