[U-Boot] [RFD] store env size in env area (+ cookie + len)
Matthias Weißer
weisserm at arcor.de
Thu Aug 12 09:27:31 CEST 2010
Am 12.08.2010 08:43, schrieb Frans Meulenbroeks:
> I've seen a few times that people get a u-boot with their board and
> want to use fw_setenv under linux to tweak with environment variables.
> This requires them to come up with an fw-env.config (if not provided).
> One of the things that I've seen, that some people have trouble with
> it is obtaining the proper size of the environment area to be stuffed
> in that file.
> Con: not compatible with current env layout so (without precautions) a
> new u-boot cannot use the old env and vice versa.
I didn't dig into the code but I don't think it is good idea to change
the environment format. There may be (or at least there is for my board)
code that scans the environment which is not derived from u-boot code. A
new header entry would break this code.
Why not store the size of the environment sector as env variable? The
size should be only needed for storing the environment and not for
loading (as it is terminated by a '\0'). So we could load the
environment, check for "env_size" and if its not there take the value
from fw_env.config
Matthias
More information about the U-Boot
mailing list