diff options
author | Joe Slater <joe.slater@windriver.com> | 2024-02-20 16:04:17 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-21 22:20:10 +0000 |
commit | c2e742e2be1fbad7a21435b825c964dd6052d7a5 (patch) | |
tree | 7d1709fa243237bbcd689a6632056de3519abbd9 /meta/classes-recipe | |
parent | 82ef31b2550f2f7398dd7d1161e16aaf8acc9371 (diff) | |
download | poky-c2e742e2be1fbad7a21435b825c964dd6052d7a5.tar.gz |
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.
(From OE-Core rev: d8d92ad46273a4e305f690f2820a475e4d7f6701)
Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r-- | meta/classes-recipe/qemuboot.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes-recipe/qemuboot.bbclass b/meta/classes-recipe/qemuboot.bbclass index ff32aac902..4a563b8ccc 100644 --- a/meta/classes-recipe/qemuboot.bbclass +++ b/meta/classes-recipe/qemuboot.bbclass | |||
@@ -101,8 +101,13 @@ QB_DEFAULT_FSTYPE ?= "ext4" | |||
101 | QB_RNG ?= "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0" | 101 | QB_RNG ?= "-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0" |
102 | QB_OPT_APPEND ?= "" | 102 | QB_OPT_APPEND ?= "" |
103 | QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" | 103 | QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" |
104 | |||
105 | # qemurunner needs ip information first, so append QB_NO_PNI | ||
106 | # | ||
107 | QB_NO_PNI ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pni-names', '', 'net.ifnames=0', d)}" | ||
104 | QB_CMDLINE_IP_SLIRP ?= "ip=dhcp" | 108 | QB_CMDLINE_IP_SLIRP ?= "ip=dhcp" |
105 | 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" | 109 | 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}" |
110 | |||
106 | QB_ROOTFS_EXTRA_OPT ?= "" | 111 | QB_ROOTFS_EXTRA_OPT ?= "" |
107 | QB_GRAPHICS ?= "" | 112 | QB_GRAPHICS ?= "" |
108 | QB_NFSROOTFS_EXTRA_OPT ?= "" | 113 | QB_NFSROOTFS_EXTRA_OPT ?= "" |