summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-09-21 20:35:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-21 22:02:16 +0100
commit5d3c56f2a5a5b72592cf5be1ecd6854b22b9c781 (patch)
treecc6c7e21983f5f7c8c1f29ae7a4acef07642e59c
parentc97912a17ddc65f0a4045cbcf4daacc86d26bf09 (diff)
downloadpoky-5d3c56f2a5a5b72592cf5be1ecd6854b22b9c781.tar.gz
runqemu: don't try and invoke bitbake when running in a toolchain env
If a MACHINE value is passed we can't validate it by running bitbake as the toolchain environment doesn't include the build system, we must assume that the passed value for MACHINE is correct. (From OE-Core rev: 2c569678566c49b3ea237ef2de0fbae782263449) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu9
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 591746f657..e8360c2af1 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -306,11 +306,16 @@ class BaseConfig(object):
306 # FIXME: testimage.bbclass exports these two variables into env, 306 # FIXME: testimage.bbclass exports these two variables into env,
307 # are there other scenarios in which we need to support being 307 # are there other scenarios in which we need to support being
308 # invoked by bitbake? 308 # invoked by bitbake?
309 deploy = os.environ.get('DEPLOY_DIR_IMAGE', None) 309 deploy = os.environ.get('DEPLOY_DIR_IMAGE')
310 bbchild = deploy and os.environ.get('OE_TMPDIR', None) 310 bbchild = deploy and os.environ.get('OE_TMPDIR')
311 if bbchild: 311 if bbchild:
312 self.set_machine_deploy_dir(arg, deploy) 312 self.set_machine_deploy_dir(arg, deploy)
313 return 313 return
314 # also check whether we're running under a sourced toolchain
315 # environment file
316 if os.environ.get('OECORE_NATIVE_SYSROOT'):
317 self.set("MACHINE", arg)
318 return
314 319
315 cmd = 'MACHINE=%s bitbake -e' % arg 320 cmd = 'MACHINE=%s bitbake -e' % arg
316 logger.info('Running %s...' % cmd) 321 logger.info('Running %s...' % cmd)