summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/runqemu13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index e8d14f5142..91e72cbc50 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -277,6 +277,19 @@ class BaseConfig(object):
277 elif self.get('MACHINE') == arg: 277 elif self.get('MACHINE') == arg:
278 return 278 return
279 logger.info('Assuming MACHINE = %s' % arg) 279 logger.info('Assuming MACHINE = %s' % arg)
280
281 # if we're running under testimage, or similarly as a child
282 # of an existing bitbake invocation, we can't invoke bitbake
283 # to validate the MACHINE setting and must assume it's correct...
284 # FIXME: testimage.bbclass exports these two variables into env,
285 # are there other scenarios in which we need to support being
286 # invoked by bitbake?
287 deploy = os.environ.get('DEPLOY_DIR_IMAGE', None)
288 bbchild = deploy and os.environ.get('OE_TMPDIR', None)
289 if bbchild:
290 self.set_machine_deploy_dir(arg, deploy)
291 return
292
280 cmd = 'MACHINE=%s bitbake -e' % arg 293 cmd = 'MACHINE=%s bitbake -e' % arg
281 logger.info('Running %s...' % cmd) 294 logger.info('Running %s...' % cmd)
282 self.bitbake_e = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8') 295 self.bitbake_e = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')