1menu "DFS: device virtual file system"
2
3config RT_USING_DFS
4    bool "DFS: device virtual file system"
5    select RT_USING_MUTEX
6    default y
7    help
8        The device file system is a light weight virtual file system.
9
10if RT_USING_DFS
11    config DFS_USING_POSIX
12        bool "Using posix-like functions, open/read/write/close"
13        default y
14
15    config DFS_USING_WORKDIR
16        bool "Using working directory"
17        default y
18
19if RT_USING_DFS_V1
20    config RT_USING_DFS_MNTTABLE
21        bool "Using mount table for file system"
22        default n
23        help
24            User can use mount table for automatically mount, for example:
25                const struct dfs_mount_tbl mount_table[] =
26                {
27                    {"flash0", "/", "elm", 0, 0},
28                    {0}
29                };
30            The mount_table must be terminated with NULL.
31endif
32
33    config DFS_FD_MAX
34        int "The maximal number of opened files"
35        default 16
36
37    choice
38        prompt "The version of DFS"
39        default RT_USING_DFS_V1
40        default RT_USING_DFS_V2 if RT_USING_SMART
41
42        config RT_USING_DFS_V1
43            bool "DFS v1.0"
44            depends on !RT_USING_SMART
45
46        config RT_USING_DFS_V2
47            bool "DFS v2.0"
48            select RT_USING_DEVICE_OPS
49    endchoice
50
51if RT_USING_DFS_V1
52    config DFS_FILESYSTEMS_MAX
53        int "The maximal number of mounted file system"
54        default 4
55
56    config DFS_FILESYSTEM_TYPES_MAX
57        int "The maximal number of file system type"
58        default 4
59endif
60
61    config RT_USING_DFS_ELMFAT
62        bool "Enable elm-chan fatfs"
63        default n
64        help
65            FatFs is a generic FAT/exFAT file system module for small embedded systems.
66
67    if RT_USING_DFS_ELMFAT
68        menu "elm-chan's FatFs, Generic FAT Filesystem Module"
69        config RT_DFS_ELM_CODE_PAGE
70            int "OEM code page"
71            default 437
72
73        config RT_DFS_ELM_WORD_ACCESS
74            bool "Using RT_DFS_ELM_WORD_ACCESS"
75            default y
76
77        choice
78            prompt "Support long file name"
79            default RT_DFS_ELM_USE_LFN_3
80
81            config RT_DFS_ELM_USE_LFN_0
82                bool "0: LFN disable"
83
84            config RT_DFS_ELM_USE_LFN_1
85                bool "1: LFN with static LFN working buffer"
86
87            config RT_DFS_ELM_USE_LFN_2
88                bool "2: LFN with dynamic LFN working buffer on the stack"
89
90            config RT_DFS_ELM_USE_LFN_3
91                bool "3: LFN with dynamic LFN working buffer on the heap"
92        endchoice
93
94        config RT_DFS_ELM_USE_LFN
95            int
96            default 0 if RT_DFS_ELM_USE_LFN_0
97            default 1 if RT_DFS_ELM_USE_LFN_1
98            default 2 if RT_DFS_ELM_USE_LFN_2
99            default 3 if RT_DFS_ELM_USE_LFN_3
100
101        choice
102            prompt "Support unicode for long file name"
103            default RT_DFS_ELM_LFN_UNICODE_0
104
105            config RT_DFS_ELM_LFN_UNICODE_0
106                bool "0: ANSI/OEM in current CP (TCHAR = char)"
107
108            config RT_DFS_ELM_LFN_UNICODE_1
109                bool "1: Unicode in UTF-16 (TCHAR = WCHAR)"
110
111            config RT_DFS_ELM_LFN_UNICODE_2
112                bool "2: Unicode in UTF-8 (TCHAR = char)"
113
114            config RT_DFS_ELM_LFN_UNICODE_3
115                bool "3: Unicode in UTF-32 (TCHAR = DWORD)"
116        endchoice
117
118        config RT_DFS_ELM_LFN_UNICODE
119            int
120            default 0 if RT_DFS_ELM_LFN_UNICODE_0
121            default 1 if RT_DFS_ELM_LFN_UNICODE_1
122            default 2 if RT_DFS_ELM_LFN_UNICODE_2
123            default 3 if RT_DFS_ELM_LFN_UNICODE_3
124
125        config RT_DFS_ELM_MAX_LFN
126            int "Maximal size of file name length"
127            range 12 255
128            default 255
129
130        config RT_DFS_ELM_DRIVES
131            int "Number of volumes (logical drives) to be used."
132            default 2
133
134        config RT_DFS_ELM_MAX_SECTOR_SIZE
135            int "Maximum sector size to be handled."
136            default 512
137            help
138                If you use some spi nor flash for fatfs, please set this the erase sector size, for example 4096.
139
140        config RT_DFS_ELM_USE_ERASE
141            bool "Enable sector erase feature"
142            default n
143
144        config RT_DFS_ELM_REENTRANT
145            bool "Enable the reentrancy (thread safe) of the FatFs module"
146            default y
147
148        config RT_DFS_ELM_MUTEX_TIMEOUT
149            int "Timeout of thread-safe protection mutex"
150            range 0 1000000
151            default 3000
152            depends on RT_DFS_ELM_REENTRANT
153
154        config RT_DFS_ELM_USE_EXFAT
155            bool "Enable RT_DFS_ELM_USE_EXFAT"
156            default n
157            depends on RT_DFS_ELM_USE_LFN >= 1
158        endmenu
159    endif
160
161    config RT_USING_DFS_DEVFS
162        bool "Using devfs for device objects"
163        default y
164
165if RT_USING_DFS_V1
166    config RT_USING_DFS_ISO9660
167        bool "Using ISO9660 filesystem"
168        depends on RT_USING_MEMHEAP
169        default n
170endif
171
172    menuconfig RT_USING_DFS_ROMFS
173        bool "Enable ReadOnly file system on flash"
174        default n
175
176    if RT_USING_DFS_ROMFS
177        config RT_USING_DFS_ROMFS_USER_ROOT
178            bool "Use user's romfs root"
179            depends on RT_USING_DFS_V1
180            default n
181    endif
182
183if RT_USING_SMART
184    config RT_USING_DFS_PTYFS
185        bool "Using Pseudo-Teletype Filesystem (UNIX98 PTY)"
186        depends on RT_USING_DFS_DEVFS
187        default y
188    config RT_USING_DFS_PROCFS
189        bool "Enable proc file system"
190        default y
191endif
192
193    config RT_USING_DFS_CROMFS
194        bool "Enable ReadOnly compressed file system on flash"
195        default n
196        # select PKG_USING_ZLIB
197
198if RT_USING_DFS_V1
199    config RT_USING_DFS_RAMFS
200        bool "Enable RAM file system"
201        select RT_USING_MEMHEAP
202        default n
203endif
204
205    config RT_USING_DFS_TMPFS
206        bool "Enable TMP file system"
207        default y if RT_USING_SMART
208        default n
209
210    config RT_USING_DFS_MQUEUE
211        bool "Enable MQUEUE file system"
212        select RT_USING_DEV_BUS
213        default y if RT_USING_SMART
214        default n
215
216if RT_USING_DFS_V1
217    config RT_USING_DFS_NFS
218        bool "Using NFS v3 client file system"
219        depends on RT_USING_LWIP
220        default n
221
222    if RT_USING_DFS_NFS
223        config RT_NFS_HOST_EXPORT
224            string "NFSv3 host export"
225            default "192.168.1.5:/"
226    endif
227endif
228
229if RT_USING_DFS_V2
230    config RT_USING_PAGECACHE
231        bool "Enable page cache"
232        default y if RT_USING_SMART
233        depends on RT_USING_SMART
234
235    if RT_USING_PAGECACHE
236        menu "page cache config"
237        config RT_PAGECACHE_COUNT
238            int "page cache max total pages."
239            default 4096
240
241        config RT_PAGECACHE_ASPACE_COUNT
242            int "aspace max active pages."
243            default 1024
244
245        config RT_PAGECACHE_PRELOAD
246            int "max pre load pages."
247            default 4
248
249        config RT_PAGECACHE_HASH_NR
250            int "page cache hash size."
251            default 1024
252
253        config RT_PAGECACHE_GC_WORK_LEVEL
254            int "page cache gc work trigger min percentage, default 90%."
255            default 90
256
257        config RT_PAGECACHE_GC_STOP_LEVEL
258            int "page cache gc to min percentage, default 70%."
259            default 70
260        endmenu
261    endif
262endif
263
264endif
265
266endmenu
267