summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-03-17 16:33:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-31 22:02:50 +0100
commit6714db4aa6705b9007a9b49399de46eca39de6f1 (patch)
tree6e31b466a0cb1b7cb79c6bbb94424b26ff0d2aa2 /scripts
parent7e6fb9209e0e7d08e420f33ecab79b51421ca418 (diff)
downloadpoky-6714db4aa6705b9007a9b49399de46eca39de6f1.tar.gz
scripts/poky-qemu-internal: call stty sane before exit
When qemu is booted into console with -nographics then after exiting the terminal line settings are messed up. This patch calls stty sane to restore the terminal settings to default. stty is part of coreutils which is installed on all host distros hence there is no need to warn about it being available or not (From OE-Core rev: 201a43cce6171988999f954a5759f46b330a7812) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-qemu-internal6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal
index 8fd1834ca8..c88d71178b 100755
--- a/scripts/poky-qemu-internal
+++ b/scripts/poky-qemu-internal
@@ -189,6 +189,9 @@ cleanup() {
189 echo "poky-export-rootfs stop $ROOTFS" 189 echo "poky-export-rootfs stop $ROOTFS"
190 poky-export-rootfs stop $ROOTFS 190 poky-export-rootfs stop $ROOTFS
191 fi 191 fi
192 # If QEMU crashes or somehow tty properties are not restored
193 # after qemu exits, we need to run stty sane
194 stty sane
192} 195}
193 196
194n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] 197n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
@@ -458,8 +461,7 @@ fi
458echo "Running $QEMU..." 461echo "Running $QEMU..."
459# -no-reboot is a mandatory option - see bug #100 462# -no-reboot is a mandatory option - see bug #100
460echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"' 463echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
461# If QEMU crashes, we need to run stty sane 464$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
462$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" || stty sane
463 465
464 466
465cleanup 467cleanup