Kconfig 8.4 KB

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