| 1 | #!/bin/sh |
| 2 | # |
| 3 | # Copyright (C) 2007 OpenWrt.org |
| 4 | # |
| 5 | # |
| 6 | |
| 7 | board_name="" |
| 8 | status_led="" |
| 9 | status_led2="" |
| 10 | sys_mtd_part="" |
| 11 | brcm63xx_has_reset_button="" |
| 12 | |
| 13 | brcm63xx_detect() { |
| 14 | board_name=$(awk 'BEGIN{FS="[ \t:/]+"} /system type/ {print $4}' /proc/cpuinfo) |
| 15 | |
| 16 | if [ "$board_name" = "96358VW" ] && [ -e /proc/switch/eth1/enable ]; then |
| 17 | board_name="DVAG3810BN" |
| 18 | fi |
| 19 | |
| 20 | case "$board_name" in |
| 21 | 96328avng) |
| 22 | status_led="96328avng::power" |
| 23 | ifname=eth0 |
| 24 | ;; |
| 25 | 96328A-1241N) |
| 26 | brcm63xx_has_reset_button="true" |
| 27 | status_led="96328A-1241N:green:power" |
| 28 | ifname=eth0 |
| 29 | ;; |
| 30 | 96328A-1441N1) |
| 31 | brcm63xx_has_reset_button="true" |
| 32 | status_led="96328A-1441N1:green:power" |
| 33 | ifname=eth0 |
| 34 | ;; |
| 35 | 963281TAN) |
| 36 | status_led="963281TAN::power" |
| 37 | ifname=eth0 |
| 38 | ;; |
| 39 | 963281T_TEF) |
| 40 | brcm63xx_has_reset_button="true" |
| 41 | status_led="963281T_TEF:green:power" |
| 42 | ifname=eth0 |
| 43 | ;; |
| 44 | 96348GW) |
| 45 | status_led="power" |
| 46 | brcm63xx_has_reset_button="true" |
| 47 | ifname=eth1 |
| 48 | ;; |
| 49 | GW6000) |
| 50 | brcm63xx_has_reset_button="true" |
| 51 | ifname=eth1 |
| 52 | ;; |
| 53 | GW6200) |
| 54 | status_led="line1" |
| 55 | status_led2="tel" |
| 56 | brcm63xx_has_reset_button="true" |
| 57 | ifname=eth1 |
| 58 | ;; |
| 59 | 96348GW-11) |
| 60 | status_led="power" |
| 61 | brcm63xx_has_reset_button="true" |
| 62 | ifname=eth1 |
| 63 | ;; |
| 64 | CT536_CT5621) |
| 65 | status_led="power" |
| 66 | brcm63xx_has_reset_button="true" |
| 67 | ifname=eth0 |
| 68 | ;; |
| 69 | SPW500V) |
| 70 | status_led="power:green" |
| 71 | brcm63xx_has_reset_button="true" |
| 72 | ifname=eth0 |
| 73 | ;; |
| 74 | AW4139 |\ |
| 75 | AW4339U) |
| 76 | status_led="dsl-274xb:green:power" |
| 77 | brcm63xx_has_reset_button="true" |
| 78 | ifname=eth0 |
| 79 | ;; |
| 80 | 96358-502V) |
| 81 | status_led="spw303v:green:power+adsl" |
| 82 | brcm63xx_has_reset_button="true" |
| 83 | ifname=eth0 |
| 84 | ;; |
| 85 | V2110) |
| 86 | status_led="V2110:power:green" |
| 87 | brcm63xx_has_reset_button="true" |
| 88 | ifname=eth0 |
| 89 | ;; |
| 90 | CPVA642) |
| 91 | status_led="power:green" |
| 92 | brcm63xx_has_reset_button="true" |
| 93 | ifname=eth0 |
| 94 | ;; |
| 95 | D-4P-W) |
| 96 | status_led="power:green" |
| 97 | brcm63xx_has_reset_button="true" |
| 98 | ifname=eth0 |
| 99 | ;; |
| 100 | NB6) |
| 101 | brcm63xx_has_reset_button="true" |
| 102 | ifname=eth0 |
| 103 | ;; |
| 104 | *) |
| 105 | ;; |
| 106 | esac |
| 107 | } |
| 108 | |
| 109 | brcm63xx_detect |
| 110 | |