diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2025-10-07 14:46:52 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-09 10:58:07 +0100 |
| commit | 21466040c358c218d119d9fe47e9a658df9fd0f5 (patch) | |
| tree | c97ec1789128d0ec17c23be894d8968f6ba7be3c | |
| parent | cb2567ad96591255ed987734b8131809efae09d3 (diff) | |
| download | poky-21466040c358c218d119d9fe47e9a658df9fd0f5.tar.gz | |
scripts/runqemu: remove the code block that works around the missing bitbake environment
As confirmed by the previous patch this code path is never taken
and can be removed.
(From OE-Core rev: b931f74442e9f2fba95600ba056a5bd898c23b5a)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rwxr-xr-x | scripts/runqemu | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index ed1350a728..55b8c05217 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:'] |
