Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/2] runqemu: disable graphic when no DISPLAY
Date: Fri, 26 Jun 2015 09:27:41 +0800	[thread overview]
Message-ID: <558CAA8D.1020305@windriver.com> (raw)
In-Reply-To: <CAJTo0LbkB2+oGC1wwj3yNWVV6Bz74uuzXPD4co17gqmz-Kq6ag@mail.gmail.com>



On 06/25/2015 08:13 PM, Burton, Ross wrote:
>
> On 25 June 2015 at 10:24, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
>     +if [ -z "$DISPLAY" -o "$GRAPHIC" = "no" ]; then
>
>
> Does this break people using QEMU without SDL that connect to it using VNC?

It doesn't break it, but there is a little different, now both the text
console and graphic vnc server will start, the text console didn't start
before this patch. I'm not sure which is better, I've made another patch
to make it work as before, and put the patches here, you can decide which
one to use.

   git://git.openembedded.org/openembedded-core-contrib rbt/qemu_v2

diff --git a/scripts/runqemu b/scripts/runqemu
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -70,6 +70,8 @@ SCRIPT_KERNEL_OPT=""
  SERIALSTDIO=""
  KVM_ENABLED="no"
  KVM_ACTIVE="no"
+GRAPHIC="yes"
+PUBLICVNC="no"

  # Determine whether the file is a kernel or QEMU image, and set the
  # appropriate variables
@@ -142,8 +144,7 @@ while true; do
         ISOFS=true
         ;;
          "nographic")
-            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
-            SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
+            GRAPHIC="no"
              ;;
          "serial")
              SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio"
@@ -187,6 +188,7 @@ while true; do
              ;;
          "publicvnc")
              SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc 0.0.0.0:0"
+            PUBLICVNC="yes"
              ;;
          "") break ;;
          *)
@@ -291,6 +293,13 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
      fi
  fi

+# Disable graphic when no DISPLAY or -nographic is specified.
+if [ "$GRAPHIC" = "no" ] || [ -z "$DISPLAY" -a "$PUBLICVNC" = "no" ] ; then
+    echo "Disabling graphic."
+    SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
+    SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
+fi
+
  machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
  # MACHINE is now set for all cases


// Robert

>
> Ross


  reply	other threads:[~2015-06-26  1:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25  9:24 [PATCH 0/2] 2 fixes for runqemu Robert Yang
2015-06-25  9:24 ` [PATCH 1/2] runqemu: disable graphic when no DISPLAY Robert Yang
2015-06-25 12:13   ` Burton, Ross
2015-06-26  1:27     ` Robert Yang [this message]
2015-06-25  9:24 ` [PATCH 2/2] runqemu: enable kvm when use tap under sudo Robert Yang
2015-06-25  9:41   ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=558CAA8D.1020305@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox