Setting Up Ethernet Link |
To connect the kit to Ethernet LAN, plug the Ethernet cable (included with the kit) between the Ethernet connector on the HGI board and an Ethernet switch (or similar) connected to your LAN. The following picture illustrates connection on the kit side: To unplug the cable from the kit, push the two buttons on the sides of the cable connector while pulling the connector out of the kit.
When Linux boots, the Ethernet interface is enabled and configured in the default image installed to the kit. The IP address is obtained from a DHCP server. Use the following command to see the IP address that has been assigned to your kit:
At this point, you can have the full Linux TCP/IP stack enabled in Linux. To provide a most basic example of how you can use Ethernet in Linux, the following command copies a file from your Linux host to the kit via scp: $ scp tmp/target.file root@192.168.1.6:/tmp
The Ethernet MAC PHY may or may not be set as a U-Boot environment variable on your kit. If the MAC PHY is not set in U-Boot, the Linux Ethernet kernel driver uses a randomly-generated MAC on every boot. With IP address obtained from DHCP, this will result in your board getting a new IP address on every boot, which is not always convenient. To set up the board MAC address in U-Boot, perform the following step-wise procedure:
u-boot=> printenv ethaddr If this command returns a valid MAC address, all is good, you can proceed to boot to Linux at this point. u-boot=> setenv ethaddr 3C:FB:96:DC:59:7F If you have several kits on your LAN, increase the last digit for each kit so the MAC addresses are all unique in your LAN.
|