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