diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2017-03-16 03:13:26 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-16 22:11:22 +0000 |
commit | 614bde6774f4dfd414066bbaf75ed422943e37ab (patch) | |
tree | 7f8006d3f435744e9eeeeaf754ec28e30af949f7 | |
parent | 6b9dd7a589537b12da648be50298cf7d36461797 (diff) | |
download | openembedded-core-614bde6774f4dfd414066bbaf75ed422943e37ab.tar.gz openembedded-core-614bde6774f4dfd414066bbaf75ed422943e37ab.tar.bz2 openembedded-core-614bde6774f4dfd414066bbaf75ed422943e37ab.zip |
runqemu: only boot ramfs when specified
This can fix a problem:
IMAGE_FSTYPES += "iso"
$ bitbake core-image-minimal
$ runqemu qemux86
It may boot core-image-minimal-initramfs rather than core-image-minimal, this
is not what we want usually. This patch makes it avoid booting ramfs when there
are other choices, or when it is specified, for example, "runqemu qemux86 ramfs"
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/runqemu | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 17219563a8..4fa2867e73 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -660,7 +660,15 @@ class BaseConfig(object): logger.info('Running %s...' % cmd) qbs = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8') if qbs: - self.qemuboot = qbs.split()[0] + for qb in qbs.split(): + # Don't use initramfs when other choices unless fstype is ramfs + if '-initramfs-' in os.path.basename(qb) and self.fstype != 'cpio.gz': + continue + self.qemuboot = qb + break + if not self.qemuboot: + # Use the first one when no choice + self.qemuboot = qbs.split()[0] self.qbconfload = True if not self.qemuboot: |