[U-Boot-Users] why eeprom vs flash

Jerry Van Baren gerald.vanbaren at ge.com
Thu Feb 14 21:01:25 CET 2008


Jon Smirl wrote:
> On 2/14/08, David Hawkins <dwh at ovro.caltech.edu> wrote:
>> Jon Smirl wrote:
>>  > I'm new to working on low level code like u-boot. Something I don't
>>  > understand is why things like the Ethernet address are stored in
>>  > eeprom instead of flash. Is this something to do with how boards are
>>  > manufactured? From a high level perspective it doesn't seem to matter
>>  > if eeprom or flash is used.
>>
>>
>> I think you'll find varied implementations.
>>
>>  For example, on the MPC8349EA-MDS-PB boards, the
>>  MAC addresses are stored in U-Boot environment variables
>>  and they're written on the CPU heatsink base.
>>
>>  If you erase the Flash, then poof, gone are your MAC
>>  addresses. When you Flash a new version of U-Boot you
>>  need to set the IP addresses and save the environment
>>  to the Flash.
>>
>>  I would imagine some designers prefer saving these type
>>  of parameters to an EEPROM, independent of the application
>>  (bootloader, kernel, filesystem, etc) flash. This would
>>  cut down on the support calls from customers who erase
>>  their flash and forget their MAC addresses (or can't
>>  see the MAC labels if the units are installed).
> 
> How are the MAC addresses assigned? So if I order ten Ethernet chips
> from Digikey will they come with something from the manufacturer
> indicating which MAC addresses to use?

No, MAC chips don't come with MAC addresses, they are assigned by the 
board manufacturer, not the chip manufacture (to the best of my experience).

People have talked about buying 10 cheap ethernet boards and "stealing" 
their MAC addresses, but that is poor form because your board will be 
identified as belonging to a cheap NE2000 clone manufacturer.  :-/

FAQ:
<http://www.denx.de/wiki/view/DULG/WhereCanIGetAValidMACAddress>

You can set the "locally administered" bit to make your own MAC address 
(no guarantee of uniqueness, but pretty good odds if you are smart):
   <http://en.wikipedia.org/wiki/MAC_address>

"Universally administered and locally administered addresses are 
distinguished by setting the second least significant bit of the most 
significant byte of the address. If the bit is 0, the address is 
universally administered. If it is 1, the address is locally 
administered. The bit is 0 in all OUIs. For example, 02-00-00-00-00-01. 
The most significant byte is 02h. The binary is 00000010 and the second 
least significant bit is 1. Therefore, it is a locally administered 
address."


> Or do I need to register as a vendor and get my own block of addresses?

That is an option for a "small fee":
<http://standards.ieee.org/regauth/oui/pilot-ind.html>
<http://standards.ieee.org/regauth/oui/forms/>

>>  So, as the designer, its up to you. But keep in mind that
>>  you want to make it hard for a customer to screw up, so
>>  a separate EEPROM could be a good choice.
>>
>>  Cheers,
>>  Dave

Best regard,
gvb




More information about the U-Boot mailing list