]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: allow bypassing of network setup
authorJuro Bystricky <juro.bystricky@intel.com>
Wed, 25 Jan 2017 20:54:57 +0000 (12:54 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 31 Jan 2017 14:40:18 +0000 (14:40 +0000)
At present it is silently assumed all QEMU machines support networking.
As a consequence, one cannot run QEMUs without network emulation
using "runqemu".
This patch allows bypassing any network setup providing the qemuboot.conf
file contains:

    qb_net = none

[YOCTO#10661]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/runqemu

index 3d475d32d8e3b26980dedcd89498e16bfa015cc4..31eff5a0822b90ca492823c1cbeee9ee645b81db 100755 (executable)
@@ -894,6 +894,8 @@ class BaseConfig(object):
         self.set('NETWORK_CMD', '%s %s' % (self.network_device.replace('@MAC@', mac), qemu_tap_opt))
 
     def setup_network(self):
+        if self.get('QB_NET') == 'none':
+            return
         cmd = "stty -g"
         self.saved_stty = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8')
         self.network_device = self.get('QB_NETWORK_DEVICE') or self.network_device