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"
28 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
34 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
36 ampedwireless,ally-00x19k|\
37 ampedwireless,ally-r1900k)
38 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
40 beeline,smartbox-giga|\
41 beeline,smartbox-turbo|\
42 beeline,smartbox-turbo-plus|\
45 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
47 beeline,smartbox-pro|\
50 idx="$(find_mtd_index u-boot-env)"
52 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
58 mediatek,linkit-smart-7688|\
59 samknows,whitebox-v8|\
64 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
76 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
80 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
81 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
85 idx="$(find_mtd_index u-boot-env)"
87 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
89 beeline,smartbox-flash|\
97 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
100 snr,snr-cpe-me2-sfp|\
102 idx="$(find_mtd_index uboot-env)"
104 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
107 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
108 ubootenv_add_uci_sys_config "/dev/mtd9" "0x0" "0x4000" "0x10000"
110 xiaomi,mi-router-3g-v2|\
111 xiaomi,mi-router-4a-gigabit|\
113 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
114 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
116 xiaomi,mi-router-3g|\
117 xiaomi,mi-router-3-pro|\
119 xiaomi,mi-router-ac2100|\
120 xiaomi,redmi-router-ac2100)
121 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
122 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
125 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
128 idx="$(find_mtd_index Config)"
130 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
133 xiaomi,mi-router-cr6606|\
134 xiaomi,mi-router-cr6608|\
135 xiaomi,mi-router-cr6609)
136 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
141 config_foreach ubootenv_add_app_config