]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: independent network and rootfs setup
authorJuro Bystricky <juro.bystricky@intel.com>
Wed, 15 Mar 2017 19:21:16 +0000 (12:21 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Mar 2017 17:36:10 +0000 (17:36 +0000)
Presently, runqemu sets up rootfs as part of network setup.
In case there is no network desired we will end up without rootfs
as well.
This patch sets up network and rootfs independently.
It is also possible to bypass setup of rootfs if QB_ROOTFS is set to "none".

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index c5fa88e3412e3d78df07fb52e86e6fa9106fec09..3e2172434cd6cab05f77512ac24323bc2ef57067 100755 (executable)
@@ -935,6 +935,9 @@ class BaseConfig(object):
         else:
             self.setup_tap()
 
+    def setup_rootfs(self):
+        if self.get('QB_ROOTFS') == 'none':
+            return
         rootfs_format = self.fstype if self.fstype in ('vmdk', 'qcow2', 'vdi') else 'raw'
 
         qb_rootfs_opt = self.get('QB_ROOTFS_OPT')
@@ -1167,6 +1170,7 @@ def main():
     config.print_config()
     try:
         config.setup_network()
+        config.setup_rootfs()
         config.setup_final()
         config.start_qemu()
     finally: