Yaffs for eCos
Yaffs is a filesystem for NAND flash. It is log-structured, offering wear-levelling, bad block management, error correcting codes and checkpoint support for fast mounting. Yaffs works in conjunction with eCosCentric's NAND layer and device drivers. You can find a detailed overview of Yaffs and the underlying NAND layer on the Yaffs middleware page.
Yaffs is available for free under the GNU GPL (General Public License). This is not the same as the GPL-with-exception license used in general for eCos. If you distribute an application which makes use of the GPL version of Yaffs, you are (broadly speaking) obliged to licence your application and all other parts of the system under the GPL, and to make all the source code available. If you are unwilling or unable to do this you must not use the GPL version of Yaffs; contact eCosCentric to obtain Yaffs under a commercial license.
Source Code Access
Support for Yaffs comes in two parts:
- Yaffs itself
- NAND support, comprising:
- NAND generic support
- A driver for the specific NAND part in use
- A patch to the HAL on the target platform that provides access to the NAND part and links it all together
eCosPro customers already receive the latest, fully-validated version of NAND support as part of their download. They should therefore ignore the NAND support section below.
The GPL licensed version of Yaffs is available as an eCos add-on package that can be used with both eCosPro and the public eCos repository.
The current stable version of Yaffs is available as a standard eCos installation package (EPK). For details of changes, refer to the Changelog within.
For a commercially licensed Yaffs package that is not subject to the GPL, contact eCosCentric.
Users of the public eCos repository must also download and install the NAND layer support.
The recommended way to obtain the NAND package is by downloading and installing the latest EPK file.
- HAL patch for ea2468 (Embedded Artists EA_LPC2468)
- HAL patch for stm3210e_eval (ST Microelectronics STM3210E)
patch -p2 -d /path/to/your/ecos/packages < patch
Alternatively, a Mercurial repository is available that consists of the eCos public sources with the NAND support fully patched into it http://hg-pub.ecoscentric.com/nand-ecoscentric/. This can be browsed and cloned in the usual way.
Installing and Configuring
Public eCos repository users should first install the relevant HAL patch and NAND EPK before installing the Yaffs EPK. eCosPro users need only install the Yaffs EPK. To install a downloaded EPK, use the eCos Package Administration Tool. See the Package Repository documentation for details.
To add Yaffs support to a default eCos configuration, use ecosconfig or configtool to add the CYGPKG_IO_FILEIO, CYGPKG_FS_Yaffs and CYGPKG_IO_NAND packages. Some configurations will require further packages to be added to satisfy the dependencies. A Yaffs filesystem can then be mounted and accessed like any other on the system.
For more details, refer to the Yaffs package documentation, filesystem layer documentation and NAND library documentation.