[U-Boot] [PATCH 02/27] doc/README.enetaddr: document proper MAC usage

Mike Frysinger vapier at gentoo.org
Tue Feb 17 01:12:10 CET 2009


On Monday 16 February 2009 17:38:54 Wolfgang Denk wrote:
> In message Mike Frysinger wrote:
> > +Here are the places where MAC addresses might be stored:
> > +
> > + - board-specific location (eeprom, dedicated flash, ...)
> > +	Note: only used when mandatory due to hardware design etc...
> > +
> > + - environment ("ethaddr", "eth1addr", ...) (see CONFIG_ETHADDR)
> > +	Note: this is the preferred way to permanently store MAC addresses
> > +
> > + - ethernet data (struct eth_device -> enetaddr)
> > +	Note: these are temporary copies of the MAC address which exist only
> > +	      after the respective init steps have run and only to make usage
> > +	      in other places easier (to avoid constant env lookup/parsing)
>
>     - struct bd_info and/or device tree
>         Note: these are temporary copies of the MAC address only foir
> 	the purpose to pass this information to an OS kernel we are
> 	about to boot
>
> > +The common environment code will take care of passing environment
> > changes to +the global data.  This happens automatically whenever
> > setenv() updates the +relevant ethaddr variables.
>
> Didn't we just remove the MAC address information from the global
> data?
>
> > +Any other common code that wishes to access the MAC address should then
> > query +the global data directly.  No one should be looking in the
> > environment for any +addresses.
>
> Is this still valid?

erm, i updated the file in places i remembered, but didnt give it a complete 
top-to-bottom look over after the last discussion.  ive fixed up the things 
you pointed out, thanks.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090216/d7a34961/attachment-0001.pgp 


More information about the U-Boot mailing list