KConfig 4.8 KB
Newer Older
B
bernard 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
menu "Device virtual file system"

config RT_USING_DFS
    bool "Using device virtual file system"
    default y
    help
        The device file system is a light weight virtual file system.

if RT_USING_DFS
    config DFS_USING_WORKDIR
        bool "Using working directory"
        default y

    config DFS_FILESYSTEMS_MAX
        int "The maximal number of mounted file system"
        default 2
    
    config DFS_FD_MAX
        int "The maximal number of opened files"
        default 4
    
    config RT_USING_DFS_ELMFAT
        bool "Enable elm-chan fatfs"
        default y
        help
            FatFs is a generic FAT/exFAT file system module for small embedded systems.
B
bernard 已提交
27

B
bernard 已提交
28
    if RT_USING_DFS_ELMFAT
B
bernard 已提交
29
        menu "elm-chan's FatFs, Generic FAT Filesystem Module"
B
bernard 已提交
30 31 32
        config RT_DFS_ELM_CODE_PAGE
            int "OEM code page"
            default 437
B
bernard 已提交
33 34 35 36 37

        config RT_DFS_ELM_WORD_ACCESS
            bool "Using RT_DFS_ELM_WORD_ACCESS"
            default y   

38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
        choice 
            prompt "Support long file name"
            default RT_DFS_ELM_USE_LFN_0

            config RT_DFS_ELM_USE_LFN_0
                bool "0: LFN disable"

            config RT_DFS_ELM_USE_LFN_1
                bool "1: LFN with static LFN working buffer"

            config RT_DFS_ELM_USE_LFN_2
                bool "2: LFN with dynamic LFN working buffer on the stack"
            
            config RT_DFS_ELM_USE_LFN_3
                bool "3: LFN with dynamic LFN working buffer on the heap"
        endchoice
        
55
        config RT_DFS_ELM_USE_LFN
56 57 58 59 60
            int
            default 0 if RT_DFS_ELM_USE_LFN_0
            default 1 if RT_DFS_ELM_USE_LFN_1
            default 2 if RT_DFS_ELM_USE_LFN_2
            default 3 if RT_DFS_ELM_USE_LFN_3
61
        
B
bernard 已提交
62 63
        config RT_DFS_ELM_MAX_LFN
            int "Maximal size of file name length"
B
bernard 已提交
64 65 66
            range 12 255
            default 255

B
bernard 已提交
67 68 69
        config RT_DFS_ELM_DRIVES
            int "Number of volumes (logical drives) to be used."
            default 2
B
bernard 已提交
70

B
bernard 已提交
71 72 73 74 75 76 77 78 79 80 81 82 83
        config RT_DFS_ELM_MAX_SECTOR_SIZE
            int "Maximum sector size to be handled."
            default 512
            help
                if you use some spi nor flash for fatfs, please set this the erase sector size, for example 4096.

        config RT_DFS_ELM_USE_ERASE
            bool "Enable sector erase feature"
            default n
        
        config RT_DFS_ELM_REENTRANT
            bool "Enable the reentrancy (thread safe) of the FatFs module"
            default y
B
bernard 已提交
84
        endmenu
B
bernard 已提交
85 86 87 88 89 90 91 92
    endif

    config RT_USING_DFS_DEVFS
        bool "Using devfs for device objects"
        default y
    
    config RT_USING_DFS_NET
        bool "Enable BSD socket operated by file system API"
B
bernard 已提交
93 94
        select RT_USING_LWIP
        select RT_USING_POSIX
B
bernard 已提交
95 96 97 98
        default n
        help
            Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.

99 100 101 102 103 104 105 106 107 108 109 110 111 112
    if RT_USING_DFS_NET
        config HAVE_SYS_SELECT_H
            bool "Toolchains/libc have provide sys/select.h"
            default n
            help
                Toolchains/libc have provide sys/select.h file, therefore, disable the sys/select.h in RT-Thread.

        config HAVE_SYS_SOCKET_H
            bool "Toolchains/libc have provide sys/socket.h"
            default n
            help
                Toolchains/libc have provide sys/socket.h file, therefore, disable the sys/socket.h in RT-Thread.
    endif

B
bernard 已提交
113 114 115 116 117 118 119 120 121 122 123 124 125
    config RT_USING_DFS_ROMFS
        bool "Enable ReadOnly file system on flash"
        default n

    config RT_USING_DFS_RAMFS
        bool "Enable RAM file system"
        default n

    config RT_USING_DFS_UFFS
        bool "Enable UFFS file system: Ultra-low-cost Flash File System"
        select RT_USING_MTD_NAND
        default n

B
bernard 已提交
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
    if RT_USING_DFS_UFFS
        choice 
            prompt "UFFS ECC mode"
            default RT_UFFS_ECC_MODE_1

            config RT_UFFS_ECC_MODE_0
                bool "0: Do not use ECC"

            config RT_UFFS_ECC_MODE_1
                bool "1: UFFS calculate the ECC"

            config RT_UFFS_ECC_MODE_2
                bool "2: Flash driver(or by hardware) calculate the ECC"
            
            config RT_UFFS_ECC_MODE_3
                bool "3: Hardware calculate the ECC and automatically write to spare."
        endchoice
        
        config RT_UFFS_ECC_MODE
            int
            default 0 if RT_UFFS_ECC_MODE_0
            default 1 if RT_UFFS_ECC_MODE_1
            default 2 if RT_UFFS_ECC_MODE_2
            default 3 if RT_UFFS_ECC_MODE_3
        
    endif

B
bernard 已提交
153 154
    config RT_USING_DFS_NFS
        bool "Using NFS v3 client file system"
B
bernard 已提交
155
        depends on RT_USING_LWIP
B
bernard 已提交
156 157 158 159 160 161 162 163 164 165 166
        default n

    if RT_USING_DFS_NFS
        config RT_NFS_HOST_EXPORT
            string "NFSv3 host export"
            default "192.168.1.5:/"
    endif

endif

endmenu