Kconfig 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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
  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
  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
  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 RT_DFS_ELM_USE_EXFAT"
  124. default n
  125. depends on RT_DFS_ELM_USE_LFN >= 1
  126. endmenu
  127. endif
  128. config RT_USING_DFS_DEVFS
  129. bool "Using devfs for device objects"
  130. default y
  131. config RT_USING_DFS_ROMFS
  132. bool "Enable ReadOnly file system on flash"
  133. default n
  134. config RT_USING_DFS_ROMFS_USER_ROOT
  135. bool "Use user's romfs root"
  136. depends on RT_USING_DFS_ROMFS
  137. default n
  138. if RT_USING_SMART
  139. config RT_USING_DFS_PTYFS
  140. bool "Using Pseudo-Teletype Filesystem (UNIX98 PTY)"
  141. depends on RT_USING_DFS_DEVFS
  142. default y
  143. endif
  144. config RT_USING_DFS_CROMFS
  145. bool "Enable ReadOnly compressed file system on flash"
  146. default n
  147. # select PKG_USING_ZLIB
  148. if RT_USING_DFS_V1
  149. config RT_USING_DFS_RAMFS
  150. bool "Enable RAM file system"
  151. select RT_USING_MEMHEAP
  152. default n
  153. endif
  154. config RT_USING_DFS_TMPFS
  155. bool "Enable TMP file system"
  156. default n
  157. config RT_USING_DFS_MQUEUE
  158. bool "Enable MQUEUE file system"
  159. select RT_USING_DEV_BUS
  160. default n
  161. if RT_USING_DFS_V1
  162. config RT_USING_DFS_NFS
  163. bool "Using NFS v3 client file system"
  164. depends on RT_USING_LWIP
  165. default n
  166. if RT_USING_DFS_NFS
  167. config RT_NFS_HOST_EXPORT
  168. string "NFSv3 host export"
  169. default "192.168.1.5:/"
  170. endif
  171. endif
  172. if RT_USING_DFS_V2
  173. config RT_USING_PAGECACHE
  174. bool "Enable page cache"
  175. default y if RT_USING_SMART
  176. depends on RT_USING_SMART
  177. if RT_USING_PAGECACHE
  178. menu "page cache config"
  179. config RT_PAGECACHE_COUNT
  180. int "page cache max total pages."
  181. default 4096
  182. config RT_PAGECACHE_ASPACE_COUNT
  183. int "aspace max active pages."
  184. default 1024
  185. config RT_PAGECACHE_PRELOAD
  186. int "max pre load pages."
  187. default 4
  188. config RT_PAGECACHE_HASH_NR
  189. int "page cache hash size."
  190. default 1024
  191. config RT_PAGECACHE_GC_WORK_LEVEL
  192. int "page cache gc work trigger min percentage, default 90%."
  193. default 90
  194. config RT_PAGECACHE_GC_STOP_LEVEL
  195. int "page cache gc to min percentage, default 70%."
  196. default 70
  197. endmenu
  198. endif
  199. endif
  200. endif
  201. endmenu