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"
52 mediatek,linkit-smart-7688|\
53 samknows,whitebox-v8|\
58 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
71 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
75 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
76 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
80 idx="$(find_mtd_index u-boot-env)"
82 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
84 beeline,smartbox-flash|\
92 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
97 idx="$(find_mtd_index uboot-env)"
99 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
102 idx="$(find_mtd_index u-boot-env)"
104 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
106 xiaomi,mi-router-3g-v2|\
107 xiaomi,mi-router-4a-gigabit|\
109 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
110 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
112 xiaomi,mi-router-3g|\
113 xiaomi,mi-router-3-pro|\
115 xiaomi,mi-router-ac2100|\
116 xiaomi,redmi-router-ac2100)
117 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
118 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
121 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
124 idx="$(find_mtd_index Config)"
126 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
129 xiaomi,mi-router-cr6606|\
130 xiaomi,mi-router-cr6608|\
131 xiaomi,mi-router-cr6609)
132 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
137 config_foreach ubootenv_add_app_config