瀏覽代碼

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
goprife@gmail.com 13 年之前
父節點
當前提交
5f55c8cb50
共有 3 個文件被更改,包括 809 次插入23 次删除
  1. 26 23
      components/dfs/SConscript
  2. 41 0
      components/dfs/filesystems/yaffs2/readme.txt
  3. 742 0
      components/dfs/filesystems/yaffs2/yaffs.diff

+ 26 - 23
components/dfs/SConscript

@@ -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'):

+ 41 - 0
components/dfs/filesystems/yaffs2/readme.txt

@@ -0,0 +1,41 @@
+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 !

文件差異過大導致無法顯示
+ 742 - 0
components/dfs/filesystems/yaffs2/yaffs.diff


部分文件因文件數量過多而無法顯示