[oe-commits] [openembedded-core] 07/07: scripts/runqemu: Be more loose when guessing QB_SYSTEM_NAME variable

git at git.openembedded.org git at git.openembedded.org
Wed Sep 28 14:04:45 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d3d7e9d576dfdbb9f5ffc034a37c1d6e89ba8969
Author: California Sullivan <california.l.sullivan at intel.com>
AuthorDate: Tue Sep 27 11:27:16 2016 -0700

    scripts/runqemu: Be more loose when guessing QB_SYSTEM_NAME variable
    
    Following the instructions to reproduce YOCTO #10026 I found that
    runqemu would fail to start because QB_SYSTEM_NAME is null. This patch
    makes the guessing algorithm more loose allowing it to correctly guess
    the variable from the MACHINE name.
    
    It is still a good assumption that if it contains "qemux86-64" for
    example, that the system is x86-64, so this is unlikely to cause any
    new issues while preserving some peoples' old workflows.
    
    Signed-off-by: California Sullivan <california.l.sullivan at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/runqemu | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 09b231b..ca04c56 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -873,20 +873,20 @@ class BaseConfig(object):
         if not mach:
             return None
 
-        if mach == 'qemuarm':
-            qbsys = 'arm'
-        elif mach == 'qemuarm64':
+        elif 'qemuarm64' in mach:
             qbsys = 'aarch64'
-        elif mach == 'qemux86':
-            qbsys = 'i386'
-        elif mach == 'qemux86-64':
+        if 'qemuarm' in mach:
+            qbsys = 'arm'
+        elif 'qemux86-64' in mach:
             qbsys = 'x86_64'
-        elif mach == 'qemuppc':
+        elif 'qemux86' in mach:
+            qbsys = 'i386'
+        elif 'qemuppc' in mach:
             qbsys = 'ppc'
-        elif mach == 'qemumips':
-            qbsys = 'mips'
-        elif mach == 'qemumips64':
+        elif 'qemumips64' in mach:
             qbsys = 'mips64'
+        elif 'qemumips' in mach:
+            qbsys = 'mips'
 
         return 'qemu-system-%s' % qbsys
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list