[U-Boot] [PATCH 03/12] da850: add NOR boot mode support

Detlev Zundel dzu at denx.de
Wed Aug 10 12:50:51 CEST 2011


Hi Nag,

[...]

>> > +#define CONFIG_SYS_FLASH_SECT_SZ	(128 << 10) /* 128KB */
>> > +#define CONFIG_ENV_OFFSET		(CONFIG_SYS_FLASH_SECT_SZ * 3)
>> > +#define CONFIG_ENV_SIZE			(128 << 10)
>> 
>> Are you absolutely sure that you need 128 KiB of environment data?
>> Keep in mind that such a big environment will _considerably_ slow
>> down booting - and in all practical situations I have seen so far
>> the actual environment size was in the order of a few KiB only - I
>> don;t even remember any board with more than 10 KiB.
>> 
>
> I agree with you that 128 KiB is huge. It is 128KiB because sector size for
> NOR flash is 128KiB. So, decision was to reserve one complete sector for ENV
> Data.

It's pretty common to have such large sectors.  So using one sector for
the environment is of course pretty common.  From the sector size
however we use only a fraction for the _actual_ data, as the environment
functions have a runtime dependency on the size of the environment
_data_ (think about calculating the CRC).  So if you simply reduce the
environment (data) size, you will get faster runtime practically for
free.  So keep the flash layout but reduce the environment size.

Cheers
  Detlev

-- 
The GNU GPL makes sense in terms of its purpose: freedom and social
solidarity.  Trying to understand it in terms of the goals and values of
open source is like trying understand a CD drive's retractable drawer as
a cupholder.  You can use it for that, but that is not what it was
designed for.                      -- Richard Stallman
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list