-
Notifications
You must be signed in to change notification settings - Fork 9
Networking
To configure an ASIX-based Ethernet adapter for network operations in U-Boot, follow these steps:
- Connect the Ethernet adapter to your device.
- Issue the following command in the console to start the USB subsystem:
usb start
- Once the adapter is initialized, set up your network configuration with the following commands:
- Set your device's IP address:
setenv ipaddr 192.168.1.169
- Set the gateway IP address (usually your router's IP):
setenv gatewayip 192.168.1.1
- Set the server IP address (if required):
setenv serverip 192.168.1.1
- Set your device's IP address:
- You may also use the
dhcp
command as an alternative to manual address configuration. See the DHCP section of the wiki for further information.
- Use the
ping
command to verify connectivity to the gateway:ping ${gatewayip}
- If the ping command returns a response, your network configuration is successful, and network operations should now be available.
If you encounter any issues during setup, ensure that all connections are secure and that the IP addresses used are correct for your network.
Wired Ethernet support is available on devices equipped with a wired PHY and a transceiver to facilitate Ethernet connectivity.
Upon installation, a MAC address is generated and assigned to the ethaddr
and wlanmac
environment variables, based on the SoC serial number. If no serial number is detected, random MAC addresses are generated. These variable can be modified if necessary.
To change the Ethernet MAC address, use the following U-Boot command:
setenv ethaddr <NewMACAddress>
Replace <NewMACAddress>
with your desired MAC address value. After setting the new MAC address, ensure to save the changes to the environment variables by executing:
saveenv
This action commits the new ethaddr
or wlanmac
values to persistent storage, ensuring it is retained across system reboots.
This section explains how to configure and use DHCP for network booting in environments where the wired Ethernet adapter is utilized. Before proceeding, ensure that your wired Ethernet adapter has been correctly initialized.
The DHCP command facilitates the automatic acquisition of an IP address and boot parameters from a DHCP server. This is particularly useful for network boot scenarios.
Syntax:
dhcp [loadAddress] [[hostIPaddr:]bootfilename]
-
loadAddress
: The memory address where the boot file will be loaded. -
hostIPaddr
: Optional. The IP address of the DHCP server. If omitted, the DHCP server discovery is performed. -
bootfilename
: The name of the boot file to be loaded.
Example:
dhcp 0x80600000 192.168.1.1:test.bin
In this example, dhcp
requests the file test.bin
from the DHCP server at 192.168.1.1
to be loaded into memory at address 0x80600000
.
- Initialize Ethernet Adapter: Before issuing the DHCP command, ensure your device's Ethernet adapter is initialized and operational.
-
Issue DHCP Command: Use the
dhcp
command with the desired parameters to initiate the DHCP request and load the specified boot file.
- Ensure that the DHCP server is configured to serve the file specified in the command.
- The success of this operation depends on proper network configuration and the availability of a DHCP server configured to assign IP addresses and serve boot files.
If your device does not feature onboard wired ethernet, or if you wish to speed up the boot process, you may find it beneficial to disable wired ethernet detection and intialization during boot.
To disable wired ethernet support, execute the following command in U-Boot:
setenv disable_eth true
Conversely, to re-enable wired ethernet support, use:
setenv disable_eth false
Make sure you save your changes to the environment. See: Saving Environment Variables