summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-03-17 16:33:43 -0700
committerSaul Wold <sgw@linux.intel.com>2011-05-06 17:44:20 -0700
commit94d2b2c563f704585eabbef002349de09890290e (patch)
tree993074aebd000276b5f86111691604013649ad46 /scripts
parentf837ecebc6b6afd3d39192079f607053d5cea010 (diff)
downloadpoky-94d2b2c563f704585eabbef002349de09890290e.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 82ef26594c..52f8705e85 100755
--- a/scripts/poky-qemu-internal
+++ b/scripts/poky-qemu-internal
@@ -187,6 +187,9 @@ cleanup() {
187 echo "poky-export-rootfs stop $ROOTFS" 187 echo "poky-export-rootfs stop $ROOTFS"
188 poky-export-rootfs stop $ROOTFS 188 poky-export-rootfs stop $ROOTFS
189 fi 189 fi
190 # If QEMU crashes or somehow tty properties are not restored
191 # after qemu exits, we need to run stty sane
192 stty sane
190} 193}
191 194
192n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] 195n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
@@ -456,8 +459,7 @@ fi
456echo "Running $QEMU..." 459echo "Running $QEMU..."
457# -no-reboot is a mandatory option - see bug #100 460# -no-reboot is a mandatory option - see bug #100
458echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"' 461echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
459# If QEMU crashes, we need to run stty sane 462$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
460$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" || stty sane
461 463
462 464
463cleanup 465cleanup