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>
This commit is contained in:
parent
c97912a17d
commit
5d3c56f2a5
|
@ -306,11 +306,16 @@ class BaseConfig(object):
|
||||||
# FIXME: testimage.bbclass exports these two variables into env,
|
# FIXME: testimage.bbclass exports these two variables into env,
|
||||||
# are there other scenarios in which we need to support being
|
# are there other scenarios in which we need to support being
|
||||||
# invoked by bitbake?
|
# invoked by bitbake?
|
||||||
deploy = os.environ.get('DEPLOY_DIR_IMAGE', None)
|
deploy = os.environ.get('DEPLOY_DIR_IMAGE')
|
||||||
bbchild = deploy and os.environ.get('OE_TMPDIR', None)
|
bbchild = deploy and os.environ.get('OE_TMPDIR')
|
||||||
if bbchild:
|
if bbchild:
|
||||||
self.set_machine_deploy_dir(arg, deploy)
|
self.set_machine_deploy_dir(arg, deploy)
|
||||||
return
|
return
|
||||||
|
# also check whether we're running under a sourced toolchain
|
||||||
|
# environment file
|
||||||
|
if os.environ.get('OECORE_NATIVE_SYSROOT'):
|
||||||
|
self.set("MACHINE", arg)
|
||||||
|
return
|
||||||
|
|
||||||
cmd = 'MACHINE=%s bitbake -e' % arg
|
cmd = 'MACHINE=%s bitbake -e' % arg
|
||||||
logger.info('Running %s...' % cmd)
|
logger.info('Running %s...' % cmd)
|
||||||
|
|
Loading…
Reference in New Issue