[U-Boot-Users] [RFC] NAND Flash

Dave Ellis DGE at sixnetio.com
Tue Apr 27 15:52:33 CEST 2004


Pantelis Antoniou wrote:

> The big problem with the code as it is its its tendancy not to
> account properly for errors which are not only probable but
> certain during the life of the device.
> 
> For example the current code cannot boot reliably from NAND
> and the read and write routines are also unreliable.
>
> It's basic assumption made that you can read/write from the NAND
> at any position is false. This is impossible because of
> the bad blocks that may force you to skip a bad sector.

The nand boot looks broken to me. The .jffs2 commands work well
for me for booting from a jffs2 partition.
 
> I'm currently in the process of rewritting to actually make it
> work reliably.
> 
> I can keep backwards compatibility with the old code but
> you can only use it at your own risk.

It definitely could use a rewrite. It looks like it was ported from
a very old version of mtd. Please let's keep the .jffs2
options for jffs2, so we can add optimizations such as skipping
to the end of an empty erase block without breaking other uses.
 
> I'm asking for any people currently working with NAND to comment
> on the following points:
> 
> 1. Do you read and write the NAND at arbitrary offsets?
>    That means not in page boundaries.

No. I read an entire JFFS2 partition, or write a JFFS2 image, but
only on page boundaries.
 
> 2. Do you use the NAND boot command? It can be replaced by a copy and
>    bootm sequence.

No.

> 3. Do you use it as a raw device without employing ECC? Do you
>    understand the implications?

No, use ECC and JFFS2.

> 4. What kind of filesystem do you use? JFFS2 & YAFS have different OOB
>    placement of ECC and status bits?

JFFS2

> 5. What kind of bad block management options would you like? I'm
thinking
>    of implementing a bad block detection mechanism which would erase
and
>    test the whole chip for any bad blocks.
>    Another command could also utilise ECC to detect borderline working
>    pages and relocate them to avoid a permanent failure.

If the factory or linux/jffs2/mtd have marked a block bad it shouldn't
be
erased. There is no reliable way to find them again without factory
tests,
and I think the manufacturers say that erasing a factory marked bad
block
can make the good blocks unreliable. I want jffs2 to handle any new bad
blocks.

Dave Ellis

~~~~~~~~~~~~~~~~~~~~~~~~~~
SIXNET - "Leading the Industrial Ethernet Revolution"
331 Ushers Road,   P.O. Box 767, Clifton Park, NY 12065 USA
Tel +1 (518) 877-5173   Fax +1 (518) 877-8346
Email me at: dge at sixnetio.com 
Detailed product info: www.sixnetio.com 
~~~~~~~~~~~~~~~~~~~~~~~~~~





More information about the U-Boot mailing list