2 # Copyright (C) 2011-2012 OpenWrt.org
5 [ -e /etc/config/ubootenv ] && exit 0
7 touch /etc/config/ubootenv
9 . /lib/uboot-envtools.sh
16 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x20000" "0x20000"
18 alfa-network,ac1200rm|\
19 alfa-network,awusfree1|\
20 alfa-network,quad-e4g|\
21 alfa-network,r36m-e4g|\
22 alfa-network,tube-e4g|\
27 sitecom,wlr-4100-v1-002|\
28 zyxel,keenetic-lite-iii-a)
29 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
31 alfa-network,ax1800rm|\
36 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
38 arcadyan,we420223-99|\
40 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
42 ampedwireless,ally-00x19k|\
43 ampedwireless,ally-r1900k)
44 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
46 beeline,smartbox-giga|\
47 beeline,smartbox-turbo|\
48 beeline,smartbox-turbo-plus|\
52 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
54 beeline,smartbox-pro|\
57 idx="$(find_mtd_index u-boot-env)"
59 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
65 mediatek,linkit-smart-7688|\
66 samknows,whitebox-v8|\
71 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
87 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
91 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
92 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
95 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000"
99 idx="$(find_mtd_index u-boot-env)"
101 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
103 beeline,smartbox-flash|\
113 ubnt,edgerouter-x-sfp)
114 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
117 snr,snr-cpe-me2-sfp|\
119 idx="$(find_mtd_index uboot-env)"
121 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
124 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
125 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
127 xiaomi,mi-router-3g-v2|\
128 xiaomi,mi-router-4a-gigabit|\
130 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
131 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
133 xiaomi,mi-router-3g|\
134 xiaomi,mi-router-3-pro|\
136 xiaomi,mi-router-ac2100|\
137 xiaomi,redmi-router-ac2100)
138 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
139 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
142 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
146 idx="$(find_mtd_index Config)"
148 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
151 xiaomi,mi-router-cr6606|\
152 xiaomi,mi-router-cr6608|\
153 xiaomi,mi-router-cr6609)
154 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
156 dna,valokuitu-plus-ex400)
157 ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
158 ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
161 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
162 ubootenv_add_uci_sys_config "/dev/mtd1" "0x20000" "0x8000" "0x20000"
167 config_foreach ubootenv_add_app_config