uboot-envtools: mvebu: fix config for mainline u-boot
[openwrt/staging/chunkeey.git] / package / boot / uboot-envtools / files / mvebu
index c2e746d959c9c219962dd6a5dd1d00a0c0d89829..5af81b0fe1e0aa8347d0d6dc0aa6f6cba2a6a9e2 100644 (file)
@@ -20,7 +20,14 @@ cznic,turris-omnia)
 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)
        ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1"
        ;;