2017-09-06 19:19:45 +08:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2011-2012 OpenWrt.org
|
|
|
|
#
|
|
|
|
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
|
|
|
|
. /lib/uboot-envtools.sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
2018-01-15 18:26:41 +08:00
|
|
|
board=$(board_name)
|
2017-09-06 19:19:45 +08:00
|
|
|
|
|
|
|
case "$board" in
|
2018-04-23 18:50:49 +08:00
|
|
|
alfa-network,ac1200rm|\
|
2019-03-20 14:38:13 +08:00
|
|
|
alfa-network,awusfree1|\
|
2019-12-10 19:48:48 -08:00
|
|
|
alfa-network,quad-e4g|\
|
|
|
|
alfa-network,r36m-e4g|\
|
2019-03-20 14:38:13 +08:00
|
|
|
alfa-network,tube-e4g)
|
2018-04-23 18:50:49 +08:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
|
|
|
|
;;
|
2020-02-06 21:45:40 +08:00
|
|
|
allnet,all0256n-4m|\
|
|
|
|
allnet,all0256n-8m|\
|
|
|
|
allnet,all5002)
|
2017-09-06 19:19:45 +08:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
|
|
|
|
;;
|
2020-02-06 21:45:40 +08:00
|
|
|
buffalo,wsr-1166dhp|\
|
|
|
|
buffalo,wsr-600dhp|\
|
|
|
|
mediatek,linkit-smart-7688|\
|
|
|
|
samknows,whitebox-v8|\
|
|
|
|
xiaomi,miwifi-nano|\
|
|
|
|
zbtlink,zbt-wg2626)
|
2017-09-06 19:19:45 +08:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
|
|
|
|
;;
|
2020-05-22 10:53:12 +08:00
|
|
|
linksys,ea7500-v2|\
|
2019-03-20 14:38:13 +08:00
|
|
|
xiaomi,mir3p|\
|
2020-03-17 01:39:45 +08:00
|
|
|
xiaomi,mir3g|\
|
2020-05-01 12:23:28 +08:00
|
|
|
xiaomi,redmi-router-ac2100)
|
2018-01-15 18:26:41 +08:00
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
|
|
|
|
;;
|
2017-09-06 19:19:45 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
config_load ubootenv
|
|
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
|
|
|
|
exit 0
|