diff options
author | Phil Wise <phil@advancedtelematic.com> | 2018-03-19 16:31:31 +0100 |
---|---|---|
committer | Phil Wise <phil@advancedtelematic.com> | 2018-03-19 16:31:31 +0100 |
commit | fc8f9b4b1721a029a30bf41e6086cfbff085089d (patch) | |
tree | 1251f3656efe0504f1cefec590fe2a6280a1e5ac /scripts/qemucommand.py | |
parent | c3c8d56af6daac3c1eb38118f683db430af48d63 (diff) | |
download | meta-updater-fc8f9b4b1721a029a30bf41e6086cfbff085089d.tar.gz |
Add a --secondary-network option to run-qemu-ota
This sets up a simulated 'in vehicle' network. Add support for a Primary node
with a DHCP server and a secondary node with a DHCP client.
Diffstat (limited to 'scripts/qemucommand.py')
-rw-r--r-- | scripts/qemucommand.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 6b1106d..e209a07 100644 --- a/scripts/qemucommand.py +++ b/scripts/qemucommand.py | |||
@@ -81,6 +81,7 @@ class QemuCommand(object): | |||
81 | self.gdb = args.gdb | 81 | self.gdb = args.gdb |
82 | self.pcap = args.pcap | 82 | self.pcap = args.pcap |
83 | self.overlay = args.overlay | 83 | self.overlay = args.overlay |
84 | self.secondary_network = args.secondary_network | ||
84 | 85 | ||
85 | def command_line(self): | 86 | def command_line(self): |
86 | netuser = 'user,hostfwd=tcp:0.0.0.0:%d-:22,restrict=off' % self.ssh_port | 87 | netuser = 'user,hostfwd=tcp:0.0.0.0:%d-:22,restrict=off' % self.ssh_port |
@@ -104,6 +105,11 @@ class QemuCommand(object): | |||
104 | ] | 105 | ] |
105 | if self.pcap: | 106 | if self.pcap: |
106 | cmdline += ['-net', 'dump,file=' + self.pcap] | 107 | cmdline += ['-net', 'dump,file=' + self.pcap] |
108 | if self.secondary_network: | ||
109 | cmdline += [ | ||
110 | '-net', 'nic,vlan=1,macaddr='+random_mac(), | ||
111 | '-net', 'socket,vlan=1,mcast=230.0.0.1:1234', | ||
112 | ] | ||
107 | if self.gui: | 113 | if self.gui: |
108 | cmdline += ["-serial", "stdio"] | 114 | cmdline += ["-serial", "stdio"] |
109 | else: | 115 | else: |