YAFFS - NAND flash file system for the eCos RTOS
YAFFS is an optional middleware package for the eCos RTOS that provides a high
reliability file system designed and optimized for use with raw NAND flash devices.
YAFFS is one of the most mature, reliable and widely used NAND file systems available today.
First released in 2002, it has been under continual development and refinement ever since.
Typical markets for YAFFS include industrial, instrumentation, and consumer - areas where
reliability, performance and minimal resource usage are key requirements.
YAFFS-based products have included applications as diverse as deep space probes,
surveying equipment, point of sale terminals and sewing machines.
Google's Android platform also uses YAFFS, and has been deployed in phones
from Motorola, Philips, Samsung, LG, HTC and many others.
YAFFS has been fully integrated with eCos. It works in conjunction with eCos's
fileio layer and eCosCentric's NAND flash library and driver architecture.
The integration with eCos's fileio layer ensures that all standard file level API's
work seamlessly with YAFFS. The NAND library layer provides a portable device-independent
interface to YAFFS for the reading, writing and erasing of NAND blocks,
and handling of bad block management and error correction.
YAFFS support has also been incorporated into the eCos-based RedBoot bootloader.
This enables the bootloader and applications to share and modify a common storage medium.
In addition the eCos NAND library's low level bad-block handling has been designed
to be compatible with the Linux-MTD layer. This enables the sharing of a common storage
medium between eCos, RedBoot and Linux, and can help simplify embedded linux installation,
maintenance and update.
Highlights
- Designed and optimised for use with raw NAND flash devices
- Mature, proven file system design and implementation
- Robust against random system resets and NAND block failures
- Designed to maximise NAND device lifetime
- Fully integrated with eCos file system layer
- File level access to YAFFS file systems incorporated into RedBoot bootloader
- Low RAM usage and small code footprint
- GPL licensed version of YAFFS available as a free download - the ideal way to evaluate YAFFS
- Commercial licensed version also available
Technical Features
- Automatic initialisation of virgin NAND devices - no formatting required
- Partitioning support - simplifies implementation of NAND-only booting and
bootloader based systems
- Multiple NAND device configurations for high capacity designs
- Both large and small page NAND device types supported
- High performance device drivers with ECC h/w offload capability
(where supported by NAND controller)
- A range of polled and interrupt driven driver modes are available - optimise performance vs overhead
- eCos synthetic target device driver available - includes bad block injection and logging facilities
- Linux MTD NAND layer compatible
- UTF-8 compatible file and pathnames
Reliability & Longevity
YAFFS is specifically designed for use with raw NAND flash memory,
optimized for speed and to ensure reliability and longevity.
NAND is an inherently unreliable storage medium and the NAND library and YAFFS
take multiple complementary approaches to maximise its usable life, detect
and correct errors as they occur, and maximise performance.
These include:
- Log structured file system design
- Dynamic wear levelling
- Write gathering
- Bad block management
- Error Correcting Codes (ECC) for defect detection and correction
- ECC hardware acceleration where available
- Checkpoint support for fast mounting
The eCos implementation has been extensively exercised with automated functional
and intensive long-run stress tests run on a range of platforms and NAND devices.
This includes the use of synthetic NAND hardware with high rate bad block injection
and varying system reset intervals. Stress testing includes randomly changing loading of
file and directory operations, writes with payload verification,
multi-threaded concurrent access, and file system boundary condition exercising.
Specifications
Theoretical file system limits:
- Maximum file system size: 4 terabytes
- Maximum file size: 2 gigabytes
- Maximum number of files: 231
- Maximum filename length: 254 bytes
In practice these limits are dependent on the NAND page size and overall device capacity,
as well as available RAM for file system metadata.
Licensing
Under a licensing agreement with Aleph One, eCosCentric is the exclusive licensor of the YAFFS file system for eCos.
YAFFS is freely available under a GPL license, and for companies that wish to avoid the strictures
of the full GPL license, an alternative commercial license is available through eCosCentric.
Aleph One remains the commercial licensor for all other systems.
A commercial license enables companies to ship eCos-based products that incorporate YAFFS
along with their own proprietary application and any licensed middleware.
The GPL licensed version requires that all software included in your product
linked with eCos and YAFFS is also licensed under the GPL. This in turn requires you to
make the source code of the software freely available.
These requirements may not be acceptable to many companies wishing to use YAFFS, especially
the requirement to open source the application itself. It may also not be possible to
comply with depending on the licensing of other software components used, such as third
party middleware. The commercial license removes these limitations.
The commercial license is available on a per-product, product family or company buyout basis.
It does not require royalty payments or any auditing of product shipments. Other than the
license itself there is no technical difference between the GPL and commercially licensed
versions.
Downloading YAFFS for eCos
eCosCentric has made the GPL licensed version of YAFFS available as a
free download,
along with the necessary NAND library and device drivers.
These are supplied as an installable and configurable eCos EPK modules.
Full source code and documentation are also included.
If you decide to use YAFFS within a product you should consider the purchase of the
commercial licensed version as describe above.
For additional technical details please read the
YAFFS file system
and NAND library
chapters of the eCosPro online documentation, and consult Aleph One's YAFFS resource website.
For questions regarding the YAFFS package including licensing, technical or commercial issues, please
contact eCosCentric
for a detailed discussion.
|