qemuboot.bbclass: make nameserver configurable
PATCH 1/1 qemuboot.bbclass: make nameserver configurable
From: Chen Qi <[email protected]>
Instead of hardcoding '8.8.8.8' for tap interface, we introduce QB_TAP_NAMESERVER to allow nameserver to be configured.
This helps improve runqemu user experience because users can easily configure their nameservers to access the networks they want. Note that this method does not change the contents of the rootfs.
--- meta/classes-recipe/qemuboot.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/classes-recipe/qemuboot.bbclass +2 -1
@@ -106,7 +106,8 @@ QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" # 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 ${QB_NO_PNI}" +QB_TAP_NAMESERVER ?= "8.8.8.8" +QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:${QB_TAP_NAMESERVER} ${QB_NO_PNI}" QB_ROOTFS_EXTRA_OPT ?= "" QB_GRAPHICS ?= ""
Signature · 1 line
2.34.1
It would be good to add a comment into qemuboot class explaining what 8.8.8.8 is actually:
https://en.wikipedia.org/wiki/Google_Public_DNS
Alex
Quoted 41 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
Instead of hardcoding '8.8.8.8' for tap interface, we introduce
QB_TAP_NAMESERVERto allow nameserver to be configured.This helps improve runqemu user experience because users can easily configure their nameservers to access the networks they want. Note that this method does not change the contents of the rootfs.
Signed-off-by Chen Qi <[email protected]>--- meta/classes-recipe/qemuboot.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/classes-recipe/qemuboot.bbclass +2
-2@@ -106,7 +106,8 @@ QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" # 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 ${QB_NO_PNI}" +QB_TAP_NAMESERVER ?= "8.8.8.8" +QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:${QB_TAP_NAMESERVER} ${QB_NO_PNI}" QB_ROOTFS_EXTRA_OPT ?= "" QB_GRAPHICS ?= "" --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#227509): https://lists.openembedded.org/g/openembedded-core/message/227509
Mute This Topic: https://lists.openembedded.org/mt/116723817/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
OK. I'll add comment and send out V2.
Regards,
Qi
-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Thursday, December 11, 2025 4:57 PM
To: Chen, Qi <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] qemuboot.bbclass: make nameserver configurable
It would be good to add a comment into qemuboot class explaining what 8.8.8.8 is actually:
https://en.wikipedia.org/wiki/Google_Public_DNS
Alex
Quoted 44 lines · Chen Qi via lists.openembedded.org
From: Chen Qi <[email protected]>
Instead of hardcoding '8.8.8.8' for tap interface, we introduce
QB_TAP_NAMESERVERto allow nameserver to be configured.This helps improve runqemu user experience because users can easily configure their nameservers to access the networks they want. Note that this method does not change the contents of the rootfs.
Signed-off-by Chen Qi <[email protected]>--- meta/classes-recipe/qemuboot.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/classes-recipe/qemuboot.bbclass +2
-2@@ -106,7 +106,8 @@ QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@" # 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 ${QB_NO_PNI}" +QB_TAP_NAMESERVER ?= "8.8.8.8" +QB_CMDLINE_IP_TAP ?= "ip=192.168.7.@CLIENT@::192.168.7.@GATEWAY@:255.255.255.0::eth0:off:${QB_TAP_NAMESERVER} ${QB_NO_PNI}" QB_ROOTFS_EXTRA_OPT ?= "" QB_GRAPHICS ?= "" --2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#227509):
https://lists.openembedded.org/g/openembedded-core/message/227509
Mute This Topic: https://lists.openembedded.org/mt/116723817/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-