3 # Copyright (C) 2014-2016 OpenWrt.org
4 # Copyright (C) 2016 LEDE-Project.org
7 [ -e /etc/config/ubootenv ] && exit 0
9 touch /etc/config/ubootenv
11 . /lib/uboot-envtools.sh
18 if grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
19 ubootenv_add_uci_config "/dev/mtd0" "0xc0000" "0x10000" "0x40000"
21 ubootenv_add_uci_config "/dev/mtd0" "0xf0000" "0x10000" "0x10000"
24 globalscale,espressobin|\
25 globalscale,espressobin-emmc|\
26 globalscale,espressobin-v7|\
27 globalscale,espressobin-v7-emmc|\
28 marvell,armada8040-mcbin)
29 ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
34 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000"
37 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000"
41 ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
46 config_foreach ubootenv_add_app_config ubootenv