ath79: add support for Yuncore XD3200
[openwrt/staging/stintel.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 yuncore,a770|\
71 yuncore,a782|\
72 yuncore,xd3200|\
73 yuncore,xd4200|\
74 ziking,cpe46b|\
75 zyxel,nbg6616)
76 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
77 ;;
78 buffalo,wzr-hp-ag300h)
79 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
80 ;;
81 buffalo,wzr-hp-g300nh-rb|\
82 buffalo,wzr-hp-g300nh-s)
83 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
84 ;;
85 domywifi,dw33d)
86 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
87 ;;
88 dongwon,dw02-412h-64m|\
89 dongwon,dw02-412h-128m|\
90 glinet,gl-ar300m-lite|\
91 glinet,gl-ar300m-nand|\
92 glinet,gl-ar300m-nor|\
93 glinet,gl-ar300m16)
94 idx="$(find_mtd_index u-boot-env)"
95 [ -n "$idx" ] && \
96 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
97 ;;
98 glinet,gl-ar150)
99 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
100 ;;
101 netgear,wndr3700|\
102 netgear,wndr3700-v2|\
103 netgear,wndrmac-v1)
104 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
105 ;;
106 netgear,wndr3700-v4|\
107 netgear,wndr4300|\
108 netgear,wndr4300tn|\
109 netgear,wndr4300sw)
110 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
111 ;;
112 openmesh,om2p-v1|\
113 openmesh,om2p-v2|\
114 openmesh,om2p-v4|\
115 openmesh,om2p-hs-v1|\
116 openmesh,om2p-hs-v2|\
117 openmesh,om2p-hs-v3|\
118 openmesh,om2p-hs-v4|\
119 openmesh,om2p-lc|\
120 plasmacloud,pa300|\
121 plasmacloud,pa300e)
122 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
123 ;;
124 qihoo,c301)
125 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
126 ;;
127 wallys,dr531)
128 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
129 ;;
130 zte,mf286|\
131 zte,mf286a|\
132 zte,mf286r)
133 ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x10000"
134 ;;
135 esac
136
137 config_load ubootenv
138 config_foreach ubootenv_add_app_config ubootenv
139
140 exit 0