44 lines
752 B
Plaintext
Raw Normal View History

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
alfa-network,ac1200rm|\
alfa-network,awusfree1|\
alfa-network,tube-e4g)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000"
;;
2018-01-15 18:26:41 +08:00
all0256n-4M|\
all0256n-8M|\
2017-09-06 19:19:45 +08:00
all5002)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;;
linkits7688|\
miwifi-nano|\
sk-wb8|\
wsr-1166|\
wsr-600|\
zbt-wg2626)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
;;
xiaomi,mir3p|\
mir3g)
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