summaryrefslogtreecommitdiff
path: root/configs/puma-rk3399_defconfig
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2022-10-25 13:58:02 +0300
committerKever Yang <kever.yang@rock-chips.com>2022-12-19 05:56:12 +0300
commitc74f6e748b360b0c88404ce200bc97055c2aef44 (patch)
tree30bcf372a315eb652b0e0935bc6779b9dc7a8c79 /configs/puma-rk3399_defconfig
parent75a364eb05c3fe8482dbdad9e90347238c4e529b (diff)
downloadu-boot-c74f6e748b360b0c88404ce200bc97055c2aef44.tar.xz
rockchip: puma: fix GPT table corruption when saving U-Boot environment
The GPT table is taking the first 34 sectors, which amounts to 0x4400 bytes. Saving the environment below this address in storage will corrupt the GPT table. While technically the table ends at 0x4400, some tools (e.g. bmaptool) are rounding everything to the logical block size (0x1000), so it is safer to make it point to 0x5000 so that the environment could still persist when flashing a sparse image with bmaptool or similar tools. Obviously, the default 0x4000 environment size does not work anymore, so let's set it to 0x3000 so it does fill the gap between the GPT table (rounded to 0x1000) and the start of the idbloader.img. Fixes: 56f580d3eb8d ("rockchip: dts: rk3399-puma: put environment (in MMC/SD configurations) before SPL") Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'configs/puma-rk3399_defconfig')
-rw-r--r--configs/puma-rk3399_defconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig
index c2b0b39c7b..0e77db66db 100644
--- a/configs/puma-rk3399_defconfig
+++ b/configs/puma-rk3399_defconfig
@@ -5,6 +5,7 @@ CONFIG_ARCH_ROCKCHIP=y
CONFIG_TEXT_BASE=0x00200000
CONFIG_SPL_GPIO=y
CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SIZE=0x3000
CONFIG_ENV_OFFSET=0x3F8000
CONFIG_DEFAULT_DEVICE_TREE="rk3399-puma-haikou"
CONFIG_ROCKCHIP_RK3399=y