ramips: add support for Rostelecom RT-SF-1
[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,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 rostelecom,rt-sf-1)
37 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
38 ;;
39 buffalo,wsr-1166dhp|\
40 buffalo,wsr-600dhp|\
41 kroks,kndrt31r16|\
42 kroks,kndrt31r19|\
43 mediatek,linkit-smart-7688|\
44 samknows,whitebox-v8|\
45 xiaomi,mi-router-4c|\
46 xiaomi,miwifi-nano|\
47 zbtlink,zbt-wg2626|\
48 zte,mf283plus)
49 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
50 ;;
51 belkin,rt1800|\
52 h3c,tx1800-plus|\
53 h3c,tx1801-plus|\
54 h3c,tx1806|\
55 jcg,q20|\
56 linksys,e7350|\
57 netgear,wax202)
58 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
59 ;;
60 haier,har-20s2u1|\
61 sim,simax1800t)
62 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
63 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
64 ;;
65 hootoo,ht-tm05|\
66 ravpower,rp-wd03)
67 idx="$(find_mtd_index u-boot-env)"
68 [ -n "$idx" ] && \
69 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
70 ;;
71 beeline,smartbox-flash|\
72 linksys,ea6350-v4|\
73 linksys,ea7300-v1|\
74 linksys,ea7300-v2|\
75 linksys,ea7500-v2|\
76 linksys,ea8100-v1|\
77 linksys,ea8100-v2|\
78 mts,wg430223)
79 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
80 ;;
81 xiaomi,mi-router-3g-v2|\
82 xiaomi,mi-router-4a-gigabit|\
83 xiaomi,miwifi-3c)
84 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
85 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
86 ;;
87 xiaomi,mi-router-3g|\
88 xiaomi,mi-router-3-pro|\
89 xiaomi,mi-router-4|\
90 xiaomi,mi-router-ac2100|\
91 xiaomi,redmi-router-ac2100)
92 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
93 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
94 ;;
95 zyxel,lte3301-plus)
96 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
97 ;;
98 zyxel,nr7101)
99 idx="$(find_mtd_index Config)"
100 [ -n "$idx" ] && \
101 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
102 ;;
103 bolt,arion|\
104 xiaomi,mi-router-cr6606|\
105 xiaomi,mi-router-cr6608|\
106 xiaomi,mi-router-cr6609)
107 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
108 ;;
109 esac
110
111 config_load ubootenv
112 config_foreach ubootenv_add_app_config
113
114 exit 0