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