...
To set up the board MAC address in U-Boot, perform the following step-wise procedure:
Reset the kit.
Stop at the U-Boot prompt, by hitting any key in the serial console window at the U-Boot countdown.
Run the following command to determine if a MAC PHY address has been already allocated to your kit:
Code Block 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.
If there is no MAC PHY set up in U-Boot, perform the following commands to set up the MAC PHY in U-Boot:
Code Block u-boot=> setenv ethaddr 3C:FB:96:DC:59:7F u-boot=> saveenv
For interfaces other than first (eth0), use environment variables
eth1addr
for eth1 and so on. 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.Boot to Linux, check that the kernel makes use of the MAC PHY you have assigned to your kit:
Code Block user@imx8mpnavq:~$ ifconfig eth0 eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.0.202 netmask 255.255.255.0 broadcast 192.168.0.255 inet6 fe80::fb68:4822:1adf:db5d prefixlen 64 scopeid 0x20<link> ether e6:56:76:21:d7:ef txqueuelen 1000 (Ethernet) ...