Browse Source

Merge pull request #1118 from SummerGGift/optimize_nfs_kconfig

 [nfs]: optimize Kconfig file for nfs
Bernard Xiong 7 years ago
parent
commit
fd234eafdc
2 changed files with 19 additions and 15 deletions
  1. 16 13
      components/dfs/Kconfig
  2. 3 2
      components/net/Kconfig

+ 16 - 13
components/dfs/Kconfig

@@ -12,17 +12,20 @@ if RT_USING_DFS
         default y
         default y
 
 
     config DFS_FILESYSTEMS_MAX
     config DFS_FILESYSTEMS_MAX
-        int "The maximal number of mounted file system"
-        default 2
+        int "The maximal number of mounted file system"        
+        default 4 if RT_USING_DFS_NFS
+        default 2 
 
 
     config DFS_FILESYSTEM_TYPES_MAX
     config DFS_FILESYSTEM_TYPES_MAX
         int "The maximal number of file system type"
         int "The maximal number of file system type"
-        default 2
+        default 4 if RT_USING_DFS_NFS
+        default 2 
 
 
     config DFS_FD_MAX
     config DFS_FD_MAX
         int "The maximal number of opened files"
         int "The maximal number of opened files"
+        default 16 if RT_USING_DFS_NFS
         default 4
         default 4
-    
+
     config RT_USING_DFS_ELMFAT
     config RT_USING_DFS_ELMFAT
         bool "Enable elm-chan fatfs"
         bool "Enable elm-chan fatfs"
         default y
         default y
@@ -51,18 +54,18 @@ if RT_USING_DFS
 
 
             config RT_DFS_ELM_USE_LFN_2
             config RT_DFS_ELM_USE_LFN_2
                 bool "2: LFN with dynamic LFN working buffer on the stack"
                 bool "2: LFN with dynamic LFN working buffer on the stack"
-            
+
             config RT_DFS_ELM_USE_LFN_3
             config RT_DFS_ELM_USE_LFN_3
                 bool "3: LFN with dynamic LFN working buffer on the heap"
                 bool "3: LFN with dynamic LFN working buffer on the heap"
         endchoice
         endchoice
-        
+
         config RT_DFS_ELM_USE_LFN
         config RT_DFS_ELM_USE_LFN
             int
             int
             default 0 if RT_DFS_ELM_USE_LFN_0
             default 0 if RT_DFS_ELM_USE_LFN_0
             default 1 if RT_DFS_ELM_USE_LFN_1
             default 1 if RT_DFS_ELM_USE_LFN_1
             default 2 if RT_DFS_ELM_USE_LFN_2
             default 2 if RT_DFS_ELM_USE_LFN_2
             default 3 if RT_DFS_ELM_USE_LFN_3
             default 3 if RT_DFS_ELM_USE_LFN_3
-        
+
         config RT_DFS_ELM_MAX_LFN
         config RT_DFS_ELM_MAX_LFN
             int "Maximal size of file name length"
             int "Maximal size of file name length"
             range 12 255
             range 12 255
@@ -81,7 +84,7 @@ if RT_USING_DFS
         config RT_DFS_ELM_USE_ERASE
         config RT_DFS_ELM_USE_ERASE
             bool "Enable sector erase feature"
             bool "Enable sector erase feature"
             default n
             default n
-        
+
         config RT_DFS_ELM_REENTRANT
         config RT_DFS_ELM_REENTRANT
             bool "Enable the reentrancy (thread safe) of the FatFs module"
             bool "Enable the reentrancy (thread safe) of the FatFs module"
             default y
             default y
@@ -91,7 +94,7 @@ if RT_USING_DFS
     config RT_USING_DFS_DEVFS
     config RT_USING_DFS_DEVFS
         bool "Using devfs for device objects"
         bool "Using devfs for device objects"
         default y
         default y
-    
+
     config RT_USING_DFS_NET
     config RT_USING_DFS_NET
         bool "Enable BSD socket operated by file system API"
         bool "Enable BSD socket operated by file system API"
         select RT_USING_LWIP
         select RT_USING_LWIP
@@ -140,23 +143,23 @@ if RT_USING_DFS
 
 
             config RT_UFFS_ECC_MODE_2
             config RT_UFFS_ECC_MODE_2
                 bool "2: Flash driver(or by hardware) calculate the ECC"
                 bool "2: Flash driver(or by hardware) calculate the ECC"
-            
+
             config RT_UFFS_ECC_MODE_3
             config RT_UFFS_ECC_MODE_3
                 bool "3: Hardware calculate the ECC and automatically write to spare."
                 bool "3: Hardware calculate the ECC and automatically write to spare."
         endchoice
         endchoice
-        
+
         config RT_UFFS_ECC_MODE
         config RT_UFFS_ECC_MODE
             int
             int
             default 0 if RT_UFFS_ECC_MODE_0
             default 0 if RT_UFFS_ECC_MODE_0
             default 1 if RT_UFFS_ECC_MODE_1
             default 1 if RT_UFFS_ECC_MODE_1
             default 2 if RT_UFFS_ECC_MODE_2
             default 2 if RT_UFFS_ECC_MODE_2
             default 3 if RT_UFFS_ECC_MODE_3
             default 3 if RT_UFFS_ECC_MODE_3
-        
+
     endif
     endif
 
 
     config RT_USING_DFS_NFS
     config RT_USING_DFS_NFS
         bool "Using NFS v3 client file system"
         bool "Using NFS v3 client file system"
-        depends on RT_USING_LWIP
+        select RT_USING_LWIP
         default n
         default n
 
 
     if RT_USING_DFS_NFS
     if RT_USING_DFS_NFS

+ 3 - 2
components/net/Kconfig

@@ -91,12 +91,12 @@ config RT_USING_LWIP
             config RT_LWIP_PPPOE
             config RT_LWIP_PPPOE
                 bool "PPPoE protocol"
                 bool "PPPoE protocol"
                 default n
                 default n
-    
+
             config RT_LWIP_PPPOS
             config RT_LWIP_PPPOS
                 bool "PPPoS protocol"
                 bool "PPPoS protocol"
                 default n
                 default n
         endif
         endif
-        
+
         config RT_MEMP_NUM_NETCONN
         config RT_MEMP_NUM_NETCONN
             int "the number of struct netconns"
             int "the number of struct netconns"
             default 8
             default 8
@@ -111,6 +111,7 @@ config RT_USING_LWIP
 
 
         config RT_LWIP_UDP_PCB_NUM
         config RT_LWIP_UDP_PCB_NUM
             int "the number of UDP socket"
             int "the number of UDP socket"
+            default 8 if RT_USING_DFS_NFS
             default 4
             default 4
 
 
         if RT_LWIP_TCP
         if RT_LWIP_TCP