[U-Boot] Raspberry Pi's MAC address locked to the first device the SD card boots on

Matthias Brugger matthias.bgg at gmail.com
Thu May 16 15:37:41 UTC 2019



On 03/05/2019 01:07, Timothy Froehlich wrote:
> We've had a problem the past few days that we've traced back to U-Boot.
> We're generating images using Yocto with Mender's update routine. The issue
> is the first time a clean image is booted on a Raspberry Pi, the mac
> address gets permanently saved to the ethaddr env variable. It's a
> combination of this line:
> 
> https://github.com/u-boot/u-boot/blob/b4ee6daad7a2604ca9466b2ba48de86cc27d381f/board/raspberrypi/rpi/rpi.c#L348
> 
> and what I'm pretty sure is Mender doing a "saveenv" on first boot. If you
> move the SD card to a different Raspberry Pi, it will boot up with the mac
> address of the first Raspberry Pi.
> 

What you would need to do is, delete ethaddr before booting on a different
board. I suppose your problem is, that you want to use the same image on
different boards and find yourself with the same address. Correct?

> I'm not sure what the best long-term solution will be but I can make a
> patch for my purposes to just always set ethaddr to usbethaddr.
> 
Well that would omit the possibility to use other MAC addresses then the one in
the RPi firmware.

Regards,
Matthias

> So I guess i'm emailing this in to report an issue and maybe help anyone
> else who runs into this issue.
> 


More information about the U-Boot mailing list