This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: AW: General NAND Flash support?
- From: Ross Younger <ecos at impropriety dot org dot uk>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Wed, 17 Dec 2014 09:11:42 +1300
- Subject: Re: AW: General NAND Flash support?
- Authentication-results: sourceware.org; auth=none
- References: <006e01d01876$c053a860$40faf920$ at itrgmbh dot de> <548F2A96 dot 5070606 at mindspring dot com> <20141215221924 dot GA16860 at chunk dot ammanford dot ecoscentric dot com> <006701d01940$087c2760$19747620$ at itrgmbh dot de>
On 17/12/14 03:53, Richard Rauch wrote:
So, as I understand, full NAND functionality is implemented inside YAFFS
only?
YAFFS is implemented on top of the eCosCentric NAND layer. The eCos port
patches YAFFS into the file I/O mechanism where it is available
alongside FAT, jffs2 and others.
The NAND layer is independent of YAFFS - you can find a recent version
of its interface at
http://hg-pub.ecoscentric.com/nand-ecoscentric/file/17169b710e76/packages/io/nand/current/include/nand.h
As I understand, beside user data YAFFS is writing additionally control
information to the Flash (like FAT)?
That is correct. However, YAFFS has been specially designed for NAND
flash - there is no file allocation table or superblock, instead it is
log-structured. This is part of its strategy for avoiding wearing out
individual flash cells, which can be an issue with NAND parts.
But, when we have only NAND on board, how we can boot from NAND?
ROM bootstrap loader from uController is expecting simple Binary image.
This is necessarily a board-specific question, but in general terms:
Some CPUs contain a ROM bootstrap that is just clever enough to load a
small bootstrap from a fixed location on a NAND device. This code in
turn knows how to load the next stage. You might for example choose to
put RedBoot there, which you had carefully configured with YAFFS and
your chosen partition geometry. Your final application image would then
reside on the YAFFS filesystem and you could even script RedBoot to
automatically load and execute it.
Alternatively, there are some NAND parts that offer a NOR-like (i.e.
direct read) interface to limited number of pages. These are intended
for just this purpose -- to store a minimal bootstrapper.
Regards,
Ross
(Full disclosure: I work for eCosCentric; I wrote their NAND layer and
did the YAFFS port.)
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss