[1/2] configs: imx8mn_bsh_smm_s2: Add nand enviroment support

Message ID 20211115115938.33697-1-michael@amarulasolutions.com
State New
Headers show
Series
  • [1/2] configs: imx8mn_bsh_smm_s2: Add nand enviroment support
Related show

Commit Message

Michael Trimarchi Nov. 15, 2021, 11:59 a.m. UTC
Re-arrange the partition size and strip them out. nandboot
should have a space to hold two copies of imx-boot. 16mb
for each part it's more then enough to handle both size.
Move the nandkernel in the second half and allocate space
for nand enviroment partitions

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 configs/imx8mn_bsh_smm_s2_defconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/configs/imx8mn_bsh_smm_s2_defconfig b/configs/imx8mn_bsh_smm_s2_defconfig
index 68730b90da..89a5c6b77c 100644
--- a/configs/imx8mn_bsh_smm_s2_defconfig
+++ b/configs/imx8mn_bsh_smm_s2_defconfig
@@ -8,6 +8,7 @@  CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_NR_DRAM_BANKS=1
 CONFIG_ENV_SIZE=0x2000
+CONFIG_ENV_OFFSET=0x5000000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx8mn-bsh-smm-s2"
 CONFIG_SPL_TEXT_BASE=0x912000
@@ -16,6 +17,7 @@  CONFIG_SPL_SERIAL=y
 CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL=y
+CONFIG_ENV_OFFSET_REDUND=5100000
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SYS_LOAD_ADDR=0x40480000
@@ -40,9 +42,12 @@  CONFIG_CMD_USB=y
 CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_MTDPARTS=y
 CONFIG_MTDIDS_DEFAULT="nand0=gpmi-nand"
-CONFIG_MTDPARTS_DEFAULT="gpmi-nand:64m(nandboot),16m(nandfit),32m(nandkernel),1m(nanddtb),8m(nandtee),-(nandrootfs)"
+CONFIG_MTDPARTS_DEFAULT="gpmi-nand:32m(nandboot),32m(nandkernel),16m(nandfit),2m(ubootenv),1m(nanddtb),8m(nandtee),-(nandrootfs)"
 CONFIG_OF_CONTROL=y
 CONFIG_SPL_OF_CONTROL=y
+CONFIG_ENV_IS_NOWHERE=y
+CONFIG_ENV_IS_IN_NAND=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 # CONFIG_NET is not set