diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-01-09 23:27:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-11 10:53:44 +0000 |
commit | 2a3e849326592d8213cf29fcb6f49d10136f32d6 (patch) | |
tree | 6e0ff751386050cc32ff3564a085c6f0da4c5778 | |
parent | 6ba5808ebf41faa5377b52a2183f53149cc90f4b (diff) | |
download | poky-2a3e849326592d8213cf29fcb6f49d10136f32d6.tar.gz |
qemuboot/runqemu: fully form the ip= kernel parameter
New systemd is actually parsing this in systemd-network-generator
and fails if it is not fully formed. 'off' means 'static ip, do nothing':
https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
(From OE-Core rev: 2cf12c8dde0f05917797f8b4a80883dc0647b95d)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/qemuboot.bbclass | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 2 | ||||
-rwxr-xr-x | scripts/runqemu | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass index 95cd1d6c4a..cc1cbce69d 100644 --- a/meta/classes/qemuboot.bbclass +++ b/meta/classes/qemuboot.bbclass | |||
@@ -93,7 +93,7 @@ QB_RNG ?= "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-p | |||
93 | QB_OPT_APPEND ?= "" | 93 | QB_OPT_APPEND ?= "" |
94 | QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" | 94 | QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" |
95 | QB_CMDLINE_IP_SLIRP ?= "ip=dhcp" | 95 | QB_CMDLINE_IP_SLIRP ?= "ip=dhcp" |
96 | QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0" | 96 | QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:8.8.8.8" |
97 | QB_ROOTFS_EXTRA_OPT ?= "" | 97 | QB_ROOTFS_EXTRA_OPT ?= "" |
98 | QB_GRAPHICS ?= "" | 98 | QB_GRAPHICS ?= "" |
99 | 99 | ||
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 0397148082..76296d50cd 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
@@ -407,7 +407,7 @@ class QemuRunner: | |||
407 | self.logger.debug("qemu cmdline used:\n{}".format(cmdline)) | 407 | self.logger.debug("qemu cmdline used:\n{}".format(cmdline)) |
408 | except (IndexError, ValueError): | 408 | except (IndexError, ValueError): |
409 | # Try to get network configuration from runqemu output | 409 | # Try to get network configuration from runqemu output |
410 | match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+)$.*', | 410 | match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+).*', |
411 | out, re.MULTILINE|re.DOTALL) | 411 | out, re.MULTILINE|re.DOTALL) |
412 | if match: | 412 | if match: |
413 | self.ip, self.server_ip, self.netmask = match.groups() | 413 | self.ip, self.server_ip, self.netmask = match.groups() |
diff --git a/scripts/runqemu b/scripts/runqemu index d49f128fe4..4e05c1bb15 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -199,7 +199,7 @@ class BaseConfig(object): | |||
199 | self.fsinfo = {} | 199 | self.fsinfo = {} |
200 | self.network_device = "-device e1000,netdev=net0,mac=@MAC@" | 200 | self.network_device = "-device e1000,netdev=net0,mac=@MAC@" |
201 | self.cmdline_ip_slirp = "ip=dhcp" | 201 | self.cmdline_ip_slirp = "ip=dhcp" |
202 | self.cmdline_ip_tap = "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0" | 202 | self.cmdline_ip_tap = "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:8.8.8.8" |
203 | # Use different mac section for tap and slirp to avoid | 203 | # Use different mac section for tap and slirp to avoid |
204 | # conflicts, e.g., when one is running with tap, the other is | 204 | # conflicts, e.g., when one is running with tap, the other is |
205 | # running with slirp. | 205 | # running with slirp. |