[oe-commits] [openembedded-core] 16/20: runqemu: only boot ramfs when specified
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 16 10:35:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 2a2ad7113eb69e61165ca3a3acc867670410ef3b
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Thu Mar 16 03:13:26 2017 -0700
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 at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/runqemu | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 1721956..4fa2867 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:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list