提交 5f55c8cb 编写于 作者: G goprife@gmail.com

add yaffs code and modify dfs/SConscript for yaffs

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2073 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 5969fffc
......@@ -32,28 +32,30 @@ filesystems/devfs/console.c
# DFS-YAFFS2 options
yaffs2_src = Split("""
filesystems/yaffs2/dfs_yaffs2.c
filesystems/yaffs2/yaffs_nand_config.c
filesystems/yaffs2/yaffs_osglue.c
filesystems/yaffs2/yaffs_nandcfg.c
filesystems/yaffs2/yaffs/yaffs_allocator.c
filesystems/yaffs2/yaffs/yaffs_bitmap.c
filesystems/yaffs2/yaffs/yaffs_checkptrw.c
filesystems/yaffs2/yaffs/yaffs_ecc.c
filesystems/yaffs2/yaffs/yaffs_guts.c
filesystems/yaffs2/yaffs/yaffs_nameval.c
filesystems/yaffs2/yaffs/yaffs_nand.c
filesystems/yaffs2/yaffs/yaffs_packedtags1.c
filesystems/yaffs2/yaffs/yaffs_packedtags2.c
filesystems/yaffs2/yaffs/yaffs_summary.c
filesystems/yaffs2/yaffs/yaffs_tagscompat.c
filesystems/yaffs2/yaffs/yaffs_verify.c
filesystems/yaffs2/yaffs/yaffs_yaffs1.c
filesystems/yaffs2/yaffs/yaffs_yaffs2.c
filesystems/yaffs2/yaffs/direct/yaffs_attribs.c
filesystems/yaffs2/yaffs/direct/yaffs_hweight.c
filesystems/yaffs2/yaffs/direct/yaffs_nandif.c
filesystems/yaffs2/yaffs/direct/yaffs_qsort.c
filesystems/yaffs2/yaffs/direct/yaffsfs.c
filesystems/yaffs2/yaffs_allocator.c
filesystems/yaffs2/yaffs_bitmap.c
filesystems/yaffs2/yaffs_checkptrw.c
filesystems/yaffs2/yaffs_ecc.c
filesystems/yaffs2/yaffs_guts.c
filesystems/yaffs2/yaffs_nameval.c
filesystems/yaffs2/yaffs_nand.c
filesystems/yaffs2/yaffs_packedtags1.c
filesystems/yaffs2/yaffs_packedtags2.c
filesystems/yaffs2/yaffs_summary.c
filesystems/yaffs2/yaffs_tagscompat.c
filesystems/yaffs2/yaffs_verify.c
filesystems/yaffs2/yaffs_yaffs1.c
filesystems/yaffs2/yaffs_yaffs2.c
filesystems/yaffs2/yaffs_attribs.c
filesystems/yaffs2/yaffsfs.c
filesystems/yaffs2/yaffs_hweight.c
filesystems/yaffs2/yaffs_nandif.c
filesystems/yaffs2/yaffs_qsort.c
""")
nfs = Split('''
......@@ -143,9 +145,10 @@ CPPDEFINES = []
# The set of source files associated with this SConscript file.
path = [RTT_ROOT + '/components/dfs', RTT_ROOT + '/components/dfs/include']
#if GetDepend('RT_USING_DFS_YAFFS2'):
# src_local = src_local + yaffs2_src
# path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2']
if GetDepend('RT_USING_DFS_YAFFS2'):
src_local = src_local + yaffs2_src
path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2/yaffs', \
RTT_ROOT + '/components/dfs/filesystems/yaffs2/yaffs/direct' ]
if GetDepend('RT_USING_DFS_ELMFAT'):
if GetDepend('RT_DFS_ELM_USE_LFN'):
......
how to use yaffs under rt-thread.
There are three steps.
1. get yaffs tarball from official repo.
the repo of official repo is here.
http://www.aleph1.co.uk/gitweb?p=yaffs2.git;a=summary
then you should find the 2011-6-28's snapshot, download the tarball
http://www.aleph1.co.uk/gitweb?p=yaffs2.git;a=snapshot;h=2df51cdb98e799c4d10b4cc7dd7e8858aa79e7d8;sf=tgz
decompress the yaffs.tar.gz to rt-thread\components\dfs\filesystems\yaffs2\yaffs
2. patch yaffs.diff
open an terminal.
(1) on windows
open cmd command prompt, then use [cd] command to come current path
for example
F:\Project\svn\rt-thread\components\dfs\filesystems\yaffs2>
then type command
patch -p1 < yaffs.diff
you will get some log information as followings
F:\Project\svn\rt-thread\components\dfs\filesystems\yaffs2>patch -p1 < yaffs.diff
patching file `dfs_yaffs2.c'
patching file `yaffs/direct/yaffs_list.h'
patching file `yaffs/direct/yaffs_nandif.c'
patching file `yaffs/direct/ydirectenv.h'
patching file `yaffs/direct/yportenv.h'
patching file `yaffs_nandcfg.c'
patching file `yaffs_osglue.c'
now you can delete yaffs.diff
(2) on linux
Help yourself. Since you have use linux as your os, I believe in you.
3.add nand driver and compile
In order to use yaffs, you should provide a nand driver which is needed
by yaffs. There is an example file in rt-thread\components\dfs\filesystems\uffs\nand.
you should modify yaffs_nandcfg.c according to your nand driver.
then you can use scons or IDE like MDK or IAR to compile.
enjoy !
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册