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 zyxel,keenetic-lite-iii-a)
24 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
27 ubootenv_add_uci_config "/dev/mtd2" "0x0" "0x1000" "0x1000"
33 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
35 ampedwireless,ally-00x19k|\
36 ampedwireless,ally-r1900k)
37 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
39 beeline,smartbox-giga|\
40 beeline,smartbox-turbo|\
43 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
49 mediatek,linkit-smart-7688|\
50 samknows,whitebox-v8|\
55 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
67 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
71 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
72 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
76 idx="$(find_mtd_index u-boot-env)"
78 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
80 beeline,smartbox-flash|\
88 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
93 idx="$(find_mtd_index uboot-env)"
95 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x1000"
98 idx="$(find_mtd_index u-boot-env)"
100 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x20000"
102 xiaomi,mi-router-3g-v2|\
103 xiaomi,mi-router-4a-gigabit|\
105 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
106 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
108 xiaomi,mi-router-3g|\
109 xiaomi,mi-router-3-pro|\
111 xiaomi,mi-router-ac2100|\
112 xiaomi,redmi-router-ac2100)
113 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
114 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
117 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
120 idx="$(find_mtd_index Config)"
122 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
125 xiaomi,mi-router-cr6606|\
126 xiaomi,mi-router-cr6608|\
127 xiaomi,mi-router-cr6609)
128 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
133 config_foreach ubootenv_add_app_config