Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix for YB5817
@ 2014-02-13 15:26 Cristian Iorga
  2014-02-13 15:26 ` [PATCH 1/1] runqemu: enforce right CPU type for qemux86/x86-64 Cristian Iorga
  0 siblings, 1 reply; 2+ messages in thread
From: Cristian Iorga @ 2014-02-13 15:26 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit ee151ed6bc16312733c67b91bbf65959309b640d:

  lib/oe/rootfs.py: fix RPM multilib issue (2014-02-13 12:06:01 +0000)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ciorga/YB5817
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ciorga/YB5817

Cristian Iorga (1):
  runqemu: enforce right CPU type for qemux86/x86-64

 scripts/runqemu          |  9 +++------
 scripts/runqemu-internal | 13 +++++++++++--
 2 files changed, 14 insertions(+), 8 deletions(-)

-- 
1.8.3.2



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

* [PATCH 1/1] runqemu: enforce right CPU type for qemux86/x86-64
  2014-02-13 15:26 [PATCH 0/1] Fix for YB5817 Cristian Iorga
@ 2014-02-13 15:26 ` Cristian Iorga
  0 siblings, 0 replies; 2+ messages in thread
From: Cristian Iorga @ 2014-02-13 15:26 UTC (permalink / raw)
  To: openembedded-core

Set in accordance with qemu machines configs.

Fixes [YOCTO #5817].

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
---
 scripts/runqemu          |  9 +++------
 scripts/runqemu-internal | 13 +++++++++++--
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 9272b6f..0db7ad6 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -68,6 +68,8 @@ SCRIPT_QEMU_OPT=""
 SCRIPT_QEMU_EXTRA_OPT=""
 SCRIPT_KERNEL_OPT=""
 SERIALSTDIO=""
+KVM_ENABLED="no"
+KVM_ACTIVE="no"
 
 # Determine whether the file is a kernel or QEMU image, and set the
 # appropriate variables
@@ -103,7 +105,6 @@ process_filename() {
 
 # Parse command line args without requiring specific ordering. It's a
 # bit more complex, but offers a great user experience.
-KVM_ENABLED="no"
 while true; do
     arg=${1}
     case "$arg" in
@@ -266,11 +267,7 @@ if [ "x$KVM_ENABLED" = "xyes" ]; then
         exit 1;
     fi
     if [ -w /dev/kvm -a -r /dev/kvm ]; then
-        if [ "x$MACHINE" = "xqemux86" ]; then
-            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm32"
-        elif [ "x$MACHINE" = "xqemux86-64" ]; then
-            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm -cpu kvm64"
-        fi
+        SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -enable-kvm"
         KVM_ACTIVE="yes"
     else
         echo "You have no rights on /dev/kvm."
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 0893107..f9ca380 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -360,6 +360,11 @@ fi
 
 if [ "$MACHINE" = "qemux86" ]; then
     QEMU=qemu-system-i386
+    if [ "$KVM_ACTIVE" = "yes" ]; then
+        CPU_SUBTYPE=kvm32
+    else
+        CPU_SUBTYPE=qemu32
+    fi
     if [ ! -z "$vga_option" ]; then
         QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
     else
@@ -367,7 +372,7 @@ if [ "$MACHINE" = "qemux86" ]; then
     fi
     if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
         KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
-        QEMUOPTIONS="$QEMU_NETWORK_CMD $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
+        QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
     fi
     if [ "$FSTYPE" = "nfs" ]; then
         if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
@@ -388,7 +393,11 @@ fi
 
 if [ "$MACHINE" = "qemux86-64" ]; then
     QEMU=qemu-system-x86_64
-    CPU_SUBTYPE=core2duo
+    if [ "$KVM_ACTIVE" = "yes" ]; then
+        CPU_SUBTYPE=kvm64
+    else
+        CPU_SUBTYPE=core2duo
+    fi
     if [ ! -z "$vga_option" ]; then
         QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
     else
-- 
1.8.3.2



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

end of thread, other threads:[~2014-02-13 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13 15:26 [PATCH 0/1] Fix for YB5817 Cristian Iorga
2014-02-13 15:26 ` [PATCH 1/1] runqemu: enforce right CPU type for qemux86/x86-64 Cristian Iorga

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