From 9e9c33d51e401fe2b4a632db74ccb3449e4b23ee Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 8 Aug 2023 17:55:56 +0100 Subject: [PATCH] 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. Signed-off-by: Richard Purdie --- meta/classes-recipe/qemuboot.bbclass | 2 +- scripts/runqemu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/qemuboot.bbclass b/meta/classes-recipe/qemuboot.bbclass index 444871438da..12d0a509f13 100644 --- a/meta/classes-recipe/qemuboot.bbclass +++ b/meta/classes-recipe/qemuboot.bbclass @@ -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 ?= "" diff --git a/scripts/runqemu b/scripts/runqemu index 5e6793d44e5..0e105a918b1 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -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. -- 2.47.2