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