[U-Boot] [PATCH 1/1] mx51evk: savenv or env save command does not work

Wolfgang Denk wd at denx.de
Wed Nov 17 22:50:47 CET 2010


Dear Scott Wood,

In message <20101117152851.767ecccf at udp111988uds.am.freescale.net> you wrote:
>
> > > So, I keep the same setting. If I change it, some guys main complain
> > > why it change, it will make it
> > > incompatible with the original env setting and make the customer env lost.

I missed that part.  Agreed, this is a problem, but a small one.
In a well-maintained product, sucha configuration change should be
properly maintained.  Most probably users will receive a release note,
which may (read: should) contain a description of the update
procedure.

In this specific case, users can use "env import" to restore (before
overwriting) their old environmnt settings.

> I think he was talking about CRCs failing after U-Boot is upgraded --
> whether the environment content is large or small, changing the size
> will change the CRC.  The environment header doesn't say what the size
> is, or else compatibility could be maintained that way.

You are right. I missed that point.

> Specifying the size in the environment header would also allow you to
> just CRC the part that has actual data, while allowing the environment
> to grow up to the entire sector if needed.

Eventually such a change is not even difficult to implement. The
length field could be prepended, shifting the remaining data by 4
bytes.  As before, "env import" could be used to recover old
environment settings.

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
"The algorithm to do that is extremely nasty. You might want  to  mug
someone with it."                   - M. Devine, Computer Science 340


More information about the U-Boot mailing list