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|\
23 sitecom,wlr-4100-v1-002|\
24 zyxel,keenetic-lite-iii-a)
25 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
27 arcadyan,we420223-99|\
29 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
35 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
37 ampedwireless,ally-00x19k|\
38 ampedwireless,ally-r1900k)
39 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
41 beeline,smartbox-giga|\
42 beeline,smartbox-turbo|\
43 beeline,smartbox-turbo-plus|\
46 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
48 beeline,smartbox-pro|\
51 idx="$(find_mtd_index u-boot-env)"
53 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
59 mediatek,linkit-smart-7688|\
60 samknows,whitebox-v8|\
65 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
78 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
82 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
83 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
87 idx="$(find_mtd_index u-boot-env)"
89 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
91 beeline,smartbox-flash|\
99 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
102 snr,snr-cpe-me2-sfp|\
104 idx="$(find_mtd_index uboot-env)"
106 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
109 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
110 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
112 xiaomi,mi-router-3g-v2|\
113 xiaomi,mi-router-4a-gigabit|\
115 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
116 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
118 xiaomi,mi-router-3g|\
119 xiaomi,mi-router-3-pro|\
121 xiaomi,mi-router-ac2100|\
122 xiaomi,redmi-router-ac2100)
123 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
124 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
127 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
130 idx="$(find_mtd_index Config)"
132 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
135 xiaomi,mi-router-cr6606|\
136 xiaomi,mi-router-cr6608|\
137 xiaomi,mi-router-cr6609)
138 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
143 config_foreach ubootenv_add_app_config