diff options
author | Andre Heider <a.heider@gmail.com> | 2020-09-12 10:28:21 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2020-10-28 23:22:44 +0100 |
commit | 3af9c5fefd8dca95da4899c7bb244b508f49813f (patch) | |
tree | 1ea0c1ac492e55406a8f1c2417960ef9efe996e4 /package/boot/uboot-envtools/files | |
parent | 7fbee0c7b2f6eebced44fd2060fbaac6fc5fd9e5 (diff) | |
download | upstream-3af9c5fefd8dca95da4899c7bb244b508f49813f.tar.gz upstream-3af9c5fefd8dca95da4899c7bb244b508f49813f.tar.bz2 upstream-3af9c5fefd8dca95da4899c7bb244b508f49813f.zip |
uboot-envtools: mvebu: fix config for mainline u-boot
Mainline u-boot dynamically passes the mtd partitions via devicetree:
$ cat /proc/mtd
dev: size erasesize name
mtd0: 003f0000 00001000 "firmware"
mtd1: 00010000 00001000 "u-boot-env"
Add support for this setup.
Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit 60c9a27cbcc6ba00d75b4b592f507237dbfb460f)
Diffstat (limited to 'package/boot/uboot-envtools/files')
-rw-r--r-- | package/boot/uboot-envtools/files/mvebu | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index c2e746d959..5af81b0fe1 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -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" ;; |