uboot-envtools: mvebu: fix config for mainline u-boot
[openwrt/openwrt.git] / package / boot / uboot-envtools / files / mvebu
index 1d3b79b96226762e5896420de4c743985d141362..85101cf35be2a7195c76ac5fe8ad3783f7970c27 100644 (file)
@@ -27,7 +27,14 @@ glinet,gl-mv1000)
 globalscale,espressobin|\
 globalscale,espressobin-emmc|\
 globalscale,espressobin-v7|\
-globalscale,espressobin-v7-emmc|\
+globalscale,espressobin-v7-emmc)
+       idx="$(find_mtd_index u-boot-env)"
+       if [ -n "$idx" ]; then
+               ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
+       else
+               ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
+       fi
+       ;;
 marvell,armada8040-mcbin-doubleshot|\
 marvell,armada8040-mcbin-singleshot)
        ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"