ramips: add support for actiontec web7200
[openwrt/staging/nbd.git] / package / boot / uboot-envtools / files / ramips
1 #
2 # Copyright (C) 2011-2012 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 actiontec,web7200)
16 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000"
17 ;;
18 alfa-network,ac1200rm|\
19 alfa-network,awusfree1|\
20 alfa-network,quad-e4g|\
21 alfa-network,r36m-e4g|\
22 alfa-network,tube-e4g|\
23 engenius,epg600|\
24 engenius,esr600h|\
25 linksys,re7000|\
26 meig,slt866|\
27 sitecom,wlr-4100-v1-002|\
28 zyxel,keenetic-lite-iii-a)
29 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
30 ;;
31 alfa-network,ax1800rm|\
32 allnet,all0256n-4m|\
33 allnet,all0256n-8m|\
34 allnet,all5002|\
35 yuncore,ax820)
36 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
37 ;;
38 arcadyan,we420223-99|\
39 dlink,dir-806a-b1)
40 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
41 ;;
42 ampedwireless,ally-00x19k|\
43 ampedwireless,ally-r1900k)
44 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
45 ;;
46 beeline,smartbox-giga|\
47 beeline,smartbox-turbo|\
48 beeline,smartbox-turbo-plus|\
49 etisalat,s3|\
50 rostelecom,rt-fe-1a|\
51 rostelecom,rt-sf-1)
52 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
53 ;;
54 beeline,smartbox-pro|\
55 tplink,ec330-g5u-v1|\
56 wifire,s1500-nbn)
57 idx="$(find_mtd_index u-boot-env)"
58 [ -n "$idx" ] && \
59 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
60 ;;
61 buffalo,wsr-1166dhp|\
62 buffalo,wsr-600dhp|\
63 kroks,kndrt31r16|\
64 kroks,kndrt31r19|\
65 mediatek,linkit-smart-7688|\
66 samknows,whitebox-v8|\
67 xiaomi,mi-router-4c|\
68 xiaomi,miwifi-nano|\
69 zbtlink,zbt-wg2626|\
70 zte,mf283plus)
71 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
72 ;;
73 asus,rt-ax53u|\
74 asus,rt-ax54|\
75 belkin,rt1800|\
76 h3c,tx1800-plus|\
77 h3c,tx1801-plus|\
78 h3c,tx1806|\
79 iptime,ax2004m|\
80 jcg,q20|\
81 linksys,e7350|\
82 netgear,eax12|\
83 netgear,wax202|\
84 zyxel,wsm20)
85 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
86 ;;
87 haier,har-20s2u1|\
88 sim,simax1800t)
89 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
90 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
91 ;;
92 dlink,dir-x1860)
93 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000"
94 ;;
95 hootoo,ht-tm05|\
96 ravpower,rp-wd03)
97 idx="$(find_mtd_index u-boot-env)"
98 [ -n "$idx" ] && \
99 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
100 ;;
101 beeline,smartbox-flash|\
102 iptime,t5004|\
103 linksys,ea6350-v4|\
104 linksys,ea7300-v1|\
105 linksys,ea7300-v2|\
106 linksys,ea7500-v2|\
107 linksys,ea8100-v1|\
108 linksys,ea8100-v2|\
109 mts,wg430223|\
110 ubnt,edgerouter-x|\
111 ubnt,edgerouter-x-sfp)
112 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
113 ;;
114 snr,snr-cpe-me1|\
115 snr,snr-cpe-me2-sfp|\
116 snr,cpe-w4n-mt)
117 idx="$(find_mtd_index uboot-env)"
118 [ -n "$idx" ] && \
119 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
120 ;;
121 xiaomi,miwifi-mini)
122 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
123 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
124 ;;
125 xiaomi,mi-router-3g-v2|\
126 xiaomi,mi-router-4a-gigabit|\
127 xiaomi,miwifi-3c)
128 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
129 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
130 ;;
131 xiaomi,mi-router-3g|\
132 xiaomi,mi-router-3-pro|\
133 xiaomi,mi-router-4|\
134 xiaomi,mi-router-ac2100|\
135 xiaomi,redmi-router-ac2100)
136 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
137 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
138 ;;
139 zyxel,lte3301-plus)
140 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
141 ;;
142 zyxel,lte5398-m904|\
143 zyxel,nr7101)
144 idx="$(find_mtd_index Config)"
145 [ -n "$idx" ] && \
146 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
147 ;;
148 bolt,arion|\
149 xiaomi,mi-router-cr6606|\
150 xiaomi,mi-router-cr6608|\
151 xiaomi,mi-router-cr6609)
152 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
153 ;;
154 esac
155
156 config_load ubootenv
157 config_foreach ubootenv_add_app_config
158
159 exit 0