aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-04-12 18:52:01 -0500
committerRob Landley <rob@landley.net>2020-04-12 18:52:01 -0500
commitefd16b24e10fb78a176a9e6a43f95065c78a38d8 (patch)
tree3cf29446bb9311969b69c295e668bf9748ceef55
parentc33c60d84cad4f9a2880203c391403b16c72af29 (diff)
downloadtoybox-efd16b24e10fb78a176a9e6a43f95065c78a38d8.tar.gz
Work around qemu bug.
The QEMU console output disables wordwrap (see man 4 console_codes, DECAWM) but doesn't re-enable it, so things like bash command history or tab completion glitch afterwards. QEMU should printf("\e[?7h") on the way out, but doesn't. So make qemu wrapper script do it.
-rwxr-xr-xscripts/mkroot.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/mkroot.sh b/scripts/mkroot.sh
index 163aece7..4c3fc409 100755
--- a/scripts/mkroot.sh
+++ b/scripts/mkroot.sh
@@ -188,7 +188,8 @@ else
echo "qemu-system-$QEMU" '"$@"' -nographic -no-reboot -m 256 \
"-kernel $(basename "$VMLINUX") -initrd ${CROSS_BASE}root.cpio.gz" \
"-append \"quiet panic=1 HOST=$TARGET console=$KARGS \$KARGS\"" \
- ${DTB:+-dtb "$(basename "$DTB")"} > "$OUTPUT/qemu-$TARGET.sh" &&
+ ${DTB:+-dtb "$(basename "$DTB")"} ";echo -e '\e[?7h'" \
+ > "$OUTPUT/qemu-$TARGET.sh" &&
chmod +x "$OUTPUT/qemu-$TARGET.sh" &&
announce "linux-$KARCH"