2014-06-29 12:38:35 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2016-10-13 10:52:20 +00:00
|
|
|
# Copyright (C) 2014-2016 OpenWrt.org
|
|
|
|
# Copyright (C) 2016 LEDE-Project.org
|
2014-06-29 12:38:35 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
[ -e /etc/config/ubootenv ] && exit 0
|
|
|
|
|
|
|
|
touch /etc/config/ubootenv
|
|
|
|
|
|
|
|
. /lib/uboot-envtools.sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
|
2017-05-12 20:36:07 +00:00
|
|
|
board=$(board_name)
|
2014-06-29 12:38:35 +00:00
|
|
|
|
|
|
|
case "$board" in
|
2019-05-11 17:37:34 +00:00
|
|
|
cznic,turris-omnia)
|
2017-06-02 16:31:06 +00:00
|
|
|
ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000"
|
|
|
|
;;
|
2018-04-24 06:25:21 +00:00
|
|
|
globalscale,espressobin|\
|
2019-06-07 13:50:50 +00:00
|
|
|
globalscale,espressobin-emmc|\
|
|
|
|
globalscale,espressobin-v7|\
|
|
|
|
globalscale,espressobin-v7-emmc|\
|
2018-04-24 06:25:21 +00:00
|
|
|
marvell,armada8040-mcbin)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
|
|
|
|
;;
|
2019-05-11 17:37:34 +00:00
|
|
|
linksys,caiman|\
|
|
|
|
linksys,cobra|\
|
|
|
|
linksys,shelby)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
|
|
|
|
;;
|
|
|
|
linksys,mamba)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
|
|
|
|
;;
|
|
|
|
linksys,rango|\
|
|
|
|
linksys,venom)
|
|
|
|
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
|
|
|
|
;;
|
2014-06-29 12:38:35 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
config_load ubootenv
|
|
|
|
config_foreach ubootenv_add_app_config ubootenv
|
|
|
|
|
|
|
|
exit 0
|