* Add RTEMS libbsd static network config for motload nvram setBootConfigFromNVRAM() now configures static networking via the libbsd rtems_bsd_ifconfig() API when building against RTEMS with libbsd. It only uses static networking if it can find a configured IP and netmask from GEV or the mot script boot parameters, otherwise it falls back to DHCP. Also note, NTP was part of setBootConfigFromNVRAM() when using legacy RTEMS networking, but is handled outside this function for LibBSD. To preserve the legacy behavior, setBootConfigFromNVRAM() still pulls out NTP server info, but now stores it in an output parameter for outside code to use. * Wait for link to come up when starting RTEMS/libbsd/static IP When configuring a static IP on RTEMS/libbsd, we need to intentionally wait for the link to come up before continuing to configure ntp, etc. * Separate common network setup from BSP specific implementations All the BSP setBootConfigFromNVRAM() functions ultimately configured the RTEMS networking the same way. The common networking code has been pulled out into a separate function now called from BSP specific code. All networking setup is now included and optionally used only when the BSP sets the field appropriately. This lets the setBootConfigFromNVRAM functions be independent of the network stack, just focussing on collecting the configuration from each BSP as appropriate. * Fix unused function warnings for functions unused on certain BSPs * Remove old comments about if MY_BOOTP * Added release note entry -- Co-authored-by: Brendan Chandler <bchandler@anl.gov>
800 B
800 B
Static network configuration for RTEMS targets using libBSD
GitHub PR #853
RTEMS targets built against the libBSD network stack can now use a static network configuration in addition to DHCP.
When a static IP address and netmask can be read from the board's boot configuration, the first non-loopback interface is configured with that static address; otherwise the target falls back to DHCP as before.
The boot configuration is read using the mechanism appropriate to the board:
- MOTLOAD boards read the NVRAM Global Environment Variables (GEV), falling
back to the parameters in the
mot-script-bootboot script. - PPCBUG boards read their PPCBUG NVRAM.
- ColdFire (
mcf528x) boards read their bootloader environment variables.