summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-04-12 23:40:57 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-13 10:54:10 +0100
commit7ffcdd0a07d70d9322c68dd4caebcaebfc3a2c96 (patch)
tree4ddae197f147c78ba354e1410e3dfe76d91389ef /scripts
parent0637c5ab2579e03d5e503211b0b9d7e3c11e9af1 (diff)
downloadpoky-7ffcdd0a07d70d9322c68dd4caebcaebfc3a2c96.tar.gz
runqemu: get qemu from qemu-helper-native sysroot
If rm_work is enabled image native sysroot can be removed. This makes runqemu to fail trying to find qemu binary. Used native sysroot of qemu-helper-native to find system qemu binary. (From OE-Core rev: d42c02caaa4d6fb47681aa7ffe8b27fa38141e6a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 5b5d56b9ef..a8bb9ebbda 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1056,7 +1056,18 @@ class BaseConfig(object):
1056 if not qemu_system: 1056 if not qemu_system:
1057 raise Exception("Failed to boot, QB_SYSTEM_NAME is NULL!") 1057 raise Exception("Failed to boot, QB_SYSTEM_NAME is NULL!")
1058 1058
1059 qemu_bin = '%s/%s' % (self.get('STAGING_BINDIR_NATIVE'), qemu_system) 1059 cmd = 'bitbake qemu-helper-native -e'
1060 logger.info('Running %s...' % cmd)
1061 out = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
1062 out = out.stdout.read().decode('utf-8')
1063
1064 match = re.search('^STAGING_BINDIR_NATIVE="(.*)"', out, re.M)
1065 if match:
1066 bindir_native = match.group(1)
1067 else:
1068 raise Exception("Can't find STAGING_BINDIR_NATIVE in '%s' output" % cmd)
1069
1070 qemu_bin = '%s/%s' % (bindir_native, qemu_system)
1060 1071
1061 # It is possible to have qemu-native in ASSUME_PROVIDED, and it won't 1072 # It is possible to have qemu-native in ASSUME_PROVIDED, and it won't
1062 # find QEMU in sysroot, it needs to use host's qemu. 1073 # find QEMU in sysroot, it needs to use host's qemu.