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 alfa-network,ax1800rm|\
32 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
34 arcadyan,we420223-99|\
36 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
38 ampedwireless,ally-00x19k|\
39 ampedwireless,ally-r1900k)
40 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
42 beeline,smartbox-giga|\
43 beeline,smartbox-turbo|\
44 beeline,smartbox-turbo-plus|\
47 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
49 beeline,smartbox-pro|\
52 idx="$(find_mtd_index u-boot-env)"
54 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
60 mediatek,linkit-smart-7688|\
61 samknows,whitebox-v8|\
66 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
79 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
83 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
84 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
88 idx="$(find_mtd_index u-boot-env)"
90 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
92 beeline,smartbox-flash|\
100 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
103 snr,snr-cpe-me2-sfp|\
105 idx="$(find_mtd_index uboot-env)"
107 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
110 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
111 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
113 xiaomi,mi-router-3g-v2|\
114 xiaomi,mi-router-4a-gigabit|\
116 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
117 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
119 xiaomi,mi-router-3g|\
120 xiaomi,mi-router-3-pro|\
122 xiaomi,mi-router-ac2100|\
123 xiaomi,redmi-router-ac2100)
124 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
125 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
128 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
132 idx="$(find_mtd_index Config)"
134 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
137 xiaomi,mi-router-cr6606|\
138 xiaomi,mi-router-cr6608|\
139 xiaomi,mi-router-cr6609)
140 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
145 config_foreach ubootenv_add_app_config