Skip to contentSkip to conversation

qemuboot/runqemu: Fix 6.2 and later kernel network device naming

PATCH New Richard Purdie 1 participant 1 message Aug 8, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemuboot/runqemu: Fix 6.2 and later kernel network device naming

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.

---
 meta/classes-recipe/qemuboot.bbclass | 2 +-
 scripts/runqemu                      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
meta/classes-recipe/qemuboot.bbclass +1 -1
index 444871438da..12d0a509f13 100644
@@ -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 ?= ""
scripts/runqemu +1 -1
index 5e6793d44e5..0e105a918b1 100755
@@ -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.
Signature · 1 line
2.39.2