All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Raspberry Pi's MAC address locked to the first device the SD card boots on
@ 2019-05-02 23:07 Timothy Froehlich
  2019-05-16 15:37 ` Matthias Brugger
  0 siblings, 1 reply; 2+ messages in thread
From: Timothy Froehlich @ 2019-05-02 23:07 UTC (permalink / raw)
  To: u-boot

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.

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.

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

-- 
Tim Froehlich
Embedded Linux Engineer
tfroehlich at archsys.io
215-218-8955

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] Raspberry Pi's MAC address locked to the first device the SD card boots on
  2019-05-02 23:07 [U-Boot] Raspberry Pi's MAC address locked to the first device the SD card boots on Timothy Froehlich
@ 2019-05-16 15:37 ` Matthias Brugger
  0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2019-05-16 15:37 UTC (permalink / raw)
  To: u-boot



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.
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-16 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 23:07 [U-Boot] Raspberry Pi's MAC address locked to the first device the SD card boots on Timothy Froehlich
2019-05-16 15:37 ` Matthias Brugger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.