2.10.11. Wired Networking#

The Processor SDK for Linux includes networking support right out of the box. Both the AM62x GP EVM and SK support networking. The diagram below serves as an example hardware setup.

../_images/Academy_Eval_Tour_Networking.png

The network interfaces can be seen in Linux by using the below commands executed on an EVM or SK:

# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
        inet 192.168.2.19  netmask 255.255.255.0  broadcast 192.168.2.255
        inet6 fe80::f684:4cff:fef9:7c17  prefixlen 64  scopeid 0x20<link>
        ether f4:84:4c:f9:7c:17  txqueuelen 1000  (Ethernet)
        RX packets 8  bytes 1046 (1.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 67  bytes 10018 (9.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500  metric 1
        ether 70:ff:76:1d:f1:a3  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536  metric 1
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 82  bytes 6220 (6.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 82  bytes 6220 (6.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

From the output above, the eth0 and eth1 interfaces in Linux correspond to the two RJ45 Ethernet connectors on the boards. In this example, eth0 is connected to the host development machine. The host development machine is running a DHCP server which assigns the 192.168.2.19 IP address to the target board. This output would look similar if a router with DHCP enabled was used. If there is not an IP address listed, then the interface will not be able to communicate over an IP network. Static IP addresses can be used if a DHCP server is not available.

If the target has an IP address, the ping command can be used to verify basic network connectivity. In the example below, the target board with the 192.168.2.19 IP address is pinging the host with the 192.168.2.1 IP address.

# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes
64 bytes from 192.168.2.1: seq=0 ttl=64 time=0.397 ms
64 bytes from 192.168.2.1: seq=1 ttl=64 time=0.439 ms
64 bytes from 192.168.2.1: seq=2 ttl=64 time=0.404 ms
64 bytes from 192.168.2.1: seq=3 ttl=64 time=0.392 ms
64 bytes from 192.168.2.1: seq=4 ttl=64 time=0.429 ms
64 bytes from 192.168.2.1: seq=5 ttl=64 time=0.418 ms
64 bytes from 192.168.2.1: seq=6 ttl=64 time=0.367 ms
64 bytes from 192.168.2.1: seq=7 ttl=64 time=0.278 ms

Here is an example of the kernel boot log output for networking:

# dmesg | grep net
[    0.863266] 9pnet: Installing 9P2000 support
[    2.131176] am65-cpsw-nuss 8000000.ethernet: initializing am65 cpsw nuss
    version 0x6BA01103, cpsw version 0x6BA81103 Ports: 3 quirks:00000002
[    2.212366] am65-cpsw-nuss 8000000.ethernet: set new flow-id-base 19
[    2.256045] am65-cpsw-nuss 8000000.ethernet: Use random MAC address
[    2.262314] am65-cpsw-nuss 8000000.ethernet: initialized cpsw ale version 1.5
[    2.269440] am65-cpsw-nuss 8000000.ethernet: ALE Table size 512
[    2.276324] am65-cpsw-nuss 8000000.ethernet: CPTS ver 0x4e8a010c, freq:0, add_val:7 pps:0
[   10.878849] am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
[   10.927886] am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
[   15.029692] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

In the above output, the eth0 interface comes up because eth0 has a cable plugged in that connects it to an Ethernet link partner. The eth1 interface does not come up because eth1 is not connected to a link partner.