UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Observer tkato@poc.com
Observer
217 Views
Registered: ‎09-06-2019

Petalinux MAC address mismatch in uboot

Hi, 

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)

U-boot console:

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

ethaddr=00:0a:35:00:22:01

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:


eth_config.PNGethernet config

I want to know why this is the case and where/how I can resolve this. Thanks!

0 Kudos
2 Replies
Moderator
Moderator
196 Views
Registered: ‎09-12-2007

Re: Petalinux MAC address mismatch in uboot

The flow that the u-boot will use is seen here:

https://github.com/Xilinx/u-boot-xlnx/blob/987756e59840a8a0fa0feb386a7fba9169fff156/doc/README.enetaddr

If you read the ethaddr in u-boot, is it set to the random one, or the one you set in the environment?

0 Kudos
Observer tkato@poc.com
Observer
162 Views
Registered: ‎09-06-2019

Re: Petalinux MAC address mismatch in uboot

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

 

 

 

 

0 Kudos