08-13-2012 04:42 PM
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?
08-13-2012 05:34 PM
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.
08-13-2012 05:38 PM
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.
08-13-2012 05:43 PM
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:
I have several development boards that I have configured on a subnet and all are set up this way.
08-14-2012 09:33 AM
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.