[U-Boot] fw_env bug for multi-sector environments on NOR flash

Wolfgang Denk wd at denx.de
Thu Aug 25 22:51:38 CEST 2011


Dear "Fei, Yiyang",

In message <C2A5D1386C6DB94198F2A5C8368EAE6C14659846 at DULMEX02.barco.com> you wrote:
> 
> # MTD device name       Device offset   Env. size       Flash sector
> size       Number of sectors
> /dev/mtd12              0x0000          0x20000         0x10000
> 2

Stupid question: why do you define an environment size of 128 kB?
I bet you use less than 10% of this, right?

Are you aware that this has a lof of disadvantages, lile
significantly slowing down your boot process?


> The reason for the error is that although both sectors are written in
> one pass, the loop for the write is executed twice because the
> "processed" variable is incremented by the incorrect amount.  The
> following change is needed to fix this issue for NOR multi-sector
> environments.  
...
> Are there any objections to committing this change?

Your Signed-off-by: line is missing...

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
Hiring experienced unix people is  like  a  built-in  filter  against
idiots. Hiring experienced NT people provides no such guarantee.
            -- Miguel Cruz in WgL96.349$CC.122704 at typhoon2.ba-dsg.net


More information about the U-Boot mailing list