4 using the network – Kontron COMe-cP2020 User Manual

Page 94

Advertising
background image

www.kontron.com

COMe-P2020 User Guide

94

6.5.4

Using the Network

6.5.4.1

Interface Selection

U-Boot provides support for multiple Ethernet interfaces for transferring files from a file server. This is accomplished using
the environment variables: “ethprime”, “ethact” and “ethrotate”.

6.5.4.1.1

ethprime

“ethprime” is used to select the required interface after power-up or reset. During boot-up, the U-Boot checks if
“ethprime” is set. If set, “ethprime” is used as the first active Ethernet interface (“ethact”). Please note that the setting of
the “ethprime” is lost after a reset. To retain the environment permanently, use the command “saveenv”, which saves the
complete environment to flash.
Example:

6.5.4.1.2

ethact

“ethact” is used to define the currently active interface and to change the required interface without rebooting. If a reboot
or a power cycle is done, the active Ethernet interface will be set back to the interface defined in “ethprime” or selected by
the “ethrotate” functionality.
Example:

6.5.4.1.3

ethrotate

“ethrotate” can be used to force the selection of the next available interface if, for example, there is no link available for
the selected interface.
If set to “yes” or undefined, U-Boot updates the “ethact” variable accordingly and tries to download the file again. This is
repeated until either the file is downloaded or all interfaces have been exhausted.
In the event the link is active for the selected interface and “ethrotate” is “yes” or undefined, U-Boot tries to download the
file. If it cannot download the file, it tries the next available interface. If the file is not available on the server, U-Boot
stops trying and issues an error message.
If “ethrotate” is set to “no”, only the interface defined in “ethact” is used.
Please note that the setting of the “ethrotate” is lost after a reset. To retain the environment permanently, use the com-
mand “saveenv”, which saves the complete environment to flash.

=> setenv ethprime eTSEC3
=> saveenv
Saving environment to SPI Flash...
2 MiB
SF: Detected AT25DF161 with page size 256 Bytes, total 2 MiB
Erasing SPI flash...Writing to SPI flash...done
=> reset
...
=> printenv ethact
ethact=eTSEC3
=>

=> setenv ethact eTSEC2
=> ping 172.100.100.35
Using eTSEC2 device
host 172.100.100.35 is alive
=>

Advertising