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