From: Joe Slater Date: Wed, 21 Feb 2024 00:04:17 +0000 (-0800) Subject: qemuboot: predictable network interface names X-Git-Tag: uninative-4.4~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8d92ad46273a4e305f690f2820a475e4d7f6701;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git qemuboot: predictable network interface names Allow interface renaming if 'pni-names' is a distro feature. We do not add QB_NO_PNI to QB_CMDLINE_IP_SLIRP because renaming was never suppressed for slirp. Signed-off-by: Joe Slater Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/qemuboot.bbclass b/meta/classes-recipe/qemuboot.bbclass index ff32aac9023..4a563b8cccd 100644 --- a/meta/classes-recipe/qemuboot.bbclass +++ b/meta/classes-recipe/qemuboot.bbclass @@ -101,8 +101,13 @@ QB_DEFAULT_FSTYPE ?= "ext4" QB_RNG ?= "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0" QB_OPT_APPEND ?= "" QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" + +# qemurunner needs ip information first, so append QB_NO_PNI +# +QB_NO_PNI ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pni-names', '', 'net.ifnames=0', d)}" 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 net.ifnames=0" +QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:8.8.8.8 ${QB_NO_PNI}" + QB_ROOTFS_EXTRA_OPT ?= "" QB_GRAPHICS ?= "" QB_NFSROOTFS_EXTRA_OPT ?= ""