From 97886e9ba7ad1f967ba9790a18d2e05fd80915e7 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 4 Jun 2014 18:06:16 +0200 Subject: rework simple network config, allow to configure one gateway --- target/config/Config.in.runtime | 181 +++++++++++++++++++++------------------- 1 file changed, 96 insertions(+), 85 deletions(-) (limited to 'target') diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index 29ec49b2e..c2d8d6612 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -222,136 +222,147 @@ menu "eth0 Configuration" depends on ADK_SIMPLE_NETWORK_CONFIG choice - prompt "Type" - default SIMPLE_NETWORK_CONFIG_ETH0_TYPE_MANUAL +prompt "Type" +default ADK_SIMPLE_NETWORK_CONFIG_ETH0_TYPE_MANUAL + +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC + bool "static IP configuration" + +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_DHCP + bool "DHCP" -config SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC_MANUAL - bool "NIC / manual IP" +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_NONE + bool "no configuration" +endchoice -config SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC - bool "NIC / DHCP" +choice +prompt "configure default Gateway" +depends on ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC -config SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP - bool "Bridge with IP" +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC_WITH_GW + boolean "with Gateway" -config SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE - bool "Bridge w/o IP" +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC_WITHOUT_GW + boolean "without Gateway" -config SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NONE - bool "None" endchoice -config SIMPLE_NETWORK_CONFIG_ETH0_IP - depends on SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC_MANUAL || SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP - string "eth0 IP Address" - default "10.0.2.15" +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_IP + depends on ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC + string "IP Address" + default "10.0.0.2" -config SIMPLE_NETWORK_CONFIG_ETH0_NM - depends on SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC_MANUAL || SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP - string "eth0 Netmask" +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_NM + depends on ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC + string "Netmask" default "255.255.255.0" -config SIMPLE_NETWORK_CONFIG_ETH0_GW - depends on SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC_MANUAL - string "eth0 Gateway" - default "10.0.2.2" - -config SIMPLE_NETWORK_CONFIG_ETH0_BRIDGE - depends on SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE || SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP - string "Bridge ports" - default "eth0 eth1" - -config SIMPLE_NETWORK_CONFIG_ETH0_BC - depends on SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC_MANUAL || SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP - string - default "+" +config ADK_SIMPLE_NETWORK_CONFIG_ETH0_GW + depends on ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC_WITH_GW + string "Gateway" + default "10.0.0.1" endmenu menu "wlan0 Configuration" depends on ADK_SIMPLE_NETWORK_CONFIG depends on ADK_TARGET_SYSTEM_LEMOTE_YEELONG || \ - ADK_TARGET_SYSTEM_RASPBERRY_PI || \ ADK_TARGET_SYSTEM_CUBOX_I || \ ADK_TARGET_SYSTEM_IBM_X40 choice prompt "Type" -default SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_NONE +default ADK_SIMPLE_NETWORK_CONFIG_WLAN0_NONE -config SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_NONE - bool "None" +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_NONE + bool "No configuration" -config SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_DHCP +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC + bool "static IP configuration" + +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_DHCP bool "DHCP" -config SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_STATIC - bool "static IP configuration" +endchoice + +choice +prompt "configure default Gateway" +depends on ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC + +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC_WITH_GW + boolean "with Gateway" + +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC_WITHOUT_GW + boolean "without Gateway" endchoice + +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_IP + depends on ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC + string "IP Address" + default "192.168.1.2" + +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_NM + depends on ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC + string "Netmask" + default "255.255.255.0" + +config ADK_SIMPLE_NETWORK_CONFIG_WLAN0_GW + depends on ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC_WITH_GW + string "Gateway" + default "192.168.1.1" + endmenu menu "eth1 Configuration" depends on ADK_SIMPLE_NETWORK_CONFIG && \ - !ADK_TARGET_SYSTEM_LEMOTE_YEELONG && \ - !ADK_TARGET_SYSTEM_RASPBERRY_PI && \ - !ADK_TARGET_SYSTEM_CUBOX_I && \ - !ADK_TARGET_SYSTEM_IBM_X40 + ADK_TARGET_SYSTEM_MIKROTIK_RB532 choice - prompt "Type" - default SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NONE +prompt "Type" +default ADK_SIMPLE_NETWORK_CONFIG_ETH1_NONE -config SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC - bool "NIC / DHCP" +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC + bool "static IP configuration" -config SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC_MANUAL - bool "NIC / manual IP" +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_DHCP + bool "DHCP" -config SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP - bool "Bridge with IP" +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_NONE + bool "no configuration" +endchoice -config SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE - bool "Bridge w/o IP" +choice +prompt "configure default Gateway" +depends on ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC -config SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NONE - bool "None" -endchoice +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC_WITH_GW + boolean "with Gateway" -config SIMPLE_NETWORK_CONFIG_ETH1_IP - depends on SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC_MANUAL || SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP - string "eth1 IP Address" - default "192.168.1.2" +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC_WITHOUT_GW + boolean "without Gateway" -config SIMPLE_NETWORK_CONFIG_ETH1_NM - depends on SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC_MANUAL || SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP - string "eth1 Netmask" - default "255.255.255.0" +endchoice -config SIMPLE_NETWORK_CONFIG_ETH1_GW - depends on SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC_MANUAL - depends on !SIMPLE_NETWORK_CONFIG_ETH0_GW - string "eth1 Gateway" - default "" if !SIMPLE_NETWORK_CONFIG_ETH0_GW - default "192.168.1.1" +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_IP + depends on ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC + string "IP Address" + default "172.16.0.2" -config SIMPLE_NETWORK_CONFIG_ETH1_BRIDGE - depends on SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE || SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP - string "Bridge ports" - default "eth1 eth2" +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_NM + depends on ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC + string "Netmask" + default "255.255.0.0" -config SIMPLE_NETWORK_CONFIG_ETH1_BC - depends on SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC_MANUAL || SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP - string - default "+" +config ADK_SIMPLE_NETWORK_CONFIG_ETH1_GW + depends on ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC_WITH_GW + string "Gateway" + default "172.16.0.1" endmenu -menu "DNS Configuration" -depends on ADK_SIMPLE_NETWORK_CONFIG - -config SIMPLE_NETWORK_CONFIG_RESOLV +config ADK_SIMPLE_NETWORK_CONFIG_NS + depends on ADK_SIMPLE_NETWORK_CONFIG string "Nameserver" - default "10.0.2.3" + default "10.0.0.1" -endmenu -- cgit v1.2.3