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]

Re: FAT on NOR/ NAND flash


viren.dobariya wrote:
I am trying to port FAT on NOR flash of EA2468 board.

Running FAT on a raw flash device is not a good idea. I would suggest that you use a different filesystem more suited to flash memory parts - jffs2 and yaffs come to mind - or, if you really insist on using FAT, implement a flash translation layer including wear levelling.



FAT was designed for media with small (often 512 bytes) sectors which are individually rewritable (floppy drives, hard drives); NOR flash devices can only be erased at the block level (64k or more). You'll have an awful lot of trouble making it work properly. Because of this it is also quite dangerous: the length of time taken to erase and reprogram a whole block is much longer than it takes to write a sector to magnetic media, leaving you very vulnerable to power supply issues.


Furthermore, the filesystem stores its file allocation table at fixed sector locations. This leads to those regions of your flash device experiencing a disproportionate amount of use; they will likely wear out quickly, rendering your filesystem useless.


Ross


--
eCosCentric Ltd, Barnwell House, Barnwell Drive, Cambridge CB5 8UU, UK
Registered in England no. 4422071.                 www.ecoscentric.com

--
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]