588c7dee027baf12a6158769f0f869dd1f8ff1f8
[openwrt/staging/wigyori.git] / package / boot / uboot-envtools / files / ath79
1 #
2 # Copyright (C) 2011-2014 OpenWrt.org
3 #
4
5 [ -e /etc/config/ubootenv ] && exit 0
6
7 touch /etc/config/ubootenv
8
9 . /lib/uboot-envtools.sh
10 . /lib/functions.sh
11
12 board=$(board_name)
13
14 case "$board" in
15 alfa-network,ap121f|\
16 alfa-network,ap121fe|\
17 alfa-network,n2q|\
18 alfa-network,n5q|\
19 alfa-network,pi-wifi4|\
20 alfa-network,r36a|\
21 alfa-network,tube-2hq|\
22 allnet,all-wap02860ac|\
23 araknis,an-300-ap-i-n|\
24 araknis,an-500-ap-i-ac|\
25 araknis,an-700-ap-i-ac|\
26 arduino,yun|\
27 buffalo,bhr-4grv2|\
28 devolo,magic-2-wifi|\
29 engenius,eap1200h|\
30 engenius,eap300-v2|\
31 engenius,eap350-v1|\
32 engenius,eap600|\
33 engenius,ecb1200|\
34 engenius,ecb1750|\
35 engenius,ecb350-v1|\
36 engenius,ecb600|\
37 engenius,enh202-v1|\
38 engenius,ens202ext-v1|\
39 engenius,enstationac-v1|\
40 etactica,eg200|\
41 glinet,gl-ar750s-nor|\
42 glinet,gl-ar750s-nor-nand|\
43 librerouter,librerouter-v1|\
44 netgear,ex6400|\
45 netgear,ex7300|\
46 netgear,ex7300-v2|\
47 netgear,wndr4300-v2|\
48 netgear,wndr4500-v3|\
49 netgear,wnr1000-v2|\
50 netgear,wnr2000-v3|\
51 netgear,wnr2200-8m|\
52 netgear,wnr2200-16m|\
53 netgear,wnr612-v2|\
54 ocedo,koala|\
55 ocedo,raccoon|\
56 openmesh,a40|\
57 openmesh,a60|\
58 openmesh,mr600-v1|\
59 openmesh,mr600-v2|\
60 openmesh,mr900-v1|\
61 openmesh,mr900-v2|\
62 openmesh,mr1750-v1|\
63 openmesh,mr1750-v2|\
64 openmesh,om5p|\
65 openmesh,om5p-an|\
66 openmesh,om5p-ac-v1|\
67 openmesh,om5p-ac-v2|\
68 samsung,wam250|\
69 ubnt,nanostation-m|\
70 watchguard,ap200|\
71 watchguard,ap300|\
72 yuncore,a770|\
73 yuncore,a782|\
74 yuncore,a930|\
75 yuncore,xd3200|\
76 yuncore,xd4200|\
77 ziking,cpe46b|\
78 zyxel,nbg6616)
79 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
80 ;;
81 buffalo,wzr-hp-ag300h)
82 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
83 ;;
84 buffalo,wzr-hp-g300nh-rb|\
85 buffalo,wzr-hp-g300nh-s)
86 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
87 ;;
88 domywifi,dw33d)
89 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
90 ;;
91 dongwon,dw02-412h-64m|\
92 dongwon,dw02-412h-128m|\
93 glinet,gl-ar300m-lite|\
94 glinet,gl-ar300m-nand|\
95 glinet,gl-ar300m-nor|\
96 glinet,gl-ar300m16)
97 idx="$(find_mtd_index u-boot-env)"
98 [ -n "$idx" ] && \
99 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
100 ;;
101 glinet,gl-ar150)
102 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
103 ;;
104 netgear,wndr3700|\
105 netgear,wndr3700-v2|\
106 netgear,wndrmac-v1)
107 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
108 ;;
109 netgear,pgzng1|\
110 netgear,wndr3700-v4|\
111 netgear,wndr4300|\
112 netgear,wndr4300tn|\
113 netgear,wndr4300sw)
114 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
115 ;;
116 openmesh,om2p-v1|\
117 openmesh,om2p-v2|\
118 openmesh,om2p-v4|\
119 openmesh,om2p-hs-v1|\
120 openmesh,om2p-hs-v2|\
121 openmesh,om2p-hs-v3|\
122 openmesh,om2p-hs-v4|\
123 openmesh,om2p-lc|\
124 plasmacloud,pa300|\
125 plasmacloud,pa300e)
126 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
127 ;;
128 qihoo,c301)
129 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
130 ;;
131 ruckus,zf7321|\
132 ruckus,zf7372)
133 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x40000" "0x10000"
134 ;;
135 sophos,ap15|\
136 sophos,ap55|\
137 sophos,ap55c|\
138 sophos,ap100|\
139 sophos,ap100c)
140 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
141 ;;
142 wallys,dr531)
143 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
144 ;;
145 zte,mf286|\
146 zte,mf286a|\
147 zte,mf286r)
148 ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x10000"
149 ;;
150 esac
151
152 config_load ubootenv
153 config_foreach ubootenv_add_app_config ubootenv
154
155 exit 0