aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/base-files
diff options
context:
space:
mode:
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