YAFFS2 experimental support available

Sébastien Bourdeauducq sebastien at milkymist.org
Fri Dec 3 15:48:28 UTC 2010


Hi,

I just got to work my YAFFS2 port (flash filesystem):
https://github.com/lekernel/rtems-yaffs2

A few bits are still missing but it is now in an usable state.

It does not use the bdbuf layer and requires a simple flash driver with the 
following:
* read/write operations to read and program the flash (the "program" operation 
does not erase, and can only set bits from 1 to 0 in the flash array)
* ioctls to retrieve the block size, the flash partition size and to erase a 
block (see milkymist_flash.h in https://github.com/fallen/rtems-milkymist for 
definitions - right now it's an ad hoc driver, but might serve as a base for a 
generic "MTD" layer for RTEMS)

How to use:
* git clone git://github.com/lekernel/rtems-yaffs2.git
* cd rtems-yaffs2/direct/rtems
* make && make install (with the RTEMS_MAKEFILE_PATH environment variable 
set)
* use CONFIGURE_HAS_OWN_FILESYSTEM_TABLE and define the filesystem table 
like in this example:
const rtems_filesystem_table_t rtems_filesystem_table[] = {
	{ RTEMS_FILESYSTEM_TYPE_IMFS, IMFS_initialize },
	{ RTEMS_FILESYSTEM_TYPE_DOSFS, rtems_dosfs_initialize },
	{ RTEMS_FILESYSTEM_TYPE_NFS, rtems_nfsfs_initialize },
	{ "yaffs", yaffs_initialize },
	{ NULL, NULL }
};
You need to #include <yaffs.h> for the yaffs_initialize definition.
* link your application with -lyaffs2
* mount the flash device as yaffs

For a real-life application using it, see:
http://www.milkymist.org/wiki/index.php?title=Flickernoise_build_instructions

YAFFS2 is plain GPL (no linking exception) - so it will remain separately 
distributed and not included in the RTEMS tree.

Good luck,

S.



More information about the users mailing list