ath79: support ZTE MF286
[openwrt/openwrt.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 allnet,all-wap02860ac|\
22 arduino,yun|\
23 buffalo,bhr-4grv2|\
24 devolo,magic-2-wifi|\
25 engenius,eap1200h|\
26 engenius,eap300-v2|\
27 engenius,eap350-v1|\
28 engenius,eap600|\
29 engenius,ecb1200|\
30 engenius,ecb1750|\
31 engenius,ecb350-v1|\
32 engenius,ecb600|\
33 engenius,enh202-v1|\
34 engenius,ens202ext-v1|\
35 engenius,enstationac-v1|\
36 etactica,eg200|\
37 glinet,gl-ar750s-nor|\
38 glinet,gl-ar750s-nor-nand|\
39 librerouter,librerouter-v1|\
40 netgear,ex6400|\
41 netgear,ex7300|\
42 netgear,wndr4300-v2|\
43 netgear,wndr4500-v3|\
44 netgear,wnr1000-v2|\
45 netgear,wnr2000-v3|\
46 netgear,wnr2200-8m|\
47 netgear,wnr2200-16m|\
48 netgear,wnr612-v2|\
49 ocedo,koala|\
50 ocedo,raccoon|\
51 openmesh,a40|\
52 openmesh,a60|\
53 openmesh,mr600-v1|\
54 openmesh,mr600-v2|\
55 openmesh,mr900-v1|\
56 openmesh,mr900-v2|\
57 openmesh,mr1750-v1|\
58 openmesh,mr1750-v2|\
59 openmesh,om5p|\
60 openmesh,om5p-an|\
61 openmesh,om5p-ac-v1|\
62 openmesh,om5p-ac-v2|\
63 samsung,wam250|\
64 ubnt,nanostation-m|\
65 yuncore,a770|\
66 yuncore,a782|\
67 yuncore,xd4200|\
68 ziking,cpe46b|\
69 zyxel,nbg6616)
70 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
71 ;;
72 buffalo,wzr-hp-ag300h)
73 ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x10000"
74 ;;
75 buffalo,wzr-hp-g300nh-rb|\
76 buffalo,wzr-hp-g300nh-s)
77 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
78 ;;
79 domywifi,dw33d)
80 ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
81 ;;
82 dongwon,dw02-412h-64m|\
83 dongwon,dw02-412h-128m|\
84 glinet,gl-ar300m-lite|\
85 glinet,gl-ar300m-nand|\
86 glinet,gl-ar300m-nor|\
87 glinet,gl-ar300m16)
88 idx="$(find_mtd_index u-boot-env)"
89 [ -n "$idx" ] && \
90 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
91 ;;
92 glinet,gl-ar150)
93 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
94 ;;
95 netgear,wndr3700|\
96 netgear,wndr3700-v2|\
97 netgear,wndrmac-v1)
98 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x10000"
99 ;;
100 netgear,wndr3700-v4|\
101 netgear,wndr4300|\
102 netgear,wndr4300tn|\
103 netgear,wndr4300sw)
104 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
105 ;;
106 openmesh,om2p-v1|\
107 openmesh,om2p-v2|\
108 openmesh,om2p-v4|\
109 openmesh,om2p-hs-v1|\
110 openmesh,om2p-hs-v2|\
111 openmesh,om2p-hs-v3|\
112 openmesh,om2p-hs-v4|\
113 openmesh,om2p-lc|\
114 plasmacloud,pa300|\
115 plasmacloud,pa300e)
116 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x40000"
117 ;;
118 qihoo,c301)
119 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x10000" "0x10000"
120 ;;
121 wallys,dr531)
122 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000"
123 ;;
124 zte,mf286)
125 ubootenv_add_uci_config "/dev/mtd9" "0x0" "0x20000" "0x10000"
126 ;;
127 esac
128
129 config_load ubootenv
130 config_foreach ubootenv_add_app_config ubootenv
131
132 exit 0