diff options
author | Ricardo Salveti <ricardo@opensourcefoundries.com> | 2018-03-29 15:47:26 -0300 |
---|---|---|
committer | Ricardo Salveti <ricardo@opensourcefoundries.com> | 2018-03-29 15:47:26 -0300 |
commit | 82a9c20ffb045011b53f3188d04d79f440ee8b06 (patch) | |
tree | 8309cc593f59861ed4848dea09b09b3f04e18416 /scripts | |
parent | 2619e3f3312713f4077d83b2f2e5f9c7de66d12b (diff) | |
parent | b1a114da280a05cfc2b7b099c97101bd20cc6b8f (diff) | |
download | meta-updater-82a9c20ffb045011b53f3188d04d79f440ee8b06.tar.gz |
Merge remote-tracking branch 'origin/rocko' into rocko-merge
Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/qemucommand.py | 6 | ||||
-rwxr-xr-x | scripts/run-qemu-ota | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/scripts/qemucommand.py b/scripts/qemucommand.py index 6b1106d..4918314 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,localaddr=127.0.0.1', | ||
112 | ] | ||
107 | if self.gui: | 113 | if self.gui: |
108 | cmdline += ["-serial", "stdio"] | 114 | cmdline += ["-serial", "stdio"] |
109 | else: | 115 | else: |
diff --git a/scripts/run-qemu-ota b/scripts/run-qemu-ota index 56e4fbc..b2f55e9 100755 --- a/scripts/run-qemu-ota +++ b/scripts/run-qemu-ota | |||
@@ -33,6 +33,9 @@ def main(): | |||
33 | help='Use an overlay storage image file. Will be created if it does not exist. ' + | 33 | help='Use an overlay storage image file. Will be created if it does not exist. ' + |
34 | 'This option lets you have a persistent image without modifying the underlying image ' + | 34 | 'This option lets you have a persistent image without modifying the underlying image ' + |
35 | 'file, permitting multiple different persistent machines.') | 35 | 'file, permitting multiple different persistent machines.') |
36 | parser.add_argument('--secondary-network', action='store_true', dest='secondary_network', | ||
37 | help='Give the image a second network card connected to a virtual network. ' + | ||
38 | 'This can be used to test Uptane Primary/Secondary communication.') | ||
36 | parser.add_argument('-n', '--dry-run', help='Print qemu command line rather then run it', action='store_true') | 39 | parser.add_argument('-n', '--dry-run', help='Print qemu command line rather then run it', action='store_true') |
37 | args = parser.parse_args() | 40 | args = parser.parse_args() |
38 | try: | 41 | try: |