2009-10-20 17:18:45 +08:00
|
|
|
Import('RTT_ROOT')
|
2010-11-20 20:31:00 +08:00
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
2009-10-20 17:18:45 +08:00
|
|
|
|
2010-11-20 20:31:00 +08:00
|
|
|
# The set of source files associated with this SConscript file.
|
2009-10-20 17:18:45 +08:00
|
|
|
dfs = Split("""
|
2010-07-19 00:15:53 +08:00
|
|
|
src/dfs.c
|
2009-10-20 17:18:45 +08:00
|
|
|
src/dfs_fs.c
|
2010-07-19 00:15:53 +08:00
|
|
|
src/dfs_file.c
|
2009-10-20 17:18:45 +08:00
|
|
|
src/dfs_posix.c
|
|
|
|
""")
|
|
|
|
|
2009-10-26 12:33:18 +08:00
|
|
|
# DFS-ELMFAT options
|
|
|
|
elmfat = Split("""
|
|
|
|
filesystems/elmfat/dfs_elm.c
|
|
|
|
filesystems/elmfat/ff.c
|
|
|
|
""")
|
|
|
|
|
2010-09-02 16:46:46 +08:00
|
|
|
# DFS-ROMFS options
|
|
|
|
romfs = Split("""
|
|
|
|
filesystems/romfs/dfs_romfs.c
|
|
|
|
""")
|
2011-08-05 21:02:23 +08:00
|
|
|
if not GetDepend('DFS_ROMFS_ROOT'):
|
2011-08-06 19:35:48 +08:00
|
|
|
romfs = romfs + Split('filesystems/romfs/romfs.c')
|
2010-09-02 16:46:46 +08:00
|
|
|
|
2010-10-22 18:15:50 +08:00
|
|
|
# DFS-DeviceFS options
|
|
|
|
devfs = Split("""
|
|
|
|
filesystems/devfs/devfs.c
|
|
|
|
filesystems/devfs/console.c
|
|
|
|
""")
|
|
|
|
|
2009-10-20 17:18:45 +08:00
|
|
|
# DFS-YAFFS2 options
|
|
|
|
yaffs2_main = Split("""
|
|
|
|
filesystems/yaffs2/direct/yaffscfg.c
|
|
|
|
filesystems/yaffs2/direct/yaffs_fileem.c
|
|
|
|
filesystems/yaffs2/direct/yaffsfs.c
|
|
|
|
filesystems/yaffs2/direct/dfs_yaffs2.c
|
|
|
|
""")
|
|
|
|
|
|
|
|
yaffs2_comm = Split("""
|
|
|
|
filesystems/yaffs2/yaffs_ecc.c
|
|
|
|
filesystems/yaffs2/yaffs_guts.c
|
|
|
|
filesystems/yaffs2/yaffs_packedtags1.c
|
|
|
|
filesystems/yaffs2/yaffs_tagscompat.c
|
|
|
|
filesystems/yaffs2/yaffs_packedtags2.c
|
|
|
|
filesystems/yaffs2/yaffs_tagsvalidity.c
|
|
|
|
filesystems/yaffs2/yaffs_nand.c
|
|
|
|
filesystems/yaffs2/yaffs_checkptrw.c
|
|
|
|
filesystems/yaffs2/yaffs_qsort.c
|
|
|
|
""")
|
|
|
|
|
2010-05-22 22:57:51 +08:00
|
|
|
nfs = Split('''
|
|
|
|
filesystems/nfs/mount_clnt.c
|
|
|
|
filesystems/nfs/mount_xdr.c
|
|
|
|
filesystems/nfs/nfs_clnt.c
|
|
|
|
filesystems/nfs/nfs_xdr.c
|
|
|
|
filesystems/nfs/dfs_nfs.c
|
|
|
|
filesystems/nfs/rpc/auth_none.c
|
|
|
|
filesystems/nfs/rpc/clnt_generic.c
|
|
|
|
filesystems/nfs/rpc/clnt_udp.c
|
|
|
|
filesystems/nfs/rpc/rpc_prot.c
|
|
|
|
filesystems/nfs/rpc/pmap.c
|
|
|
|
filesystems/nfs/rpc/xdr.c
|
|
|
|
filesystems/nfs/rpc/xdr_mem.c
|
|
|
|
''')
|
|
|
|
|
2011-01-18 18:02:13 +08:00
|
|
|
uffs = Split('''
|
|
|
|
filesystems/uffs/src/uffs/uffs_badblock.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_blockinfo.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_buf.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_debug.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_device.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_ecc.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_fd.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_find.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_flash.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_fs.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_init.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_mem.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_mtb.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_pool.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_public.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_tree.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_utils.c
|
|
|
|
filesystems/uffs/src/uffs/uffs_version.c
|
|
|
|
filesystems/uffs/dfs_uffs.c
|
|
|
|
''')
|
|
|
|
|
|
|
|
others = '''
|
|
|
|
filesystems/uffs/dfs_nand_if.c
|
|
|
|
filesystems/uffs/uffs_ext.c
|
|
|
|
filesystems/uffs/flash/k9f2g08.c
|
|
|
|
filesystems/uffs/flash/nand_ids.c
|
|
|
|
'''
|
|
|
|
|
2012-01-14 02:45:44 +08:00
|
|
|
jffs2 = Split('''
|
2012-01-29 16:23:14 +08:00
|
|
|
filesystems/jffs2/dfs_jffs2.c
|
|
|
|
filesystems/jffs2/porting.c
|
|
|
|
filesystems/jffs2/cyg/crc/crc16.c
|
|
|
|
filesystems/jffs2/cyg/crc/crc32.c
|
|
|
|
filesystems/jffs2/cyg/crc/posix_crc.c
|
|
|
|
filesystems/jffs2/kernel/rbtree.c
|
|
|
|
filesystems/jffs2/src/build.c
|
|
|
|
filesystems/jffs2/src/compr.c
|
|
|
|
filesystems/jffs2/src/compr_rtime.c
|
|
|
|
filesystems/jffs2/src/compr_rubin.c
|
|
|
|
filesystems/jffs2/src/debug.c
|
|
|
|
filesystems/jffs2/src/dir-ecos.c
|
|
|
|
filesystems/jffs2/src/erase.c
|
|
|
|
filesystems/jffs2/src/flashio.c
|
|
|
|
filesystems/jffs2/src/fs-ecos.c
|
|
|
|
filesystems/jffs2/src/gc.c
|
|
|
|
filesystems/jffs2/src/malloc-ecos.c
|
|
|
|
filesystems/jffs2/src/nodelist.c
|
|
|
|
filesystems/jffs2/src/nodemgmt.c
|
|
|
|
filesystems/jffs2/src/read.c
|
|
|
|
filesystems/jffs2/src/readinode.c
|
|
|
|
filesystems/jffs2/src/scan.c
|
|
|
|
filesystems/jffs2/src/write.c
|
2012-01-14 02:45:44 +08:00
|
|
|
''')
|
|
|
|
|
2009-10-20 17:18:45 +08:00
|
|
|
src_local = dfs
|
2012-01-29 16:23:14 +08:00
|
|
|
CPPDEFINES = []
|
|
|
|
|
2010-04-18 23:27:13 +08:00
|
|
|
# The set of source files associated with this SConscript file.
|
|
|
|
path = [RTT_ROOT + '/components/dfs', RTT_ROOT + '/components/dfs/include']
|
2009-10-20 17:18:45 +08:00
|
|
|
|
2010-11-20 20:31:00 +08:00
|
|
|
if GetDepend('RT_USING_DFS_YAFFS2'):
|
2009-10-20 17:18:45 +08:00
|
|
|
src_local = src_local + yaffs2_main + yaffs2_comm
|
2012-01-29 16:23:14 +08:00
|
|
|
path = path + [RTT_ROOT + '/components/dfs/filesystems/yaffs2', \
|
|
|
|
RTT_ROOT + '/components/dfs/filesystems/yaffs2/direct']
|
2009-10-20 17:18:45 +08:00
|
|
|
|
2010-11-20 20:31:00 +08:00
|
|
|
if GetDepend('RT_USING_DFS_ELMFAT'):
|
|
|
|
if GetDepend('RT_DFS_ELM_USE_LFN'):
|
|
|
|
elmfat += ['filesystems/elmfat/option/cc936.c']
|
2009-10-26 12:33:18 +08:00
|
|
|
src_local = src_local + elmfat
|
2010-04-22 10:27:27 +08:00
|
|
|
|
2010-11-20 20:31:00 +08:00
|
|
|
if GetDepend(['RT_USING_DFS_NFS', 'RT_USING_LWIP']):
|
2010-05-22 22:57:51 +08:00
|
|
|
src_local = src_local + nfs
|
|
|
|
path = path + [RTT_ROOT + '/components/dfs/filesystems/nfs']
|
|
|
|
|
2010-11-20 20:31:00 +08:00
|
|
|
if GetDepend('RT_USING_DFS_ROMFS'):
|
2010-09-02 16:46:46 +08:00
|
|
|
src_local = src_local + romfs
|
|
|
|
path = path + [RTT_ROOT + '/components/dfs/filesystems/romfs']
|
|
|
|
|
2010-11-20 20:31:00 +08:00
|
|
|
if GetDepend('RT_USING_DFS_DEVFS'):
|
2010-10-22 18:15:50 +08:00
|
|
|
src_local = src_local + devfs
|
|
|
|
path = path + [RTT_ROOT + '/components/dfs/filesystems/devfs']
|
|
|
|
|
2011-01-21 18:21:26 +08:00
|
|
|
if GetDepend('RT_USING_DFS_UFFS'):
|
2011-01-18 18:02:13 +08:00
|
|
|
src_local = src_local + uffs
|
2012-01-29 16:23:14 +08:00
|
|
|
path = path + [RTT_ROOT + '/components/dfs/filesystems/uffs/src/inc', \
|
|
|
|
RTT_ROOT + '/components/dfs/filesystems/uffs', \
|
|
|
|
RTT_ROOT + '/components/dfs/filesystems/uffs/flash']
|
2011-01-18 18:02:13 +08:00
|
|
|
|
2012-01-14 02:45:44 +08:00
|
|
|
if GetDepend('RT_USING_DFS_JFFS2'):
|
|
|
|
src_local = src_local + jffs2
|
2012-01-29 16:23:14 +08:00
|
|
|
path = path + [RTT_ROOT + '/components/dfs/filesystems/jffs2/src', \
|
|
|
|
RTT_ROOT + '/components/dfs/filesystems/jffs2/kernel', \
|
|
|
|
RTT_ROOT + '/components/dfs/filesystems/jffs2/include', \
|
|
|
|
RTT_ROOT + '/components/dfs/filesystems/jffs2']
|
|
|
|
CPPDEFINES = CPPDEFINES + ['__ECOS']
|
|
|
|
|
|
|
|
group = DefineGroup('Filesystem', src_local, depend = ['RT_USING_DFS'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
2009-10-20 17:18:45 +08:00
|
|
|
|
2010-11-20 20:31:00 +08:00
|
|
|
Return('group')
|