summaryrefslogtreecommitdiff
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorBangLang Huang <banglang.huang@foxmail.com>2016-09-27 14:25:04 +0800
committerJohn Crispin <john@phrozen.org>2016-09-27 17:50:22 +0200
commit142ec7ada939313cc890f94df5fc6903f2660635 (patch)
tree237ecbae5e35ffbf688df8966b127b3b11ede4db /target/linux/ramips/base-files
parent9fe833e1d020748fa92e485aeb08b1ac9a6fdb09 (diff)
downloadmtk-20170518-142ec7ada939313cc890f94df5fc6903f2660635.zip
mtk-20170518-142ec7ada939313cc890f94df5fc6903f2660635.tar.gz
mtk-20170518-142ec7ada939313cc890f94df5fc6903f2660635.tar.bz2
ramips : add support for Newifi D1
Signed-off-by: BangLang Huang <banglang.huang@foxmail.com>
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network11
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh1
5 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 5dee0d5..c3230b7 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -235,6 +235,9 @@ mzk-ex750np)
na930)
set_usb_led "$board:blue:status"
;;
+newifi-d1)
+ set_usb_led "$board:red:status"
+ ;;
nw718)
set_usb_led "$board:amber:usb"
;;
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 70297de..c8b57ca 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -208,6 +208,13 @@ ramips_setup_interfaces()
ucidef_add_switch "switch0" \
"0:lan" "4:lan" "6t@eth0"
;;
+ newifi-d1)
+ ucidef_set_interface_lan_wan "eth0.1" "eth0.2"
+ ucidef_add_switch "switch0" \
+ "0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6t@eth0" "7t@eth0"
+ ucidef_add_switch "switch1" \
+ "4:lan" "6t@eth0" "7t@eth0"
+ ;;
rt-n56u)
ucidef_add_switch "switch0" \
"0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0"
@@ -322,6 +329,10 @@ ramips_setup_macs()
lan_mac=$(cat /sys/class/net/eth0/address)
lan_mac=$(macaddr_add "$lan_mac" -2)
;;
+ newifi-d1)
+ lan_mac=$(cat /sys/class/net/eth0/address)
+ lan_mac=$(macaddr_add "$lan_mac" 2)
+ ;;
oy-0001)
lan_mac=$(mtd_get_mac_binary factory 40)
wan_mac=$(mtd_get_mac_binary factory 46)
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index e604d7f..0023921 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -152,6 +152,9 @@ get_status_led() {
nw718)
status_led="$board:amber:cpu"
;;
+ newifi-d1)
+ status_led="$board:blue:status"
+ ;;
oy-0001|\
sl-r7205|\
zbt-we826)
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index 7429816..bb379f7 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -325,6 +325,9 @@ ramips_board_detect() {
*"NBG-419N")
name="nbg-419n"
;;
+ *"Newifi-D1")
+ name="newifi-d1"
+ ;;
*"NCS601W")
name="ncs601w"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 162a69e..0ef2308 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -96,6 +96,7 @@ platform_check_image() {
mzk-w300nh2|\
mzk-wdpr|\
nbg-419n|\
+ newifi-d1|\
nixcore|\
nw718|\
oy-0001|\