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
Adventurer
Adventurer
6,268 Views
Registered: ‎05-07-2012

ZC702 get new MAC address each time I boot it

I'm using a custom root fs built from OE-core with the Zynq kernel from Xilinx. Each time I boot, I get a new IP address. I've traced this back to a seemingly random MAC address each time I boot.

 

This is the message during boot:

 

XEMACPS mii bus: probed
xemacps e000b000.eth: invalid address, use assigned
MAC updated 7a:26:f3:79:19:7e

 

Where should the zc702 board get its MAC address from? Is there an onboard eeprom with a mac address or similar?

 

0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
6,265 Views
Registered: ‎09-10-2008

Re: ZC702 get new MAC address each time I boot it

There is an onboard i2c eeprom, but there is no mac address in it.  We used to do that on other boards. I'll ask the board guys more details. 

 

I have a request to add pulling it from the device tree for the network driver (not much work, but it's low priority in the grand scheme). Once that's in, then u-boot could get it however board specific and then alter the device tree to pass it to Linux I'm thinking.

 

As I look at the driver (and others) it's pretty common it appears to be generating a random address if there is no valid address is a common thing.

 

Thanks.

 

0 Kudos
Adventurer
Adventurer
6,263 Views
Registered: ‎05-07-2012

Re: ZC702 get new MAC address each time I boot it

I'm familiar with the random mac address generation, but after a while it gets infuriating running through the dhcp address range. It also make sit hard to write scripts to scp new kernels etc.

 

Hopefully, ethaddr can write a mac into the board eeprom :) It would be nice to know if the driver supports that. That's how I set the MAC address opn some other stuff.

 

Philip

0 Kudos
Xilinx Employee
Xilinx Employee
6,260 Views
Registered: ‎11-12-2007

Re: ZC702 get new MAC address each time I boot it

One thing that's quite common is to hard-code a MAC address into the DTS file during development on a per-board basis. In production, I've also seen scripts to use U-Boot's ability to modify the DTS file stored in non-volatile memory to set per-board mac addresses during production. It's actually fairly straightforward - PetaLogix has a support document outlining the procedure:

 

http://www.petalogix.com/support/kb/mac_addr_update/

 

I have several development boards that I have configured on a subnet and all are set up this way.

 

--Rob

0 Kudos
Adventurer
Adventurer
6,244 Views
Registered: ‎05-07-2012

Re: ZC702 get new MAC address each time I boot it

I'm fine with setting the MAC address from the device tree during prototyping, but for production, I'd like to see the MAC address come from the board and not depend on messing with the device tree. That seems like an easy way for customers to lose the MAC address belonging to the hardware.

0 Kudos