Subject: Re: mac-address vs. local-mac-address

From: Timur Tabi <[email-masked]>
Date: Wed, 07 Feb 2007 16:22:40 -0600

Kumar Gala wrote:

>> For most boards, the compiled-in option is just some random MAC 
>> address.  When the board is shipped, the manufacturer creates his own 
>> set of environment variables and overrides what's stored on flash.
> 
> And where does the mfg store these?

Ideally, on the Ethernet adapters's internal EEPROM.  On non-OF systems, the 
driver is supposed to read the MAC address from the hardware.

> Ok, so 'compiled-in' wasn't the best choice.  What I meant is 
> 'local-mac-address' is the MAC address u-boot decides to use when it 
> boots before any user interaction.  

I agree with that.

> (this may be the compiled-in one, or 
> one from flash env settings, or whatever other source the board code 
> decides).

Well, I think you mean that it should be only the environment variable.  The 
compiled-in version is just a default value for the environment, so that should 
be ignored.  On a few U-Boot Ethernet drivers, the driver queries the hardware 
and fetches the MAC address from it.  The driver then updates the environment 
variable.

So in all case, when U-Boot boots the kernel, it should use the environment 
variable to update local-mac-address, and leave mac-address alone.  I'm trying 
to get a consensus on this proposition.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale