From 7549229831b649c2bdbcd9bdf1cb2f408aec2140 Mon Sep 17 00:00:00 2001 From: jimmylu890303 Date: Sun, 21 Jul 2024 20:43:52 +0800 Subject: [PATCH] Enable necessary kernel networking options for virtio-net device Enabled kernel configuration options required for networking functionality,including `CONFIG_NET`,`CONFIG_INET`,`CONFIG_VIRTIO`, `CONFIG_VIRTIO_NET`,`CONFIG_NETDEVICES` etc. Additionally, enabled specific networking commacands necessary for testing the virtio-net device. --- configs/busybox.config | 87 ++++++++++++++++++++-------------------- configs/linux-x86.config | 14 ++++++- 2 files changed, 57 insertions(+), 44 deletions(-) diff --git a/configs/busybox.config b/configs/busybox.config index 2c68f16..509281c 100644 --- a/configs/busybox.config +++ b/configs/busybox.config @@ -849,14 +849,14 @@ CONFIG_TREE=y # # CONFIG_FEATURE_IPV6 is not set # CONFIG_FEATURE_UNIX_LOCAL is not set -# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set # CONFIG_FEATURE_ETC_NETWORKS is not set # CONFIG_FEATURE_ETC_SERVICES is not set # CONFIG_FEATURE_HWIB is not set # CONFIG_FEATURE_TLS_SHA1 is not set -# CONFIG_ARP is not set -# CONFIG_ARPING is not set +CONFIG_ARP=y +CONFIG_ARPING=y # CONFIG_BRCTL is not set # CONFIG_FEATURE_BRCTL_FANCY is not set # CONFIG_FEATURE_BRCTL_SHOW is not set @@ -869,7 +869,7 @@ CONFIG_TREE=y # CONFIG_FTPGET is not set # CONFIG_FTPPUT is not set # CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set -# CONFIG_HOSTNAME is not set +CONFIG_HOSTNAME=y # CONFIG_DNSDOMAINNAME is not set # CONFIG_HTTPD is not set CONFIG_FEATURE_HTTPD_PORT_DEFAULT=0 @@ -888,21 +888,21 @@ CONFIG_FEATURE_HTTPD_PORT_DEFAULT=0 # CONFIG_FEATURE_HTTPD_LAST_MODIFIED is not set # CONFIG_FEATURE_HTTPD_DATE is not set # CONFIG_FEATURE_HTTPD_ACL_IP is not set -# CONFIG_IFCONFIG is not set -# CONFIG_FEATURE_IFCONFIG_STATUS is not set -# CONFIG_FEATURE_IFCONFIG_SLIP is not set -# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set -# CONFIG_FEATURE_IFCONFIG_HW is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y # CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set # CONFIG_IFENSLAVE is not set # CONFIG_IFPLUGD is not set -# CONFIG_IFUP is not set -# CONFIG_IFDOWN is not set +CONFIG_IFUP=y +CONFIG_IFDOWN=y CONFIG_IFUPDOWN_IFSTATE_PATH="" -# CONFIG_FEATURE_IFUPDOWN_IP is not set -# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set -# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set -# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +CONFIG_FEATURE_IFUPDOWN_IP=y +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +CONFIG_FEATURE_IFUPDOWN_MAPPING=y # CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set # CONFIG_INETD is not set # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set @@ -911,20 +911,20 @@ CONFIG_IFUPDOWN_IFSTATE_PATH="" # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set # CONFIG_FEATURE_INETD_RPC is not set -# CONFIG_IP is not set -# CONFIG_IPADDR is not set -# CONFIG_IPLINK is not set -# CONFIG_IPROUTE is not set -# CONFIG_IPTUNNEL is not set -# CONFIG_IPRULE is not set -# CONFIG_IPNEIGH is not set -# CONFIG_FEATURE_IP_ADDRESS is not set -# CONFIG_FEATURE_IP_LINK is not set -# CONFIG_FEATURE_IP_ROUTE is not set +CONFIG_IP=y +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +CONFIG_IPNEIGH=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y CONFIG_FEATURE_IP_ROUTE_DIR="" -# CONFIG_FEATURE_IP_TUNNEL is not set -# CONFIG_FEATURE_IP_RULE is not set -# CONFIG_FEATURE_IP_NEIGH is not set +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_NEIGH=y # CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set # CONFIG_IPCALC is not set # CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set @@ -938,31 +938,31 @@ CONFIG_FEATURE_IP_ROUTE_DIR="" # CONFIG_NC_SERVER is not set # CONFIG_NC_EXTRA is not set # CONFIG_NC_110_COMPAT is not set -# CONFIG_NETSTAT is not set +CONFIG_NETSTAT=y # CONFIG_FEATURE_NETSTAT_WIDE is not set # CONFIG_FEATURE_NETSTAT_PRG is not set -# CONFIG_NSLOOKUP is not set -# CONFIG_FEATURE_NSLOOKUP_BIG is not set -# CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS is not set +CONFIG_NSLOOKUP=y +CONFIG_FEATURE_NSLOOKUP_BIG=y +CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=y # CONFIG_NTPD is not set # CONFIG_FEATURE_NTPD_SERVER is not set # CONFIG_FEATURE_NTPD_CONF is not set # CONFIG_FEATURE_NTP_AUTH is not set -# CONFIG_PING is not set +CONFIG_PING=y # CONFIG_PING6 is not set -# CONFIG_FEATURE_FANCY_PING is not set +CONFIG_FEATURE_FANCY_PING=y # CONFIG_PSCAN is not set -# CONFIG_ROUTE is not set +CONFIG_ROUTE=y # CONFIG_SLATTACH is not set # CONFIG_SSL_CLIENT is not set # CONFIG_TC is not set # CONFIG_FEATURE_TC_INGRESS is not set # CONFIG_TCPSVD is not set # CONFIG_UDPSVD is not set -# CONFIG_TELNET is not set -# CONFIG_FEATURE_TELNET_TTYPE is not set -# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set -# CONFIG_FEATURE_TELNET_WIDTH is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +CONFIG_FEATURE_TELNET_WIDTH=y # CONFIG_TELNETD is not set # CONFIG_FEATURE_TELNETD_STANDALONE is not set CONFIG_FEATURE_TELNETD_PORT_DEFAULT=0 @@ -976,7 +976,7 @@ CONFIG_FEATURE_TELNETD_PORT_DEFAULT=0 # CONFIG_FEATURE_TFTP_BLOCKSIZE is not set # CONFIG_TFTP_DEBUG is not set # CONFIG_TLS is not set -# CONFIG_TRACEROUTE is not set +CONFIG_TRACEROUTE=y # CONFIG_TRACEROUTE6 is not set # CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set @@ -999,9 +999,9 @@ CONFIG_FEATURE_TELNETD_PORT_DEFAULT=0 CONFIG_DHCPD_LEASES_FILE="" # CONFIG_DUMPLEASES is not set # CONFIG_DHCPRELAY is not set -# CONFIG_UDHCPC is not set -# CONFIG_FEATURE_UDHCPC_ARPING is not set -# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y CONFIG_UDHCPC_DEFAULT_SCRIPT="" CONFIG_UDHCPC6_DEFAULT_SCRIPT="" # CONFIG_UDHCPC6 is not set @@ -1009,6 +1009,7 @@ CONFIG_UDHCPC6_DEFAULT_SCRIPT="" # CONFIG_FEATURE_UDHCPC6_RFC4704 is not set # CONFIG_FEATURE_UDHCPC6_RFC4833 is not set # CONFIG_FEATURE_UDHCPC6_RFC5970 is not set + CONFIG_UDHCPC_DEFAULT_INTERFACE="" # CONFIG_FEATURE_UDHCP_PORT is not set CONFIG_UDHCP_DEBUG=0 diff --git a/configs/linux-x86.config b/configs/linux-x86.config index 1ebbe45..f83ac17 100644 --- a/configs/linux-x86.config +++ b/configs/linux-x86.config @@ -15,7 +15,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_SGETMASK_SYSCALL is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_FHANDLE is not set -# CONFIG_POSIX_TIMERS is not set +# CONFIG_POSIX_TIMERS=y # CONFIG_BUG is not set # CONFIG_PCSPKR_PLATFORM is not set # CONFIG_BASE_FULL is not set @@ -115,3 +115,15 @@ CONFIG_FRAME_WARN=1024 # CONFIG_X86_DEBUG_FPU is not set CONFIG_UNWINDER_GUESS=y # CONFIG_RUNTIME_TESTING_MENU is not set +CONFIG_NET=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_NETDEVICES=y +CONFIG_VIRTIO=y +CONFIG_VIRTIO_NET=y +CONFIG_VIRTIO_RING=y +CONFIG_UNIX=y +CONFIG_UNIX_SCM=y +CONFIG_AF_UNIX_OOB=y \ No newline at end of file