add preinit modularization work by Daniel Dickinson (cshore)
[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-600 rev. A1")
23 name="dir-600-a1"
24 ;;
25 *"DIR-825 rev. B1")
26 name="dir-825-b1"
27 ;;
28 *"Bullet M")
29 name="bullet-m"
30 ;;
31 *"Nanostation M")
32 name="nanostation-m"
33 ;;
34 *LS-SR71)
35 name="ls-sr71"
36 ;;
37 *MZK-W04NU)
38 name="mzk-w04nu"
39 ;;
40 *MZK-W300NH)
41 name="mzk-w300nh"
42 ;;
43 *PB42)
44 name="pb42"
45 ;;
46 *PB44)
47 name="pb44"
48 ;;
49 *RB-411)
50 name="rb-411"
51 ;;
52 *RB-433)
53 name="rb-433"
54 ;;
55 *RB-450)
56 name="rb-450"
57 ;;
58 *RB-493)
59 name="rb-493"
60 ;;
61 *"Rocket M")
62 name="rocket-m"
63 ;;
64 *RouterStation)
65 name="routerstation"
66 ;;
67 *"RouterStation Pro")
68 name="routerstation-pro"
69 ;;
70 *TEW-632BRP)
71 name="tew-632brp"
72 ;;
73 *TL-WR1043ND)
74 name="tl-wr1043nd"
75 ;;
76 *"DIR-615 rev. C1")
77 name="dir-615-c1"
78 ;;
79 *TL-WR741ND)
80 name="tl-wr741nd"
81 ;;
82 *"TL-WR841N v1")
83 name="tl-wr841n-v1"
84 ;;
85 *TL-WR941ND)
86 name="tl-wr941nd"
87 ;;
88 *WP543)
89 name="wp543"
90 ;;
91 *WNDR3700)
92 name="wndr3700"
93 ;;
94 *WNR2000)
95 name="wnr2000"
96 ;;
97 *WRT160NL)
98 name="wrt160nl"
99 ;;
100 *WRT400N)
101 name="wrt400n"
102 ;;
103 *WZR-HP-G300NH)
104 name="wzr-hp-g300nh"
105 ;;
106 *)
107 name="generic"
108 ;;
109 esac
110
111 echo $name
112 }
This page took 0.061275 seconds and 5 git commands to generate.