summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/base-files/Makefile107
-rw-r--r--target/config/Config.in.runtime181
2 files changed, 140 insertions, 148 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 6dea5f4dc..ef9bdafd4 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -6,7 +6,7 @@ include $(TOPDIR)/mk/rootfs.mk
PKG_NAME:= base-files
PKG_VERSION:= 1.0
-PKG_RELEASE:= 97
+PKG_RELEASE:= 98
PKG_SECTION:= base/apps
PKG_DESCR:= basic files and scripts
@@ -90,69 +90,50 @@ endif
# simple network configuration
ifneq (${ADK_SIMPLE_NETWORK_CONFIG},)
${INSTALL_DIR} ${IDIR_BASE_FILES}/etc/network
- # network config local
- echo -e "auto lo\niface lo inet loopback" > ${IDIR_BASE_FILES}/etc/network/interfaces
- # network config eth0
- # configure nic with dhcp
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC},y)
- echo -e "\nauto eth0\niface eth0 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- # configure nic with manual ip
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_NIC_MANUAL},y)
- echo -e "\nauto eth0\niface eth0 inet static" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " address ${SIMPLE_NETWORK_CONFIG_ETH0_IP}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " netmask ${SIMPLE_NETWORK_CONFIG_ETH0_NM}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH0_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " gateway ${SIMPLE_NETWORK_CONFIG_ETH0_GW}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- # configure bridge
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE},y)
- echo -e "\nauto br0\niface br0 inet manual" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH0_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- #configure bridge with ip
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH0_TYPE_BRIDGE_IP},y)
- echo -e "\nauto br0\niface br0 inet static" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " address ${SIMPLE_NETWORK_CONFIG_ETH0_IP}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " netmask ${SIMPLE_NETWORK_CONFIG_ETH0_NM}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH0_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH0_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- # network config wlan0
-ifeq (${SIMPLE_NETWORK_CONFIG_WLAN0_TYPE_NIC},y)
- echo -e "\nauto wlan0\niface wlan0 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- # network config eth1
- # configure nic with dhcp
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC},y)
- echo -e "\nauto eth1\niface eth1 inet dhcp" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- # configure nic with manual ip
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_NIC_MANUAL},y)
- echo -e "\nauto eth1\niface eth1 inet static" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " address ${SIMPLE_NETWORK_CONFIG_ETH1_IP}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " netmask ${SIMPLE_NETWORK_CONFIG_ETH1_NM}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH1_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " gateway ${SIMPLE_NETWORK_CONFIG_ETH1_GW}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- # configure bridge
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE},y)
- echo -e "\nauto br0\niface br1 inet manual" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH1_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- #configure bridge with ip
-ifeq (${SIMPLE_NETWORK_CONFIG_ETH1_TYPE_BRIDGE_IP},y)
- echo -e "\nauto br0\niface br1 inet static" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " address ${SIMPLE_NETWORK_CONFIG_ETH1_IP}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " netmask ${SIMPLE_NETWORK_CONFIG_ETH1_NM}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " broadcast ${SIMPLE_NETWORK_CONFIG_ETH1_BC}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- echo -e " bridge-ports ${SIMPLE_NETWORK_CONFIG_ETH1_BRIDGE}" >> ${IDIR_BASE_FILES}/etc/network/interfaces
-endif
- # newline at the end of interfaces file
- printf "\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
- # resolver config
+ printf "auto lo\niface lo inet loopback\n" > ${IDIR_BASE_FILES}/etc/network/interfaces
+
+ifeq (${ADK_SIMPLE_NETWORK_CONFIG_ETH0_DHCP},y)
+ printf "\nauto eth0\niface eth0 inet dhcp\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+endif
+ifeq (${ADK_SIMPLE_NETWORK_CONFIG_ETH0_STATIC},y)
+ printf "\nauto eth0\niface eth0 inet static\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " address ${ADK_SIMPLE_NETWORK_CONFIG_ETH0_IP}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " netmask ${ADK_SIMPLE_NETWORK_CONFIG_ETH0_NM}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " broadcast +\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ifneq (${ADK_SIMPLE_NETWORK_CONFIG_ETH0_GW},)
+ printf " gateway ${ADK_SIMPLE_NETWORK_CONFIG_ETH0_GW}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+endif
+endif
+
+ifeq (${ADK_SIMPLE_NETWORK_CONFIG_WLAN0_DHCP},y)
+ printf "\nauto wlan0\niface wlan0 inet dhcp\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+endif
+ifeq (${ADK_SIMPLE_NETWORK_CONFIG_WLAN0_STATIC},y)
+ printf "\nauto wlan0\niface wlan0 inet static\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " address ${ADK_SIMPLE_NETWORK_CONFIG_WLAN0_IP}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " netmask ${ADK_SIMPLE_NETWORK_CONFIG_WLAN0_NM}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " broadcast +\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ifneq (${ADK_SIMPLE_NETWORK_CONFIG_WLAN0_GW},)
+ printf " gateway ${ADK_SIMPLE_NETWORK_CONFIG_WLAN0_GW}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+endif
+endif
+
+ifeq (${ADK_SIMPLE_NETWORK_CONFIG_ETH1_DHCP},y)
+ printf "\nauto eth1\niface eth1 inet dhcp\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+endif
+ifeq (${ADK_SIMPLE_NETWORK_CONFIG_ETH1_STATIC},y)
+ printf "\nauto eth1\niface eth1 inet static\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " address ${ADK_SIMPLE_NETWORK_CONFIG_ETH1_IP}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " netmask ${ADK_SIMPLE_NETWORK_CONFIG_ETH1_NM}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ printf " broadcast +\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+ifneq (${ADK_SIMPLE_NETWORK_CONFIG_ETH1_GW},)
+ printf " gateway ${ADK_SIMPLE_NETWORK_CONFIG_ETH1_GW}\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+endif
+endif
+ printf "\n" >> ${IDIR_BASE_FILES}/etc/network/interfaces
+
rm ${IDIR_BASE_FILES}/etc/resolv.conf
- echo -e "nameserver ${SIMPLE_NETWORK_CONFIG_RESOLV}" > ${IDIR_BASE_FILES}/etc/resolv.conf
+ printf "nameserver ${ADK_SIMPLE_NETWORK_CONFIG_NS}\n" > ${IDIR_BASE_FILES}/etc/resolv.conf
endif
include ${TOPDIR}/mk/pkg-bottom.mk
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