]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
qemuboot/runqemu: Fix 6.2 and later kernel network device naming
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 8 Aug 2023 16:55:56 +0000 (17:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Aug 2023 12:21:56 +0000 (13:21 +0100)
With kernel 6.2 and later network devices are renamed by systemd. This does not
match with the current network device naming assumed in our configuration.

We may or may not change that naming but for now, pass the right kernel commandline
so things work as expected with newer kernels and removing a blocker on upgrading
to the 6.4 kernel by default.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/qemuboot.bbclass
scripts/runqemu

index 444871438da22d7f3b3b472a61be8d846d6c74bd..12d0a509f13d288ed6f1595ac6cfff9f888d019b 100644 (file)
@@ -102,7 +102,7 @@ QB_RNG ?= "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-p
 QB_OPT_APPEND ?= ""
 QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@"
 QB_CMDLINE_IP_SLIRP ?= "ip=dhcp"
-QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:8.8.8.8"
+QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:8.8.8.8 net.ifnames=0"
 QB_ROOTFS_EXTRA_OPT ?= ""
 QB_GRAPHICS ?= ""
 QB_NFSROOTFS_EXTRA_OPT ?= ""
index 5e6793d44e56d9b0465a273f6caba49cffa8f62d..0e105a918b155f812a8c57b40d8731b839c0a33d 100755 (executable)
@@ -203,7 +203,7 @@ class BaseConfig(object):
         self.fsinfo = {}
         self.network_device = "-device e1000,netdev=net0,mac=@MAC@"
         self.cmdline_ip_slirp = "ip=dhcp"
-        self.cmdline_ip_tap = "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:8.8.8.8"
+        self.cmdline_ip_tap = "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:8.8.8.8 net.ifnames=0"
         # Use different mac section for tap and slirp to avoid
         # conflicts, e.g., when one is running with tap, the other is
         # running with slirp.