summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-09-18 00:39:28 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-20 15:11:08 +0100
commit5060e66c75ed01e00b0c9002e3457dc688c5938d (patch)
tree5c1d349f21175e31614e184041f9aaf65380e8f9 /scripts/runqemu
parent239d1706b0588dc49a6a2dac9453c1c63781312d (diff)
downloadpoky-5060e66c75ed01e00b0c9002e3457dc688c5938d.tar.gz
runqemu: work even if a *.qemuboot.conf isn't found
A qemuboot conf file is a convenience but it should still be possible to invoke runqemu without them, especially for examples such as using the SDK with an extracted rootfs via NFS. As read_qemuboot() is always called we need to be sure that function can return cleanly, without throwing Exceptions, even if a qemuboot conf file isn't found. (From OE-Core rev: 3541c21f1976b517b79a19882240a8f36b970292) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 3e4e3ff8e2..4050dccfbe 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -557,7 +557,8 @@ class BaseConfig(object):
557 elif os.getenv('DEPLOY_DIR_IMAGE'): 557 elif os.getenv('DEPLOY_DIR_IMAGE'):
558 deploy_dir_image = os.getenv('DEPLOY_DIR_IMAGE') 558 deploy_dir_image = os.getenv('DEPLOY_DIR_IMAGE')
559 else: 559 else:
560 raise OEPathError("DEPLOY_DIR_IMAGE is NULL!") 560 logger.info("Can't find qemuboot conf file, DEPLOY_DIR_IMAGE is NULL!")
561 return
561 562
562 if self.rootfs and not os.path.exists(self.rootfs): 563 if self.rootfs and not os.path.exists(self.rootfs):
563 # Lazy rootfs 564 # Lazy rootfs
@@ -574,6 +575,11 @@ class BaseConfig(object):
574 self.qemuboot = qbs.split()[0] 575 self.qemuboot = qbs.split()[0]
575 self.qbconfload = True 576 self.qbconfload = True
576 577
578 if not self.qemuboot:
579 # If we haven't found a .qemuboot.conf at this point it probably
580 # doesn't exist, continue without
581 return
582
577 if not os.path.exists(self.qemuboot): 583 if not os.path.exists(self.qemuboot):
578 raise Exception("Failed to find <image>.qemuboot.conf!") 584 raise Exception("Failed to find <image>.qemuboot.conf!")
579 585