]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: improve when no machine specified
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 16 Mar 2017 10:13:24 +0000 (03:13 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Mar 2017 22:11:15 +0000 (22:11 +0000)
Fixed:
$ runqemu core-image-minimal
[snip]
Exception: FSTYPE is NULL!
[snip]

Get DEPLOY_DIR_IMAGE from "bitbake -e" to make it work.

[YOCTO #10471]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index 3e2172434cd6cab05f77512ac24323bc2ef57067..cfdb0c53fbbac7ea4fdea95b28bbe3891a2d0f2b 100755 (executable)
@@ -443,6 +443,12 @@ class BaseConfig(object):
                         self.set("DEPLOY_DIR_IMAGE", p)
             self.check_arg_machine(unknown_arg)
 
+        if not (self.get('MACHINE') or self.get('DEPLOY_DIR_IMAGE')):
+            self.load_bitbake_env()
+            s = re.search('^DEPLOY_DIR_IMAGE="(.*)"', self.bitbake_e, re.M)
+            if s:
+                self.set("DEPLOY_DIR_IMAGE", s.group(1))
+
     def check_kvm(self):
         """Check kvm and kvm-host"""
         if not (self.kvm_enabled or self.vhost_enabled):