[U-Boot] [PATCH] README: Add new NAND env features

Wolfgang Denk wd at denx.de
Fri Sep 17 22:47:04 CEST 2010


Dear Scott Wood,

In message <20100917194327.GA17192 at udp111988uds.am.freescale.net> you wrote:
> CONFIG_ENV_SIZE only needs page alignment, not block
> 
> Document CONFIG_ENV_RANGE and CONFIG_ENV_OFFSET_OOB.

I appreciate your efforts, but I think we should also fix the code.

For me it seems important to keep concepts identical no matter which
kind of storage device is used.  The first implementations of the
envrionment used either NOR flash or EEPROMs (I2C or SPI attached) for
storage.

Here, CONFIG_ENV_SIZE defines the actually used part of the available
storage medium.

For example, on NOR flash we might see an erase block size of 256 KiB
(resulting in a "#define CONFIG_ENV_SECT_SIZE (256 << 10)" or
similar). But normally we don't need so much space for the
environment, so we set CONFIG_ENV_SIZE to (for example) 16 KiB. The
advantage is that with this setting the checksum calculation includes
only CONFIG_ENV_SIZE, which can be a measurable difference in boot
time.


So CONFIG_ENV_SIZE is supposed to mean the actually available size for
the envrionment, and there are no alignment or other requirements for
it. It is perfectly legal to "#define CONFIG_ENV_SIZE 12345" or
similar.


I would like to keep this meaning consistent for other storage types,
including NAND.  If the current code (mis-) uses CONFIG_ENV_SIZE in a
way that needs any form of alignment to the NAND device geometry, this
code is broken and should be fixed.

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
Die ganzen Zahlen hat der liebe Gott  geschaffen,  alles  andere  ist
Menschenwerk...                                     Leopold Kronecker


More information about the U-Boot mailing list