[U-Boot] [PATCH] omap3evm: Set environment variable 'ethaddr'
Premi, Sanjeev
premi at ti.com
Fri Sep 2 15:51:19 CEST 2011
> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de]
> Sent: Friday, September 02, 2011 7:14 PM
> To: Premi, Sanjeev
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH] omap3evm: Set environment
> variable 'ethaddr'
>
> Dear Sanjeev Premi,
>
> In message <1314967433-14199-1-git-send-email-premi at ti.com> you wrote:
> > It is now responsibility of the board specific init
> > code to set the environment variable corresponding
> > to the MAC address.
> >
> > Signed-off-by: Sanjeev Premi <premi at ti.com>
>
> This looks all wrong to me. In U-Boot, the "ethaddr" environment
> variable is normally the primary storage for the MAC address. Only
> when this variable is not set, other potential storage locations may
> be referenced to initialize this value.
>
> Your patch always and unconditionally overwrites any existing
> "ethaddr" settings. This is not acceptable.
For the EVM, MAC address is always probed from the chip. Hence, I
assumed it safe to set the ethaddr - without checking for env var.
It was unlikely that someone would be setting it - to different
value.
But, I see your point that I should be checking for existence of a
valid ethaddr before setting/overwriting it.
~sanjeev
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> Build a system that even a fool can use and only a fool will want to
> use it.
>
More information about the U-Boot
mailing list