09-26-2019 09:58 PM
We are bringing up a custom board but are running into issues attempting to communitcate using GEM2. It seems like the issue is the mismatch between the MAC address and the environment variable ethaddr. (Petalinux 2018.3)
Net: ZYNQ GEM: ff0d0000, mdio bus ff0d0000, phyaddr 0, interface rgmii-id Warning: ethernet@ff0d0000 (eth2) using random MAC address - ae:f6:a9:3e:b3:c7 eth2: ethernet@ff0d0000 U-BOOT for petalinux
Environment variable value of ethaddr
The issue here is that the MAC address was configured to not use a randomized MAC address and set to a static one in petalinux-config:
I want to know why this is the case and where/how I can resolve this. Thanks!
09-27-2019 04:00 AM
The flow that the u-boot will use is seen here:
If you read the ethaddr in u-boot, is it set to the random one, or the one you set in the environment?
09-27-2019 07:09 AM
When readying from uboot the ethaddr is the correct value set in Petalinux. So in the flow there
2. Read from environment in net/eth.c after initialize() 3. The environment variable will be compared to the driver initialized struct eth_device->enetaddr. If they differ, a warning is printed, and the environment variable will be used unchanged. If the environment variable is not set, it will be initialized from eth_device->enetaddr, and a warning will be printed.
there seems to something going wrong at step 3. The environment variable should already be set at this stage:
environment variable will be compared to the driver initialized struct eth_device->enetaddr
It is also interesting that the warning is not the typical warning that states the MAC address does not match. Instead it simple prints
Warning: ethernet@ff0d0000 (eth2) using random MAC address - ae:f6:a9:3e:b3:c7 eth2: ethernet@ff0d0000 U-BOOT for petalinux