When runqemu is started with a *.qemuboot.conf arg assume that image artefacts are relative to that file, rather than in whatever directory the DEPLOY_DIR_IMAGE variable in the conf file points to.
Signed-off-by: Joshua Lock <joshua.g.l...@intel.com> --- scripts/runqemu | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/runqemu b/scripts/runqemu index 1599848..cfe7bff 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -143,6 +143,7 @@ class BaseConfig(object): self.nfs_server = '' self.rootfs = '' self.qemuboot = '' + self.qbconfload = False self.kernel = '' self.kernel_cmdline = '' self.kernel_cmdline_script = '' @@ -239,6 +240,7 @@ class BaseConfig(object): """ if p.endswith('.qemuboot.conf'): self.qemuboot = p + self.qbconfload = True elif re.search('\.bin$', p) or re.search('bzImage', p) or \ re.search('zImage', p) or re.search('vmlinux', p) or \ re.search('fitImage', p) or re.search('uImage', p): @@ -544,6 +546,15 @@ class BaseConfig(object): k_upper = k.upper() self.set(k_upper, v) + # When we're started with a *.qemuboot.conf arg assume that image + # artefacts are relative to that file, rather than in whatever + # directory DEPLOY_DIR_IMAGE in the conf file points to. + if self.qbconfload: + imgdir = os.path.dirname(self.qemuboot) + if imgdir != self.get('DEPLOY_DIR_IMAGE'): + logger.info('Setting DEPLOY_DIR_IMAGE to folder containing %s (%s)' % (self.qemuboot, imgdir)) + self.set('DEPLOY_DIR_IMAGE', imgdir) + def print_config(self): logger.info('Continuing with the following parameters:\n') if not self.fstype in self.vmtypes: -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core