ar71xx: add user-space support for the WD My Net N600 board
authorGabor Juhos <juhosg@openwrt.org>
Thu, 19 Sep 2013 22:36:41 +0000 (22:36 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Thu, 19 Sep 2013 22:36:41 +0000 (22:36 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 38074

target/linux/ar71xx/base-files/etc/diag.sh
target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
target/linux/ar71xx/base-files/etc/uci-defaults/02_network
target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header [new file with mode: 0755]
target/linux/ar71xx/base-files/lib/ar71xx.sh

index 1456d6eebb9c3177932e4e8cf775d3f1bafd529b..2719a1340abd508816f0c9bbbb03f6c33418afe0 100755 (executable)
@@ -77,6 +77,9 @@ get_status_led() {
        mr600v2)
                status_led="mr600:blue:power"
                ;;
+       mynet-n600)
+               status_led="wd:blue:power"
+               ;;
        mzk-w04nu | \
        mzk-w300nh)
                status_led="planex:green:status"
index f55f1fe7c240a46aaa93eac3183205b3531e7fe2..845de4e7883b984ece5ac4a781195285668e1fa5 100755 (executable)
@@ -86,6 +86,14 @@ mr600)
        ucidef_set_led_wlan "wlan58" "WLAN58" "mr600:green:wlan58" "phy0tpt"
        ;;
 
+mynet-n600)
+       ucidef_set_led_netdev "wan" "WAN" "wd:blue:internet" "eth1"
+       ucidef_set_led_switch "lan1" "LAN1" "wd:green:lan1" "switch0" "0x02"
+       ucidef_set_led_switch "lan2" "LAN2" "wd:green:lan2" "switch0" "0x10"
+       ucidef_set_led_switch "lan3" "LAN3" "wd:green:lan3" "switch0" "0x08"
+       ucidef_set_led_switch "lan4" "LAN4" "wd:green:lan4" "switch0" "0x04"
+       ;;
+
 mzk-w04u)
        ucidef_set_led_usbdev "usb" "USB" "planex:green:usb" "1-1"
        ;;
index d5a15066e3dde0e25dcabccc74914e9419175fea..23e99d0b3bc9ac222b8bdd9b79c7886220ed1b75 100755 (executable)
@@ -249,6 +249,7 @@ dir-600-a1 |\
 dir-615-c1 |\
 dir-615-e4 |\
 ja76pf |\
+mynet-n600 |\
 rb-750 |\
 rb-751 |\
 tew-632brp |\
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header b/target/linux/ar71xx/base-files/etc/uci-defaults/09_fix-seama-header
new file mode 100755 (executable)
index 0000000..8114ed4
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# Copyright (C) 2013 OpenWrt.org
+#
+
+. /lib/ar71xx.sh
+
+fix_seama_header() {
+       local part=$1
+
+       mtd fixseama $part
+}
+
+board=$(ar71xx_board_name)
+
+case "$board" in
+mynet-n600)
+       fix_seama_header kernel
+       ;;
+esac
index f977a6db6a9674b10505b5959238d92013012fa6..68be1e237d1e1b144b0dca30bacb7bac2d55e1c0 100755 (executable)
@@ -303,6 +303,9 @@ ar71xx_board_detect() {
        *MR600)
                name="mr600"
                ;;
+       *"My Net N600")
+               name="mynet-n600"
+               ;;
        *MZK-W04NU)
                name="mzk-w04nu"
                ;;