mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-06-24 00:21:05 +08:00
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
This commit is contained in:
+26
-23
@@ -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'):
|
||||
|
||||
@@ -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 !
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user