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|\
21 sitecom,wlr-4100-v1-002)
22 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
28 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
30 ampedwireless,ally-00x19k|\
31 ampedwireless,ally-r1900k)
32 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
34 beeline,smartbox-giga|\
35 beeline,smartbox-turbo|\
38 ubootenv_add_uci_config "/dev/mtd0" "0x80000" "0x1000" "0x20000"
44 mediatek,linkit-smart-7688|\
45 samknows,whitebox-v8|\
50 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
59 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
63 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
64 ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
68 idx="$(find_mtd_index u-boot-env)"
70 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
72 beeline,smartbox-flash|\
80 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
82 xiaomi,mi-router-3g-v2|\
83 xiaomi,mi-router-4a-gigabit|\
85 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
86 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x10000"
89 xiaomi,mi-router-3-pro|\
91 xiaomi,mi-router-ac2100|\
92 xiaomi,redmi-router-ac2100)
93 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
94 ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x4000" "0x20000"
97 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
100 idx="$(find_mtd_index Config)"
102 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
105 xiaomi,mi-router-cr6606|\
106 xiaomi,mi-router-cr6608|\
107 xiaomi,mi-router-cr6609)
108 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
113 config_foreach ubootenv_add_app_config