aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
authorHenryk Heisig <hyniu@o2.pl>2016-09-24 21:41:43 +0200
committerJohn Crispin <john@phrozen.org>2016-12-22 15:03:30 +0100
commitc8043137bbd323b1490ae8613eab915ba9c138ee (patch)
tree6ebd7b34943ad84fe7df3a008a03a319ccdf197c /target/linux/ramips/base-files
parent190ee7d86b450083fea4236d588d0d88a50e1311 (diff)
downloadupstream-c8043137bbd323b1490ae8613eab915ba9c138ee.tar.gz
upstream-c8043137bbd323b1490ae8613eab915ba9c138ee.tar.bz2
upstream-c8043137bbd323b1490ae8613eab915ba9c138ee.zip
ramips: Add support to TP-Link Archer MR200
CPU: MT7620N 580MHz Flash: 8MB RAM: 64MB build-in modem 3G/4G four ethernet port 10/100Mbps Signed-off-by: Henryk Heisig <hyniu@o2.pl>
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/01_leds6
-rwxr-xr-xtarget/linux/ramips/base-files/etc/board.d/02_network5
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/init.d/enablemodem16
-rwxr-xr-xtarget/linux/ramips/base-files/lib/ramips.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh3
6 files changed, 35 insertions, 1 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 4a7b9f69c7..bcb1df1050 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -242,6 +242,12 @@ mr-102n)
set_wifi_led "$board:green:wlan"
set_usb_led "$board:green:usb"
;;
+mr200)
+ ucidef_set_led_default "power" "power" "$board:white:power" "1"
+ ucidef_set_led_netdev "lan" "lan" "$board:white:lan" "eth0.1"
+ ucidef_set_led_netdev "wan" "wan" "$board:white:wan" "usb0"
+ set_wifi_led "$board:white:wlan"
+ ;;
mzk-ex750np)
ucidef_set_led_default "power" "power" "$board:red:power" "1"
set_wifi_led "$board:red:wifi"
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 63bf123b73..94cf0ec7fc 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -217,6 +217,11 @@ ramips_setup_interfaces()
wl-330n)
ucidef_set_interface_lan "eth0.1"
;;
+ mr200)
+ ucidef_add_switch "switch0" \
+ "0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0"
+ ucidef_set_interface_wan "usb0"
+ ;;
mzk-dp150n|\
vocore)
ucidef_add_switch "switch0" \
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index 0b0b8d9777..c4b753808f 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -164,6 +164,9 @@ get_status_led() {
mr-102n)
status_led="$board:amber:status"
;;
+ mr200)
+ status_led="$board:white:power"
+ ;;
nw718)
status_led="$board:amber:cpu"
;;
diff --git a/target/linux/ramips/base-files/etc/init.d/enablemodem b/target/linux/ramips/base-files/etc/init.d/enablemodem
new file mode 100755
index 0000000000..a7e6c2ef23
--- /dev/null
+++ b/target/linux/ramips/base-files/etc/init.d/enablemodem
@@ -0,0 +1,16 @@
+#!/bin/sh /etc/rc.common
+. /lib/ramips.sh
+
+START=99
+
+start() {
+ local board=$(ramips_board_name)
+ if [ $board = "mr200" ]; then
+ adb wait-for-device
+ adb shell chmod +x /WEBSERVER/www/cgi-bin/*
+ adb shell httpd -h /WEBSERVER/www/ &
+ echo "2357 000d" > /sys/bus/usb-serial/drivers/option1/new_id
+ sleep 2
+ adb kill-server
+ fi
+}
diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh
index cc6f00fd55..50903c75d6 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -295,6 +295,9 @@ ramips_board_detect() {
*"MR-102N")
name="mr-102n"
;;
+ *"MR200")
+ name="mr200"
+ ;;
*"MT7620a + MT7530 evaluation"*)
name="mt7620a_mt7530"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 2151cf945c..78e87a09f2 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -204,7 +204,8 @@ platform_check_image() {
return 0
;;
c20i|\
- c50)
+ c50|\
+ mr200)
[ "$magic" != "03000000" ] && {
echo "Invalid image type."
return 1