[U-Boot] fw_setenv broken?

Scott Wood scottwood at freescale.com
Wed Nov 17 23:08:02 CET 2010


On Wed, 17 Nov 2010 22:40:49 +0100
Wolfgang Denk <wd at denx.de> wrote:

> Dear Steve Sakoman,
> 
> In message <AANLkTimrfQ5+AWfdFy_fueTMH=x=xrkaZGNtK8fiSD48 at mail.gmail.com> you wrote:
> >
> > readenv: offset = 240000
> > readenv: nand_read failure = -117
> > *** Warning - readenv() failed, using default environment
> > 
> > I then immediately tried to use the nand read command to read the same
> > block, and it was successful!
> 
> Hm... any chance that - for example - your timers are not working
> correctly before relocation (maybe because they try to write to the
> not yet available data segment) ? This could cause timeouts or delays
> to be too short, so the NAND driver is misbehaving?

The NAND driver only works after relocation.

It looks like the problem is that -EUCLEAN is a non-fatal error
(indicates a correctable ECC error).  The code invoked by the "nand
read" command succeeds if nand_read() returns either 0 or -EUCLEAN, but
readenv() is missing this check.

-Scott



More information about the U-Boot mailing list