yaffs2官网-源码下载
yaffs2.tar.gz
luther@gliethttp:~$ tar zvxf cvs-root.tar.gz
luther@gliethttp:~/cvs/yaffs2$ vim README-linux-patch
可以看到向linux内核源码追加yaffs2的方法,我们将仿照该命令为linux-2.6.30.4内核源码安装yaffs2文件系统.
./patch-ker.sh c /usr/src/linux
luther@gliethttp:~/cvs/yaffs2$ ./patch-ker.sh c /luther/linux-2.6.30.4/
luther@gliethttp:~/cvs/yaffs2$ vim /luther/linux-2.6.30.4/fs/Kconfig
luther@gliethttp:~/cvs/yaffs2$ vim /luther/linux-2.6.30.4/fs/Makefile
可以看到都已经自动添加了yaffs2支持和编译.
luther@gliethttp:~/cvs/yaffs2$ ls /luther/linux-2.6.30.4/fs/yaffs2/
devextras.h yaffs_guts.h yaffs_packedtags1.c
Kconfig yaffsinterface.h yaffs_packedtags1.h
Makefile yaffs_mtdif1.c yaffs_packedtags2.c
moduleconfig.h yaffs_mtdif1.h yaffs_packedtags2.h
yaffs_checkptrw.c yaffs_mtdif2.c yaffs_qsort.c
yaffs_checkptrw.h yaffs_mtdif2.h yaffs_qsort.h
yaffs_ecc.c yaffs_mtdif.c yaffs_tagscompat.c
yaffs_ecc.h yaffs_mtdif.h yaffs_tagscompat.h
yaffs_fs.c yaffs_nand.c yaffs_tagsvalidity.c
yaffs_getblockinfo.h yaffs_nandemul2k.h yaffs_tagsvalidity.h
yaffs_guts.c yaffs_nand.h yportenv.h
luther@gliethttp:/luther/linux-2.6.30.4$ make menuconfig
就可以看到
File systems --->
[*] Miscellaneous filesystems --->
< > YAFFS2 file system support (NEW)
注意:yaffs2文件系统依赖于MTD_BLOCK,所以需要先选上
Device Drivers -> Memory Technology Device (MTD) support -> Caching block device access to MTD devices
而MTD_CHAR对应的选项为:
Device Drivers -> Memory Technology Device (MTD) support -> Direct char device access to MTD devices