Repository navigation
Documentation/netutils: add comprehensive guide for netinit - #20578
Merged
Merged
Conversation
xiaoxiang781216
previously approved these changes
Oct 10, 2026
michallenc
requested changes
Oct 11, 2026
michallenc
left a comment
Contributor
There was a problem hiding this comment.
Just a minor note here, other than that thanks for the detailed description.
Provide a complete documentation guide for the netinit (network initialization) subsystem in Documentation/applications/netutils/netinit/index.rst, replacing the previous 4-line placeholder stub. Includes: - Architectural overview and execution modes (synchronous sequential, asynchronous background pthread, and split local-only configuration via CONFIG_NETINIT_NETLOCAL) - Autonomous MII PHY link monitoring daemon (CONFIG_NETINIT_MONITOR) with carrier detection, MII ioctl polling, and signal-driven reconnection - Primary network device selection hierarchy (wlan0, eth0, wpan0, bnep0, sl0, tun0, lo, can0) - Software MAC address provisioning strategies (CONFIG_NETINIT_NOMAC via UID-derived IEEE LAA, device calibration file, and fixed software MAC) - IPv4 static configuration, dynamic DHCP client (RFC 2131), and runtime IP configuration file (fsutils/ipcfg via CONFIG_IPCFG_PATH, ASCII and binary formats) - IPv6 static addressing and ICMPv6 Stateless Address Autoconfiguration (SLAAC, RFC 4862), with effective /112 Kconfig netmask default - DNS nameserver registration and automated NTP client daemon startup (ntpclient) - Wi-Fi association via WAPI (wpa_driver_wext_associate) with WPA2-PSK and infrastructure/ad-hoc modes - Complete Kconfig options reference table - Public C API reference (netinit_bringup, netinit_associate) - Practical configuration and usage scenarios (Ethernet with DHCP, static IP industrial node with silicon UID MAC, and Wi-Fi IoT auto-association) - Troubleshooting and diagnostics guide (CONFIG_NETINIT_DEBUG, boot freezes, link monitor PHY interrupts, and Wi-Fi association) Addresses apache#11081 Assisted-by: Google Gemini Signed-off-by: Swatantra Yadav <[email protected]>
Swatantra-66
force-pushed
the
doc/netinit-guide
branch
from
October 11, 2026 16:45
c86f389 to
6f75244
Compare
xiaoxiang781216
approved these changes
Oct 11, 2026
michallenc
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Provide a comprehensive documentation guide for the
netinit(Network Initialization) subsystem inDocumentation/applications/netutils/netinit/index.rst, replacing the previous 4-line placeholder stub.Addresses #11081.
Key Additions:
!CONFIG_NETINIT_THREAD) vs. asynchronous background thread execution (CONFIG_NETINIT_THREAD, priority 80, stack sizing), preventing boot freezes during PHY auto-negotiation or DHCP delays.CONFIG_NETINIT_NETLOCAL) for staged multi-phase boot, captive portals, and interactive Wi-Fi onboarding.CONFIG_NETINIT_MONITORevent-driven lifecycle: signal registration (CONFIG_NETINIT_SIGNO), MII PHY carrier interrupt notifications (SIOCMIINOTIFY), register status evaluation (MII_MSR_LINKSTATUS), automatic link down / UP state toggling, and configurable retry periods (CONFIG_NETINIT_RETRYMSEC).wlan0→eth0→wpan0→bnep0→sl0→tun0→lo→can0).CONFIG_NETINIT_NOMACoptions: board silicon unique ID (CONFIG_NETINIT_UIDMAC) derived as an IEEE Locally Administered Address (LAA) with truncation caveats noted, device calibration files (CONFIG_NETINIT_MACADDRviaBOARDIOC_MACADDR), and fixed software MACs (CONFIG_NETINIT_SWMAC).2131), static IP configuration, and dynamic runtime file configuration (CONFIG_FSUTILS_IPCFGvia/etc/net.cfg) with filesystem mount retry delays (CONFIG_NETINIT_RETRY_MOUNTPATH).4862) vs. static IPv6 addressing, accurately documenting the effective Kconfig default netmask (ffff:ffff:ffff:ffff:ffff:ffff:ffff:0,/112).netlib_set_ipv4dnsaddr().netinit_associate()using Wireless Extensions (WEXT) ioctls, covering station modes (Infrastructure, Ad-hoc, Mesh), WPA/WPA2-Personal, CCMP/AES and TKIP ciphers, and SSID/passphrase credentials.ntpc_start()as soon as interface link state transitions to UP.netinit_bringup()andnetinit_associate().CONFIG_NETINIT_DEBUG=yto prevent system-wideDEBUG_NETconsole flooding.Impact
Testing
docutilsand Sphinx parsers (0 errors, 0 warnings).git diff --check).apps/include/netutils/netinit.h.apps/netutils/netinit/netinit.c,netinit_associate.c, andapps/netutils/netinit/Kconfig.