6f0028218f9b0d8c4913d40652065b2923935d7d
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / base-files / lib / brcm63xx.sh
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]+:[ \t]"} /system type/ {print $2}' /proc/cpuinfo)
15
16 case "$board_name" in
17 "bcm63xx/96348GW "*)
18 status_led="tel"
19 status_led2="line1"
20 brcm63xx_has_reset_button="true"
21 ifname=eth1
22 ;;
23 "bcm63xx/96348GW-11 "*)
24 status_led="power"
25 brcm63xx_has_reset_button="true"
26 ifname=eth1
27 ;;
28 "bcm63xx/96358GW "* | "bcm63xx/SPW500V "*)
29 status_led="power:green"
30 brcm63xx_has_reset_button="true"
31 ifname=eth0
32 ;;
33 "bcm63xx/CPVA642 "* )
34 status_led="power:green"
35 brcm63xx_has_reset_button="true"
36 ifname=eth0
37 ;;
38 *)
39 ;;
40 esac
41 }
42
43 brcm63xx_detect