From: Fabio Estevam <[email protected]> Use the final 64 KiB of the first 4 MiB of SPI NOR for two 32 KiB U-Boot environment copies. Place the primary copy at 0x3f0000 and the redundant copy at 0x3f8000.
Both copies are aligned to the 4 KiB erase-sector size and together occupy 0x3f0000 through 0x3fffff. Redundancy protects the environment against power loss or an interrupted update. Signed-off-by: Fabio Estevam <[email protected]> --- Changes since v1: - Improved the commit log. configs/roc-pc-rk3399_defconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configs/roc-pc-rk3399_defconfig b/configs/roc-pc-rk3399_defconfig index 127b71e97917..8ded89c6388b 100644 --- a/configs/roc-pc-rk3399_defconfig +++ b/configs/roc-pc-rk3399_defconfig @@ -7,7 +7,7 @@ CONFIG_SPL_I2C=y CONFIG_NR_DRAM_BANKS=1 CONFIG_SF_DEFAULT_SPEED=30000000 CONFIG_ENV_SIZE=0x8000 -CONFIG_ENV_OFFSET=0x3F8000 +CONFIG_ENV_OFFSET=0x3F0000 CONFIG_ENV_SECT_SIZE=0x1000 CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3399-roc-pc" CONFIG_OF_LIST="rockchip/rk3399-roc-pc rockchip/rk3399-roc-pc-plus" @@ -19,6 +19,7 @@ CONFIG_SYS_LOAD_ADDR=0x800800 CONFIG_SF_DEFAULT_BUS=1 CONFIG_DEBUG_UART_BASE=0xFF1A0000 CONFIG_DEBUG_UART_CLOCK=24000000 +CONFIG_ENV_OFFSET_REDUND=0x3F8000 CONFIG_SPL_SPI_FLASH_SUPPORT=y CONFIG_SPL_SPI=y CONFIG_DEBUG_UART=y @@ -42,6 +43,7 @@ CONFIG_CMD_TIME=y CONFIG_SPL_OF_CONTROL=y CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_ENV_IS_IN_SPI_FLASH=y +CONFIG_ENV_REDUNDANT=y CONFIG_ENV_RELOC_GD_ENV_ADDR=y CONFIG_ROCKCHIP_GPIO=y CONFIG_SYS_I2C_ROCKCHIP=y -- 2.43.0
