diff options
| author | Alistair Francis <alistair.francis@xilinx.com> | 2017-01-10 13:04:00 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-16 18:05:13 +0000 |
| commit | 7f013f2a541b5c3bbf117a1c2ef189da1e753f2e (patch) | |
| tree | dccdbda0989d1701828ab38e7eba225bc16edeff /scripts | |
| parent | 4cac4f194e0b9fda314771d3a2bf47818ba9547f (diff) | |
| download | poky-7f013f2a541b5c3bbf117a1c2ef189da1e753f2e.tar.gz | |
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>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/runqemu | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 203992a1ad..83ec337e14 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -453,7 +453,7 @@ class BaseConfig(object): | |||
| 453 | def check_rootfs(self): | 453 | def check_rootfs(self): |
| 454 | """Check and set rootfs""" | 454 | """Check and set rootfs""" |
| 455 | 455 | ||
| 456 | if self.fstype == 'nfs': | 456 | if self.fstype == 'nfs' or self.fstype == "none": |
| 457 | return | 457 | return |
| 458 | 458 | ||
| 459 | if self.rootfs and not os.path.exists(self.rootfs): | 459 | if self.rootfs and not os.path.exists(self.rootfs): |
| @@ -481,6 +481,10 @@ class BaseConfig(object): | |||
| 481 | # QB_DEFAULT_KERNEL is always a full file path | 481 | # QB_DEFAULT_KERNEL is always a full file path |
| 482 | kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL')) | 482 | kernel_name = os.path.basename(self.get('QB_DEFAULT_KERNEL')) |
| 483 | 483 | ||
| 484 | # The user didn't want a kernel to be loaded | ||
| 485 | if kernel_name == "none": | ||
| 486 | return | ||
| 487 | |||
| 484 | deploy_dir_image = self.get('DEPLOY_DIR_IMAGE') | 488 | deploy_dir_image = self.get('DEPLOY_DIR_IMAGE') |
| 485 | if not self.kernel: | 489 | if not self.kernel: |
| 486 | kernel_match_name = "%s/%s" % (deploy_dir_image, kernel_name) | 490 | kernel_match_name = "%s/%s" % (deploy_dir_image, kernel_name) |
| @@ -858,6 +862,9 @@ class BaseConfig(object): | |||
| 858 | k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, self.nfs_dir, self.unfs_opts) | 862 | k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, self.nfs_dir, self.unfs_opts) |
| 859 | self.kernel_cmdline = 'root=%s rw highres=off' % k_root | 863 | self.kernel_cmdline = 'root=%s rw highres=off' % k_root |
| 860 | 864 | ||
| 865 | if self.fstype == 'none': | ||
| 866 | self.rootfs_options = '' | ||
| 867 | |||
| 861 | self.set('ROOTFS_OPTIONS', self.rootfs_options) | 868 | self.set('ROOTFS_OPTIONS', self.rootfs_options) |
| 862 | 869 | ||
| 863 | def guess_qb_system(self): | 870 | def guess_qb_system(self): |
