Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] Call stty sane before exiting qemu
@ 2011-03-21 18:19 Khem Raj
  2011-03-21 18:19 ` [PATCH 1/1] scripts/poky-qemu-internal: Add call to stty Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2011-03-21 18:19 UTC (permalink / raw)
  To: OE core

In nographic mode when qemu is exited e.g. qemuppc then the shell
does not respond as expected (experienced on ubuntu). So we add
a call to stty sane just before exit which fixes the issue.

Pull URL: git://git.openembedded.org/openembedded-core-contrib
  Branch: kraj/qemu-sane-stty
  Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/qemu-sane-stty

Thanks,
    Khem Raj <raj.khem@gmail.com>
---


Khem Raj (1):
  scripts/poky-qemu-internal: Add call to stty

 scripts/poky-qemu-internal |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

-- 
1.7.4.1




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] scripts/poky-qemu-internal: Add call to stty
  2011-03-21 18:19 [PATCH 0/1] Call stty sane before exiting qemu Khem Raj
@ 2011-03-21 18:19 ` Khem Raj
  2011-03-21 18:27   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2011-03-21 18:19 UTC (permalink / raw)
  To: OE core

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 scripts/poky-qemu-internal |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal
index 82ef265..ea6539e 100755
--- a/scripts/poky-qemu-internal
+++ b/scripts/poky-qemu-internal
@@ -187,6 +187,7 @@ cleanup() {
         echo "poky-export-rootfs stop $ROOTFS"
         poky-export-rootfs stop $ROOTFS
     fi
+    stty sane
 }
 
 n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
@@ -377,7 +378,7 @@ if [ "$MACHINE" = "qemuppc" ]; then
     MACHINE_SUBTYPE=prep
     CPU_SUBTYPE=603e
     BIOS=powerpc_rom.bin
-    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -nographic"
+    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
     if [ "$FSTYPE" = "ext3" ]; then
         KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] scripts/poky-qemu-internal: Add call to stty
  2011-03-21 18:19 ` [PATCH 1/1] scripts/poky-qemu-internal: Add call to stty Khem Raj
@ 2011-03-21 18:27   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2011-03-21 18:27 UTC (permalink / raw)
  To: OE core

On Mon, Mar 21, 2011 at 11:19 AM, Khem Raj <raj.khem@gmail.com> wrote:
> 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
>

this has another hunk which was not intended. I will resend it

> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  scripts/poky-qemu-internal |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal
> index 82ef265..ea6539e 100755
> --- a/scripts/poky-qemu-internal
> +++ b/scripts/poky-qemu-internal
> @@ -187,6 +187,7 @@ cleanup() {
>         echo "poky-export-rootfs stop $ROOTFS"
>         poky-export-rootfs stop $ROOTFS
>     fi
> +    stty sane
>  }
>
>  n1=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
> @@ -377,7 +378,7 @@ if [ "$MACHINE" = "qemuppc" ]; then
>     MACHINE_SUBTYPE=prep
>     CPU_SUBTYPE=603e
>     BIOS=powerpc_rom.bin
> -    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -nographic"
> +    QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
>     if [ "$FSTYPE" = "ext3" ]; then
>         KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
>         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
> --
> 1.7.4.1
>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-21 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-21 18:19 [PATCH 0/1] Call stty sane before exiting qemu Khem Raj
2011-03-21 18:19 ` [PATCH 1/1] scripts/poky-qemu-internal: Add call to stty Khem Raj
2011-03-21 18:27   ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox