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|\
49 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
51 beeline,smartbox-pro|\
54 idx="$(find_mtd_index u-boot-env)"
56 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
62 mediatek,linkit-smart-7688|\
63 samknows,whitebox-v8|\
68 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
82 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
86 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
87 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
91 idx="$(find_mtd_index u-boot-env)"
93 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
95 beeline,smartbox-flash|\
104 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
107 snr,snr-cpe-me2-sfp|\
109 idx="$(find_mtd_index uboot-env)"
111 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
114 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
115 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
117 xiaomi,mi-router-3g-v2|\
118 xiaomi,mi-router-4a-gigabit|\
120 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
121 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
123 xiaomi,mi-router-3g|\
124 xiaomi,mi-router-3-pro|\
126 xiaomi,mi-router-ac2100|\
127 xiaomi,redmi-router-ac2100)
128 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
129 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
132 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
136 idx="$(find_mtd_index Config)"
138 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
141 xiaomi,mi-router-cr6606|\
142 xiaomi,mi-router-cr6608|\
143 xiaomi,mi-router-cr6609)
144 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
149 config_foreach ubootenv_add_app_config