diff options
author | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-09-03 18:14:37 +0000 |
---|---|---|
committer | juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2010-09-03 18:14:37 +0000 |
commit | 006386c4b4cc0da66bf9e40beb66f8008ab3208a (patch) | |
tree | 59c38e4afa0ac469f8668f97fb7e56d3f4061d00 /target/linux/ar71xx/base-files | |
parent | b73df9f67e312619830887740cc066b4555b63b3 (diff) |
ar71xx: add support for the Zcomax ZCN-1523H-2-8/5-16 boards
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22882 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/base-files')
5 files changed, 70 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 384bf032ca..b1e1d2312b 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -108,6 +108,9 @@ get_status_led() { wzr-hp-g300nh) status_led="wzr-hp-g300nh:green:router" ;; + zcn-1523h-2 | zcn-1523h-5) + status_led="zcn-1523h:amber:init" + ;; esac; } diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/zcn-1523h-2 b/target/linux/ar71xx/base-files/etc/uci-defaults/zcn-1523h-2 new file mode 100755 index 0000000000..4f77316357 --- /dev/null +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/zcn-1523h-2 @@ -0,0 +1,24 @@ +#!/bin/sh +# +# Copyright (C) 2010 OpenWrt.org +# + +. /lib/ar71xx.sh + +board=$(ar71xx_board_name) + +zcn_set_leds() { + uci batch <<EOF +set system.led_lan1='led' +set system.led_lan1.name='lan1' +set system.led_lan1.sysfs='zcn-1523h:green:lan1' +set system.led_lan1.trigger='netdev' +set system.led_lan1.dev='eth0' +set system.led_lan1.mode='link tx rx' +commit system +EOF +} + +if [ "${board}" == "zcn-1523h-2" ]; then + zcn_set_leds +fi diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/zcn-1523h-5 b/target/linux/ar71xx/base-files/etc/uci-defaults/zcn-1523h-5 new file mode 100755 index 0000000000..c62f72f099 --- /dev/null +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/zcn-1523h-5 @@ -0,0 +1,30 @@ +#!/bin/sh +# +# Copyright (C) 2010 OpenWrt.org +# + +. /lib/ar71xx.sh + +board=$(ar71xx_board_name) + +zcn_set_leds() { + uci batch <<EOF +set system.led_lan1='led' +set system.led_lan1.name='lan1' +set system.led_lan1.sysfs='zcn-1523h:green:lan1' +set system.led_lan1.trigger='netdev' +set system.led_lan1.dev='eth0' +set system.led_lan1.mode='link tx rx' +set system.led_lan2='led' +set system.led_lan2.name='lan2' +set system.led_lan2.sysfs='zcn-1523h:green:lan2' +set system.led_lan2.trigger='netdev' +set system.led_lan2.dev='eth1' +set system.led_lan2.mode='link tx rx' +commit system +EOF +} + +if [ "${board}" == "zcn-1523h-5" ]; then + zcn_set_leds +fi diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 2a96822628..4b08e93c18 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -121,6 +121,12 @@ ar71xx_board_name() { *WZR-HP-G300NH) name="wzr-hp-g300nh" ;; + *ZCN-1523H-2) + name="zcn-1523h-2" + ;; + *ZCN-1523H-5) + name="zcn-1523h-5" + ;; *) name="generic" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index bfa5cc69bd..29aeff42ef 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -96,6 +96,13 @@ platform_check_image() { } return 0 ;; + zcn-1523h-2 | zcn-1523h-5) + [ "$magic" != "6873" -a "$magic" != "1985" ] && { + echo "Invalid image type." + return 1 + } + return 0 + ;; routerstation | routerstation-pro | ls-sr71 | pb42 | pb44 | eap7660d ) [ "$magic" != "4349" ] && { echo "Invalid image. Use *-sysupgrade.bin files on this board" |