2 # Copyright (C) 2011-2012 OpenWrt.org
5 [ -e /etc/config/ubootenv ] && exit 0
7 touch /etc/config/ubootenv
9 . /lib/uboot-envtools.sh
15 alfa-network,ac1200rm|\
16 alfa-network,awusfree1|\
17 alfa-network,quad-e4g|\
18 alfa-network,r36m-e4g|\
19 alfa-network,tube-e4g|\
24 sitecom,wlr-4100-v1-002|\
25 zyxel,keenetic-lite-iii-a)
26 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
28 alfa-network,ax1800rm|\
33 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
35 arcadyan,we420223-99|\
37 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
39 ampedwireless,ally-00x19k|\
40 ampedwireless,ally-r1900k)
41 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
43 beeline,smartbox-giga|\
44 beeline,smartbox-turbo|\
45 beeline,smartbox-turbo-plus|\
48 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
50 beeline,smartbox-pro|\
53 idx="$(find_mtd_index u-boot-env)"
55 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
61 mediatek,linkit-smart-7688|\
62 samknows,whitebox-v8|\
67 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
80 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
84 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
85 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
89 idx="$(find_mtd_index u-boot-env)"
91 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
93 beeline,smartbox-flash|\
101 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
104 snr,snr-cpe-me2-sfp|\
106 idx="$(find_mtd_index uboot-env)"
108 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
111 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
112 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
114 xiaomi,mi-router-3g-v2|\
115 xiaomi,mi-router-4a-gigabit|\
117 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
118 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
120 xiaomi,mi-router-3g|\
121 xiaomi,mi-router-3-pro|\
123 xiaomi,mi-router-ac2100|\
124 xiaomi,redmi-router-ac2100)
125 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
126 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
129 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
133 idx="$(find_mtd_index Config)"
135 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
138 xiaomi,mi-router-cr6606|\
139 xiaomi,mi-router-cr6608|\
140 xiaomi,mi-router-cr6609)
141 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
146 config_foreach ubootenv_add_app_config