summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-07-13 01:09:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-27 22:36:52 +0100
commit5c7d025ced2120e4f277b8fb22813a8602e3f8c7 (patch)
tree80b5c31ca4d31be66301b0b440b1a4e0ead82106 /scripts/runqemu
parent0420171c087f9ed9cb9ead802573998ae936cd03 (diff)
downloadopenembedded-core-contrib-5c7d025ced2120e4f277b8fb22813a8602e3f8c7.tar.gz
runqemu: validate combos
Error out ealier if the combos is invalid, e.g.: $ runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic This will fail at kernel panic, no we check and error out early. We can add other checkings in the future. [YOCTO #11286] (From OE-Core rev: 8c6f253dfb4899324e91dd5d082190909e2bd25d) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index bdb559f82f..5f2b38febc 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1209,6 +1209,10 @@ class BaseConfig(object):
self.bitbake_e = ''
logger.warn("Couldn't run 'bitbake -e' to gather environment information:\n%s" % err.output.decode('utf-8'))
+ def validate_combos(self):
+ if (self.fstype in self.vmtypes) and self.kernel:
+ raise RunQemuError("%s doesn't need kernel %s!" % (self.fstype, self.kernel))
+
@property
def bindir_native(self):
result = self.get('STAGING_BINDIR_NATIVE')
@@ -1240,6 +1244,8 @@ def main():
config.check_args()
config.read_qemuboot()
config.check_and_set()
+ # Check whether the combos is valid or not
+ config.validate_combos()
config.print_config()
config.setup_network()
config.setup_rootfs()