[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4024/8267] runqemu: Allow the user to specity no kernel or rootFS
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4024/8267] runqemu: Allow the user to specity no kernel or rootFS
- Date: Sun, 17 Dec 2017 01:27:21 +0000 (UTC)
commit 7f013f2a541b5c3bbf117a1c2ef189da1e753f2e
Author: Alistair Francis <alistair francis xilinx com>
Date: Tue Jan 10 13:04:00 2017 -0800
runqemu: Allow the user to specity no kernel or rootFS
In some cirsumstances the user doesn't want to supply a kernel, rootFS
or DTB to QEMU. This will occur more now that QEMU supports loading
images using a '-device loader' method.
Allow users to specify 'none' for QB_DEFAULT_FSTYPE or QB_DEFAULT_KERNEL
to avoid supplying these options to QEMU.
(From OE-Core rev: 2cc01c4e46b05b7ffcc8a11e7ebde6c43256c3c3)
Signed-off-by: Alistair Francis <alistair francis xilinx com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
scripts/runqemu | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/scripts/runqemu b/scripts/runqemu
index 203992a..83ec337 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -453,7 +453,7 @@ class BaseConfig(object):
def check_rootfs(self):
"""Check and set rootfs"""
- if self.fstype == 'nfs':
+ if self.fstype == 'nfs' or self.fstype == "none":
return
if self.rootfs and not os.path.exists(self.rootfs):
@@ -481,6 +481,10 @@ class BaseConfig(object):
# QB_DEFAULT_KERNEL is always a full file path
kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL'))
+ # The user didn't want a kernel to be loaded
+ if kernel_name == "none":
+ return
+
deploy_dir_image = self.get('DEPLOY_DIR_IMAGE')
if not self.kernel:
kernel_match_name = "%s/%s" % (deploy_dir_image, kernel_name)
@@ -858,6 +862,9 @@ class BaseConfig(object):
k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, self.nfs_dir, self.unfs_opts)
self.kernel_cmdline = 'root=%s rw highres=off' % k_root
+ if self.fstype == 'none':
+ self.rootfs_options = ''
+
self.set('ROOTFS_OPTIONS', self.rootfs_options)
def guess_qb_system(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]