diff options
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 4050dccfbe..30a49590c4 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -619,18 +619,25 @@ class BaseConfig(object): | |||
619 | self.set(nv, s.group(1)) | 619 | self.set(nv, s.group(1)) |
620 | else: | 620 | else: |
621 | # when we're invoked from a running bitbake instance we won't | 621 | # when we're invoked from a running bitbake instance we won't |
622 | # be able to call `bitbake -e` but should have OE_TMPDIR set in | 622 | # be able to call `bitbake -e`, then try: |
623 | # the environment and can guess paths based on it | 623 | # - get OE_TMPDIR from environment and guess paths based on it |
624 | # - get OECORE_NATIVE_SYSROOT from environment (for sdk) | ||
624 | tmpdir = os.environ.get('OE_TMPDIR', None) | 625 | tmpdir = os.environ.get('OE_TMPDIR', None) |
626 | oecore_native_sysroot = os.environ.get('OECORE_NATIVE_SYSROOT', None) | ||
625 | if tmpdir: | 627 | if tmpdir: |
626 | logger.info('Setting STAGING_DIR_NATIVE and STAGING_BINDIR_NATIVE relative to OE_TMPDIR (%s)' % tmpdir) | 628 | logger.info('Setting STAGING_DIR_NATIVE and STAGING_BINDIR_NATIVE relative to OE_TMPDIR (%s)' % tmpdir) |
627 | hostos, _, _, _, machine = os.uname() | 629 | hostos, _, _, _, machine = os.uname() |
628 | buildsys = '%s-%s' % (machine, hostos.lower()) | 630 | buildsys = '%s-%s' % (machine, hostos.lower()) |
629 | staging_dir_native = '%s/sysroots/%s' % (tmpdir, buildsys) | 631 | staging_dir_native = '%s/sysroots/%s' % (tmpdir, buildsys) |
630 | self.set('STAGING_DIR_NATIVE', staging_dir_native) | 632 | self.set('STAGING_DIR_NATIVE', staging_dir_native) |
633 | elif oecore_native_sysroot: | ||
634 | logger.info('Setting STAGING_DIR_NATIVE to OECORE_NATIVE_SYSROOT (%s)' % oecore_native_sysroot) | ||
635 | self.set('STAGING_DIR_NATIVE', oecore_native_sysroot) | ||
636 | if self.get('STAGING_DIR_NATIVE'): | ||
631 | # we have to assume that STAGING_BINDIR_NATIVE is at usr/bin | 637 | # we have to assume that STAGING_BINDIR_NATIVE is at usr/bin |
632 | staging_bindir_native = '%s/usr/bin' % staging_dir_native | 638 | staging_bindir_native = '%s/usr/bin' % self.get('STAGING_DIR_NATIVE') |
633 | self.set('STAGING_BINDIR_NATIVE', staging_bindir_native) | 639 | logger.info('Setting STAGING_BINDIR_NATIVE to %s' % staging_bindir_native) |
640 | self.set('STAGING_BINDIR_NATIVE', '%s/usr/bin' % self.get('STAGING_DIR_NATIVE')) | ||
634 | 641 | ||
635 | def print_config(self): | 642 | def print_config(self): |
636 | logger.info('Continuing with the following parameters:\n') | 643 | logger.info('Continuing with the following parameters:\n') |