summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu16
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 09fe7ceafd..3e4e3ff8e2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -451,7 +451,12 @@ class BaseConfig(object):
451 if all_files: 451 if all_files:
452 self.rootfs = all_files[0] 452 self.rootfs = all_files[0]
453 else: 453 else:
454 raise Exception("Failed to find rootfs: %s" % cmd) 454 cmd = '%s/%s*.%s' % (self.get('DEPLOY_DIR_IMAGE'), self.get('IMAGE_LINK_NAME'), self.fstype)
455 all_files = glob.glob(cmd)
456 if all_files:
457 self.rootfs = all_files[0]
458 else:
459 raise Exception("Failed to find rootfs: %s" % cmd)
455 460
456 if not os.path.exists(self.rootfs): 461 if not os.path.exists(self.rootfs):
457 raise Exception("Can't find rootfs: %s" % self.rootfs) 462 raise Exception("Can't find rootfs: %s" % self.rootfs)
@@ -462,13 +467,18 @@ class BaseConfig(object):
462 if self.fstype in self.vmtypes: 467 if self.fstype in self.vmtypes:
463 return 468 return
464 kernel = self.kernel 469 kernel = self.kernel
470 deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
465 if not kernel: 471 if not kernel:
466 kernel = "%s/%s" % (self.get('DEPLOY_DIR_IMAGE'), self.get('QB_DEFAULT_KERNEL')) 472 kernel = "%s/%s" % (deploy_dir_image, self.get('QB_DEFAULT_KERNEL'))
467 473
468 if os.path.exists(kernel): 474 if os.path.exists(kernel):
469 self.kernel = kernel 475 self.kernel = kernel
470 else: 476 else:
471 raise Exception("KERNEL %s not found" % kernel) 477 kernel = "%s/%s" % (deploy_dir_image, self.get('KERNEL_IMAGETYPE'))
478 if kernel != deploy_dir_image and os.path.exists(kernel):
479 self.kernel = kernel
480 else:
481 raise Exception("KERNEL %s not found" % kernel)
472 482
473 dtb = self.get('QB_DTB') 483 dtb = self.get('QB_DTB')
474 if dtb: 484 if dtb: