Cram FS on NAND - How to do this?
Pantelis Antoniou
panto at intracom.gr
Wed Jun 11 04:43:12 EDT 2003
Hi
As it currently stands the only filesystems supporting
raw NAND flash are:
JFFS2: Read/write, compressed, best support, slow startup.
YAFFS: Read/write, not compressed, newcomer, fast startup.
I have a requirement to have a compressed read only
root filesystem in my board and I've come to the
conclussion that the best fit would be CRAMFS if only
had any concept of bad blocks.
Looking at the code for CRAMFS I see that it would not
be very difficult to hack it to detect the bad blocks
and skip over them on startup. We could rely on
the same OOB info that JFFS2 has, and just
make a mapping list as follows:
NAND block bad? fs block
---------- ---- --------
0 n 0
1 n 1
2 y skip
3 n 2
... etc
The first complication is that CRAMFS works with
PAGE_SIZE blocks only, and that should be taken
into account.
The second is that this is the first time I hack filesystem
code and I would like to ask the list if you see any difficulties
ahead.
What are your thoughts in this?
Regards
Pantelis
More information about the linux-mtd
mailing list