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