summaryrefslogtreecommitdiff
path: root/target/linux/ramips/base-files/etc
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ramips/base-files/etc')
-rw-r--r--target/linux/ramips/base-files/etc/config/fstab16
-rwxr-xr-xtarget/linux/ramips/base-files/etc/diag.sh5
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/01_leds (renamed from target/linux/ramips/base-files/etc/board.d/01_leds)16
-rwxr-xr-xtarget/linux/ramips/base-files/etc/uci-defaults/02_network (renamed from target/linux/ramips/base-files/etc/board.d/02_network)24
4 files changed, 45 insertions, 16 deletions
diff --git a/target/linux/ramips/base-files/etc/config/fstab b/target/linux/ramips/base-files/etc/config/fstab
new file mode 100644
index 0000000..c984b93
--- /dev/null
+++ b/target/linux/ramips/base-files/etc/config/fstab
@@ -0,0 +1,16 @@
+config 'global'
+ option anon_swap '0'
+ option anon_mount '1'
+ option auto_swap '1'
+ option auto_mount '1'
+ option delay_root '5'
+ option check_fs '0'
+
+config 'mount'
+ option target '/mnt/sd*'
+ option enabled '1'
+
+config 'mount'
+ option target '/mnt/mmcblk*'
+ option enabled '1'
+
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 9ad7ccb..74b8867 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -73,8 +73,9 @@ get_status_led() {
m4)
status_led="m4:blue:status"
;;
- mlw221)
- status_led="kingston:blue:status"
+ mlw221|\
+ mlwg2)
+ status_led="kingston:blue:system"
;;
mofi3500-3gn)
status_led="mofi3500-3gn:green:status"
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
index 01e2363..5d6ed2b 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/uci-defaults/01_leds
@@ -1,6 +1,6 @@
#!/bin/sh
-. /lib/functions/uci-defaults-new.sh
+. /lib/functions/uci-defaults.sh
. /lib/ramips.sh
set_usb_led() {
@@ -11,11 +11,8 @@ set_wifi_led() {
ucidef_set_led_netdev "wifi_led" "wifi" "$1" "wlan0"
}
-
board=$(ramips_board_name)
-board_config_update
-
case $board in
3g-6200n)
set_wifi_led "edimax:amber:wlan"
@@ -116,7 +113,8 @@ case $board in
hw550-3g)
set_usb_led "hw550-3g:green:usb"
;;
- mlw221)
+ mlw221|\
+ mlwg2)
set_wifi_led "kingston:blue:wifi"
ucidef_set_led_default "system" "system" "kingston:blue:system" "1"
;;
@@ -174,15 +172,15 @@ case $board in
hg255d)
set_wifi_led "hg255d:wlan"
set_usb_led "hg255d:usb"
- ucidef_set_led_interface "lan" "hg255d:internet"
+ ucidef_set_led_netdev "eth" "Internet" "hg255d:internet" "eth0.2"
;;
wnce2001)
set_wifi_led "netgear:green:wlan"
;;
rt-n14u)
ucidef_set_led_default "power" "power" "asus:blue:power" "1"
- ucidef_set_led_interafce "lan" "asus:blue:lan"
- ucidef_set_led_netdev "wan" "asus:blue:wan"
+ ucidef_set_led_netdev "lan" "lan" "asus:blue:lan" "eth0.1"
+ ucidef_set_led_netdev "wan" "wan" "asus:blue:wan" "eth0.2"
set_wifi_led "asus:blue:air"
set_usb_led "asus:blue:usb"
;;
@@ -214,6 +212,6 @@ case $board in
;;
esac
-board_config_flush
+ucidef_commit_leds
exit 0
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/uci-defaults/02_network
index e027b3b..568b91b 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/uci-defaults/02_network
@@ -2,7 +2,7 @@
. /lib/functions.sh
. /lib/ramips.sh
-. /lib/functions/uci-defaults-new.sh
+. /lib/functions/uci-defaults.sh
. /lib/functions/system.sh
ramips_setup_rt3x5x_vlans()
@@ -55,7 +55,7 @@ ramips_setup_interfaces()
ucidef_set_interface_lan "eth0.2"
;;
- wizard8800 | \
+ mlwg2 | \
wl-330n | \
wmr300)
ucidef_set_interface_lan "eth0.1"
@@ -197,7 +197,12 @@ ramips_setup_interfaces()
wli-tx4-ag300n)
ucidef_set_interface_lan "eth0"
;;
-
+ MT7620 | MT7628 | MT7688)
+ ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
+ ;;
+ MT7621 | MT7623)
+ ucidef_set_interfaces_lan_wan "eth0" "eth1"
+ ;;
*)
RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"`
if [ -n "${RT3X5X}" ]; then
@@ -287,6 +292,10 @@ ramips_setup_macs()
wnce2001)
wan_mac=$(mtd_get_mac_binary factory 46)
;;
+ #MT7620 | MT7621 | MT7623 | MT7628 | MT7688)
+ # lan_mac=$(eth_mac r lan)
+ # wan_mac=$(eth_mac r wan)
+ # ;;
*)
lan_mac=$(cat /sys/class/net/eth0/address)
@@ -299,10 +308,15 @@ ramips_setup_macs()
[ -n "$wan_mac" ] && ucidef_set_interface_macaddr wan $wan_mac
}
-board_config_update
+[ -e /etc/config/network ] && exit 0
+
+touch /etc/config/network
+
board=$(ramips_board_name)
+
ramips_setup_interfaces $board
ramips_setup_macs $board
-board_config_flush
+
+uci commit network
exit 0