ar71xx: separate DIR-615 rev. C1 support from the TEW-632 (based on the patch from...
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / lib / ar71xx.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2009 OpenWrt.org
4 #
5
6 ar71xx_board_name() {
7 local machine
8 local name
9
10 machine=$(awk 'BEGIN{FS="[ \t]+:[ \t]"} /machine/ {print $2}' /proc/cpuinfo)
11
12 case "$machine" in
13 *AP81)
14 name="ap81"
15 ;;
16 *AP83)
17 name="ap83"
18 ;;
19 *AW-NR580)
20 name="aw-nr580"
21 ;;
22 *"DIR-825 rev. B1")
23 name="dir-825-b1"
24 ;;
25 *"Bullet M")
26 name="bullet-m"
27 ;;
28 *"Nanostation M")
29 name="nanostation-m"
30 ;;
31 *LS-SR71)
32 name="ls-sr71"
33 ;;
34 *MZK-W04NU)
35 name="mzk-w04nu"
36 ;;
37 *MZK-W300NH)
38 name="mzk-w300nh"
39 ;;
40 *PB42)
41 name="pb42"
42 ;;
43 *PB44)
44 name="pb44"
45 ;;
46 *RB-411)
47 name="rb-411"
48 ;;
49 *RB-433)
50 name="rb-433"
51 ;;
52 *RB-450)
53 name="rb-450"
54 ;;
55 *RB-493)
56 name="rb-493"
57 ;;
58 *"Rocket M")
59 name="rocket-m"
60 ;;
61 *RouterStation)
62 name="routerstation"
63 ;;
64 *"RouterStation Pro")
65 name="routerstation-pro"
66 ;;
67 *TEW-632BRP)
68 name="tew-632brp"
69 ;;
70 *TL-WR1043ND)
71 name="tl-wr1043nd"
72 ;;
73 *"DIR-615 rev. C1")
74 name="dir-615-c1"
75 ;;
76 *TL-WR741ND)
77 name="tl-wr741nd"
78 ;;
79 *TL-WR941ND)
80 name="tl-wr941nd"
81 ;;
82 *WP543)
83 name="wp543"
84 ;;
85 *WNDR3700)
86 name="wndr3700"
87 ;;
88 *WNR2000)
89 name="wnr2000"
90 ;;
91 *WRT160NL)
92 name="wrt160nl"
93 ;;
94 *WRT400N)
95 name="wrt400n"
96 ;;
97 *)
98 name="generic"
99 ;;
100 esac
101
102 echo $name
103 }