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"
27 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
29 ampedwireless,ally-00x19k|\
30 ampedwireless,ally-r1900k)
31 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000" "4"
35 mediatek,linkit-smart-7688|\
36 samknows,whitebox-v8|\
37 xiaomi,mi-router-3g-v2|\
38 xiaomi,mi-router-4a-gigabit|\
44 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
48 idx="$(find_mtd_index u-boot-env)"
50 ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
53 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
55 beeline,smartbox-flash|\
63 xiaomi,mi-router-3-pro|\
65 xiaomi,mi-router-ac2100|\
66 xiaomi,redmi-router-ac2100)
67 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
70 idx="$(find_mtd_index Config)"
72 ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x1000" "0x80000"
74 xiaomi,mi-router-cr6606|\
75 xiaomi,mi-router-cr6608|\
76 xiaomi,mi-router-cr6609)
77 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
82 config_foreach ubootenv_add_app_config ubootenv