瀏覽代碼

[Net][NetUtils] Fix networking utils Kconfig and SConscript.

armink 7 年之前
父節點
當前提交
4793dc0d06
共有 3 個文件被更改,包括 23 次插入14 次删除
  1. 17 1
      components/net/Kconfig
  2. 6 0
      components/net/lwip-2.0.2/SConscript
  3. 0 13
      components/net/lwip-2.0.2/src/apps/SConscript

+ 17 - 1
components/net/Kconfig

@@ -201,10 +201,26 @@ config LWIP_USING_DHCPD
     bool "Enable DHCP server"
     default n
 
+   
+menu "Networking utilities"
 config RT_USING_NETUTILS
-    bool "Enable net utils"
+    bool "Enable networking utilities"
     default n
 
+    if RT_USING_NETUTILS
+    config RT_NETUTILS_USING_PING
+        bool "Enable Ping utility"
+        select RT_LWIP_ICMP
+        select RT_LWIP_RAW
+        default n
+
+    config RT_NETUTILS_USING_TFTP
+        bool "Enable TFTP(Trivial File Transfer Protocol) utility"
+        default n
+    
+    endif
+endmenu
+
 endif
 
 endmenu

+ 6 - 0
components/net/lwip-2.0.2/SConscript

@@ -81,6 +81,12 @@ if GetDepend(['RT_LWIP_PPP']):
 if GetDepend(['RT_USING_LWIP_IPV6']):
     src += ipv6_src
 
+if GetDepend(['RT_USING_NETUTILS']):
+    if GetDepend(['RT_NETUTILS_USING_TFTP']):
+        src += Glob('src/apps/tftp/*.c')
+    if GetDepend(['RT_NETUTILS_USING_PING']):
+        src += Glob('src/apps/ping/*.c')
+
 group = DefineGroup('lwIP', src, depend = ['RT_USING_LWIP', 'RT_USING_LWIP202'], CPPPATH = path)
 
 Return('group')

+ 0 - 13
components/net/lwip-2.0.2/src/apps/SConscript

@@ -1,13 +0,0 @@
-from building import *
-
-cwd = GetCurrentDir()
-src = Glob('tftp/*.c')
-
-if GetDepend(['RT_LWIP_ICMP', 'RT_LWIP_RAW']):
-    src += Glob('ping/*.c')
-
-CPPPATH = [cwd]
-
-group = DefineGroup('LwIP', src, depend = ['RT_USING_NETUTILS', 'RT_USING_LWIP202'], CPPPATH = CPPPATH)
-
-Return('group')