[U-Boot] [PATCH] mvgbe: remove setting of ethaddr within the driver

Michael Walle michael at walle.cc
Wed Nov 9 00:26:09 CET 2011


Am Dienstag 08 November 2011, 23:52:56 schrieb Wolfgang Denk:
> > thanks for the hint, but there is only 512kb flash on this board (with
> > 64k sectors). I don't think there is enough room for a second copy of
> > the environment.
> 
> You don't need a separate sector.  How bis is your environment/  I bet
> if fits easily in 4 KiB or so - just find an unused part of a sector,
> and put it there.  Yes, upating it will be more complicated, as you
> hav eto read that sector into RAM, replace the larst part, and write it
> back, but resource-restricted systems require efficient use of memory.
may be possible, but then there is a window of opportunity where the mac is 
already erased but the not yet written with a new one.

and there is this very easy recovery procedure.. just erase the environment, 
let the network works in some way and manually set the mac address, which 
apparently use some boards.

> > i think there are more boards like this, esp. since there is this mac
> > randomization code within the mvgbe driver.
> 
> I don't want to have that in mainline.
well it is...

atm there is the mvgbe driver:
 - which has a hardcoded mac address (or if enabled, a randomized mac address)
   and
 - touches the environment

trying to fix this, it will be nak'ed because the boards in mainline have to 
behave identically before and after the patch. but without CONFIG_ETHADDR or 
generic randomization support, which will be nak'ed, too, this is not 
possible. sounds to me like a dead end.

additionally, there are these kind of boards without non-volatile storage 
other than one tiny flash, which holds uboot and its environment and therefore 
has the mac address stored within the environment. to make it more complicated 
some of these boards have to have a working ethernet connectivity with the 
default environment.

-- 
Michael


More information about the U-Boot mailing list