[U-Boot] ARM: rpi_b: query internal MAC address from firmware

Marek Vasut marex at denx.de
Thu Sep 25 10:06:18 CEST 2014


On Thursday, September 25, 2014 at 04:25:37 AM, Stephen Warren wrote:
[...]
> >> Normally this should be within a check for if (!getenv("usbethaddr")).
> >> Any reason to deviate from that?
> > 
> > That makes sense. I simply wasn't aware of the convention. I'll amend
> > the patch.
> 
> Oh, actually...
> 
> When this code runs, there's no way that usbethaddr can already be set.
> There's no usbethaddr value set in the default environment

Unless you place it there because you know what you're doing ...

> , there is no
> persistent environment storage on this board

There is SD/MMC slot, that's enough to implement persistent storage.

> so the default environment
> is always used, and misc_init_r() happens well before any kind script
> that the user might modify (such as uEnv.txt or boot.scr) can run. If
> the user wants to override usbethaddr, they can just set a new value in
> uEnv.txt.
> 
> Does it still make sense to add this guard anyway, or does this justify
> the existing version of the patch?

I'd guard it to be future proof.

Best regards,
Marek Vasut


More information about the U-Boot mailing list