[U-Boot-Users] CFG_ENV_SECT_SIZE != CFG_ENV_SIZE
Wolfgang Denk
wd at denx.de
Tue Mar 27 19:47:10 CEST 2007
In message <200703271327.00147.rgetz at blackfin.uclinux.org> you wrote:
> In [u-boot.git] / common / env_flash.c around line 171 there is a
>
> #if CFG_ENV_SECT_SIZE > CFG_ENV_SIZE
>
> to be able to mix other data, and the environment info. (Where 'other data'
> could be U-Boot code).
No, this is NOT the intention.
The intention is to allow for having a resonable envrionment size
(say 8...16kB) even if you have big flash sectors (like 256kB or
more). This is needed to avoid slow bot times because otherwise you
would laways have to compute the CRC checksums for one or two such
big sectors when all you want to protect are a few kB of data.
> If that is the recommendation (which is fine), why have this code snippet in
> there, and not add something like:
>
> #error Do not do this. Do NOT do this. DO NOT DO THIS.
Because it is a very useful thing to have, just for a completely
different purpose (i. e. leave the rest of the sector empty and
unused).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Mike's Law: For a lumber company employing two men and a cut-off saw,
the marginal product of labor for any number of additional workers
equals zero until the acquisition of another cut-off saw. Let's not
even consider a chainsaw.
- Mike Dennison [You could always schedule the saw, though - ed.]
More information about the U-Boot
mailing list