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 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
111 ;;
112 snr,snr-cpe-me1|\
113 snr,snr-cpe-me2-sfp|\
114 snr,cpe-w4n-mt)
115 idx="$(find_mtd_index uboot-env)"
116 [ -n "$idx" ] && \
117 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
118 ;;
119 xiaomi,miwifi-mini)
120 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
121 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
122 ;;
123 xiaomi,mi-router-3g-v2|\
124 xiaomi,mi-router-4a-gigabit|\
125 xiaomi,miwifi-3c)
126 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
127 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
128 ;;
129 xiaomi,mi-router-3g|\
130 xiaomi,mi-router-3-pro|\
131 xiaomi,mi-router-4|\
132 xiaomi,mi-router-ac2100|\
133 xiaomi,redmi-router-ac2100)
134 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
135 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
136 ;;
137 zyxel,lte3301-plus)
138 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
139 ;;
140 zyxel,lte5398-m904|\
141 zyxel,nr7101)
142 idx="$(find_mtd_index Config)"
143 [ -n "$idx" ] && \
144 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
145 ;;
146 bolt,arion|\
147 xiaomi,mi-router-cr6606|\
148 xiaomi,mi-router-cr6608|\
149 xiaomi,mi-router-cr6609)
150 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
151 ;;
152 esac
153
154 config_load ubootenv
155 config_foreach ubootenv_add_app_config
156
157 exit 0