diff options
| -rwxr-xr-x | scripts/runqemu | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 1e8406e119..2be7a0f286 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -1007,34 +1007,12 @@ to your build configuration. | |||
| 1007 | if not self.bitbake_e: | 1007 | if not self.bitbake_e: |
| 1008 | self.load_bitbake_env() | 1008 | self.load_bitbake_env() |
| 1009 | 1009 | ||
| 1010 | if self.bitbake_e: | 1010 | native_vars = ['STAGING_DIR_NATIVE'] |
| 1011 | native_vars = ['STAGING_DIR_NATIVE'] | 1011 | for nv in native_vars: |
| 1012 | for nv in native_vars: | 1012 | s = re.search('^%s="(.*)"' % nv, self.bitbake_e, re.M) |
| 1013 | s = re.search('^%s="(.*)"' % nv, self.bitbake_e, re.M) | 1013 | if s and s.group(1) != self.get(nv): |
| 1014 | if s and s.group(1) != self.get(nv): | 1014 | logger.info('Overriding conf file setting of %s to %s from Bitbake environment' % (nv, s.group(1))) |
| 1015 | logger.info('Overriding conf file setting of %s to %s from Bitbake environment' % (nv, s.group(1))) | 1015 | self.set(nv, s.group(1)) |
| 1016 | self.set(nv, s.group(1)) | ||
| 1017 | else: | ||
| 1018 | # when we're invoked from a running bitbake instance we won't | ||
| 1019 | # be able to call `bitbake -e`, then try: | ||
| 1020 | # - get OE_TMPDIR from environment and guess paths based on it | ||
| 1021 | # - get OECORE_NATIVE_SYSROOT from environment (for sdk) | ||
| 1022 | tmpdir = self.get('OE_TMPDIR') | ||
| 1023 | oecore_native_sysroot = self.get('OECORE_NATIVE_SYSROOT') | ||
| 1024 | if tmpdir: | ||
| 1025 | logger.info('Setting STAGING_DIR_NATIVE and STAGING_BINDIR_NATIVE relative to OE_TMPDIR (%s)' % tmpdir) | ||
| 1026 | hostos, _, _, _, machine = os.uname() | ||
| 1027 | buildsys = '%s-%s' % (machine, hostos.lower()) | ||
| 1028 | staging_dir_native = '%s/sysroots/%s' % (tmpdir, buildsys) | ||
| 1029 | self.set('STAGING_DIR_NATIVE', staging_dir_native) | ||
| 1030 | elif oecore_native_sysroot: | ||
| 1031 | logger.info('Setting STAGING_DIR_NATIVE to OECORE_NATIVE_SYSROOT (%s)' % oecore_native_sysroot) | ||
| 1032 | self.set('STAGING_DIR_NATIVE', oecore_native_sysroot) | ||
| 1033 | if self.get('STAGING_DIR_NATIVE'): | ||
| 1034 | # we have to assume that STAGING_BINDIR_NATIVE is at usr/bin | ||
| 1035 | staging_bindir_native = '%s/usr/bin' % self.get('STAGING_DIR_NATIVE') | ||
| 1036 | logger.info('Setting STAGING_BINDIR_NATIVE to %s' % staging_bindir_native) | ||
| 1037 | self.set('STAGING_BINDIR_NATIVE', '%s/usr/bin' % self.get('STAGING_DIR_NATIVE')) | ||
| 1038 | 1016 | ||
| 1039 | def print_config(self): | 1017 | def print_config(self): |
| 1040 | logoutput = ['Continuing with the following parameters:'] | 1018 | logoutput = ['Continuing with the following parameters:'] |
