Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] runqemu fixes
@ 2011-09-03 22:50 Scott Garman
  2011-09-03 22:50 ` [PATCH 1/1] runqemu: standardize ability to specify custom qemu/kenel boot options Scott Garman
  0 siblings, 1 reply; 4+ messages in thread
From: Scott Garman @ 2011-09-03 22:50 UTC (permalink / raw)
  To: openembedded-core

Hello,

This pull request standardizes/normalizes the way custom options are
passed to QEMU and the kernel boot parameters.

The old manner of specifying custom options to QEMU in this script
using angle brackets was a frequent source of confusion. Meanwhile,
Otavio Salvador added a decent method of specifying custom kernel
boot options to this script. This patch documents the bootparams
option and adds a similar way of specifying custom QEMU options
using qemuparams="".
    
This fixes [YOCTO #1019]

Scott Garman

The following changes since commit 0616557a8c29b42bae0ffd5fd665a046810047e4:

  populate_sdk: We need to ensure that the SDK sysroot reflects PACKAGE_ARCH (2011-09-02 23:38:00 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib sgarman/runqemu-fixes
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=sgarman/runqemu-fixes

Scott Garman (1):
  runqemu: standardize ability to specify custom qemu/kenel boot
    options

 scripts/runqemu |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)




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

* [PATCH 1/1] runqemu: standardize ability to specify custom qemu/kenel boot options
  2011-09-03 22:50 [PATCH 0/1] runqemu fixes Scott Garman
@ 2011-09-03 22:50 ` Scott Garman
  2011-09-03 23:02   ` Otavio Salvador
  2011-09-05 19:23   ` Richard Purdie
  0 siblings, 2 replies; 4+ messages in thread
From: Scott Garman @ 2011-09-03 22:50 UTC (permalink / raw)
  To: openembedded-core

The old manner of specifying custom options to QEMU in this script
using angle brackets was a frequent source of confusion. Meanwhile,
Otavio Salvador added a decent method of specifying custom kernel
boot options to this script. This patch documents the bootparams
option and adds a similar way of specifying custom QEMU options
using qemuparams="".

This fixes [YOCTO #1019]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 scripts/runqemu |   32 ++++++++++++++++++--------------
 1 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 113088e..74938f7 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -26,17 +26,19 @@ usage() {
     echo "  KERNEL - the kernel image file to use"
     echo "  ROOTFS - the rootfs image file or nfsroot directory to use"
     echo "  MACHINE=xyz - the machine name (optional, autodetected from KERNEL filename if unspecified)"
-    echo "  Additional QEMU command-line options can be passed with:"
+    echo "  Simplified QEMU command-line options can be passed with:"
     echo "    nographic - disables video console"
     echo "    serial - enables a serial console on /dev/ttyS0"
-    echo "    kvm - enables KVM when running qemux86/qemux86-64, VT capable CPU required"
-    echo "    \"<extra-qemu-options>\" - enables extra qemu options, excluding serial and kvm"
+    echo "    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)"
+    echo "  qemuparams=\"xyz\" - specify custom parameters to QEMU"
+    echo "  bootparams=\"xyz\" - specify custom kernel parameters during boot"
     echo ""
     echo "Examples:"
     echo "  $MYNAME qemuarm"
     echo "  $MYNAME qemux86-64 core-image-sato ext3"
     echo "  $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial"
-    echo "  $MYNAME qemux86 \"<-m 256>\""
+    echo "  $MYNAME qemux86 qemuparams=\"-m 256\""
+    echo "  $MYNAME qemux86 bootparams=\"psplash=false\""
     exit 1
 }
 
@@ -135,6 +137,18 @@ while [ $i -le $# ]; do
             SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio"
             SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
             ;;
+        "qemuparams="*)
+            SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}"
+
+            # Warn user if they try to specify serial or kvm options
+            # to use simplified options instead
+            serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial\)'`
+            kvm_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-enable-kvm\)'`
+            if [[ ! -z "$serial_option" || ! -z "$kvm_option" ]]; then
+                echo "Error: Please use simplified serial or kvm options instead"
+                usage
+            fi
+            ;;
         "bootparams="*)
             SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT ${arg##bootparams=}"
             ;;
@@ -149,16 +163,6 @@ while [ $i -le $# ]; do
             KVM_ENABLED="yes"
             KVM_CAPABLE=`grep 'vmx\|smx' /proc/cpuinfo`
             ;;
-        \<*\>)
-            SCRIPT_QEMU_EXTRA_OPT=$arg 
-            serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial\)'`
-            kvm_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-enable-kvm\)'`
-            echo "$kvm_option"
-            if [[ ! -z "$serial_option" || ! -z "$kvm_option" ]]; then
-                echo "Error: Please use serial or kvm params instead!"
-                usage
-            fi
-            ;;
         *)
             # A directory name is an nfs rootfs
             if [ -d "$arg" ]; then
-- 
1.7.1




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

* Re: [PATCH 1/1] runqemu: standardize ability to specify custom qemu/kenel boot options
  2011-09-03 22:50 ` [PATCH 1/1] runqemu: standardize ability to specify custom qemu/kenel boot options Scott Garman
@ 2011-09-03 23:02   ` Otavio Salvador
  2011-09-05 19:23   ` Richard Purdie
  1 sibling, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2011-09-03 23:02 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sat, Sep 3, 2011 at 19:50, Scott Garman <scott.a.garman@intel.com> wrote:
> The old manner of specifying custom options to QEMU in this script
> using angle brackets was a frequent source of confusion. Meanwhile,
> Otavio Salvador added a decent method of specifying custom kernel
> boot options to this script. This patch documents the bootparams
> option and adds a similar way of specifying custom QEMU options
> using qemuparams="".
>
> This fixes [YOCTO #1019]
>
> Signed-off-by: Scott Garman <scott.a.garman@intel.com>

This really improves the usability of it. Thanks by work on it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



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

* Re: [PATCH 1/1] runqemu: standardize ability to specify custom qemu/kenel boot options
  2011-09-03 22:50 ` [PATCH 1/1] runqemu: standardize ability to specify custom qemu/kenel boot options Scott Garman
  2011-09-03 23:02   ` Otavio Salvador
@ 2011-09-05 19:23   ` Richard Purdie
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2011-09-05 19:23 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sat, 2011-09-03 at 15:50 -0700, Scott Garman wrote:
> The old manner of specifying custom options to QEMU in this script
> using angle brackets was a frequent source of confusion. Meanwhile,
> Otavio Salvador added a decent method of specifying custom kernel
> boot options to this script. This patch documents the bootparams
> option and adds a similar way of specifying custom QEMU options
> using qemuparams="".
> 
> This fixes [YOCTO #1019]
> 
> Signed-off-by: Scott Garman <scott.a.garman@intel.com>
> ---
>  scripts/runqemu |   32 ++++++++++++++++++--------------
>  1 files changed, 18 insertions(+), 14 deletions(-)

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2011-09-05 19:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-03 22:50 [PATCH 0/1] runqemu fixes Scott Garman
2011-09-03 22:50 ` [PATCH 1/1] runqemu: standardize ability to specify custom qemu/kenel boot options Scott Garman
2011-09-03 23:02   ` Otavio Salvador
2011-09-05 19:23   ` Richard Purdie

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