This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about FIS Directory when using NAND flash.


I'm using Linux with NAND flash and recently decided to use a RedBoot
partition table (though I'm not using RedBoot on that particular
board).  I ran into a problem: the Linux FIS directory parsing code
assumes that the size of the "FIS directory" partition is always going
to be exactly 1 erase block.

While I can see how this might be true for NOR flash, how can it be
true for NAND flash? Commonly sold NAND flashes spec a 2% block
failure rate, and requiring that some arbitrary block be good means
you've got to plan on a failure of 1 of 50 units.

When I allocated spare blocks to the FIS directory partition, the
Linux FIS parsing code pukes and decides that the directory entries
must be byte-swapped because the size of the parition containing the
FIS directory is larger than 1 block.  [Why would directory entries be
byte-swapped anyway?] The Linux partition parsing code _does_ handle
bad blocks correctly, and will skip over bad blocks to find the
directory. But, once it's found the directory it does something stupid
because the size of the flash allocated for FIS directory is larger
than 1 block.

I've temporarily hacked the Linux kernel code to fix this problem, but
I'm wondering exactly how RedBoot handles bad NAND blocks when it
comes to the FIS directory "partition".  When using RedBoot with NAND
flash is the FIS directory "partition" exactly one block?

[There's also a bug in the linux kernel code that automatically
creates "unallocated" partitions, but that's a bit OT.]

-- 
Grant Edwards               grant.b.edwards        Yow! I always have fun
                                  at               because I'm out of my
                              gmail.com            mind!!!


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]