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|\
22 sitecom,wlr-4100-v1-002)
23 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
26 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
32 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
34 ampedwireless,ally-00x19k|\
35 ampedwireless,ally-r1900k)
36 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
38 beeline,smartbox-giga|\
39 beeline,smartbox-turbo|\
42 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
48 mediatek,linkit-smart-7688|\
49 samknows,whitebox-v8|\
54 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
65 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
69 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
70 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
74 idx="$(find_mtd_index u-boot-env)"
76 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
78 beeline,smartbox-flash|\
86 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
89 idx="$(find_mtd_index uboot-env)"
91 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
94 idx="$(find_mtd_index u-boot-env)"
96 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
98 xiaomi,mi-router-3g-v2|\
99 xiaomi,mi-router-4a-gigabit|\
101 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
102 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
104 xiaomi,mi-router-3g|\
105 xiaomi,mi-router-3-pro|\
107 xiaomi,mi-router-ac2100|\
108 xiaomi,redmi-router-ac2100)
109 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
110 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
113 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
116 idx="$(find_mtd_index Config)"
118 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
121 xiaomi,mi-router-cr6606|\
122 xiaomi,mi-router-cr6608|\
123 xiaomi,mi-router-cr6609)
124 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
129 config_foreach ubootenv_add_app_config