Skip to contentSkip to conversation

ARM: imx: imx8mn-evk: change environment address variables

PATCH New Heiko Thiery 2 participants 2 messages Feb 24, 2022 – Apr 22, 2022 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: imx: imx8mn-evk: change environment address variables

Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB. To have enough space to load kernel images bigger than 32MB change the variables to a feasible value.

The new environment variables layout is based on the scheme from "include/configs/ti_armv7_common.h".

The CONFIG_SYS_LOAD_ADDR value is set to 0x42000000. With that we have the same value as for the kernel_addr_r.

---
v2:
- fixed typo and removed added empty lines (thanks to Peng Fan)

 configs/imx8mn_ddr4_evk_defconfig |  2 +-
 configs/imx8mn_evk_defconfig      |  2 +-
 include/configs/imx8mn_evk.h      | 16 ++++++++++++----
 3 files changed, 14 insertions(+), 6 deletions(-)
configs/imx8mn_ddr4_evk_defconfig +1 -1
index 27bf5ec05a..c13885ab5e 100644
@@ -18,7 +18,7 @@ CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_LOAD_ADDR=0x40480000
+CONFIG_SYS_LOAD_ADDR=0x42000000
 CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
configs/imx8mn_evk_defconfig +1 -1
index 807d126b21..95ac6f85fa 100644
@@ -20,7 +20,7 @@ CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
 CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_LOAD_ADDR=0x40480000
+CONFIG_SYS_LOAD_ADDR=0x42000000
 CONFIG_FIT=y
 CONFIG_FIT_EXTERNAL_OFFSET=0x3000
 CONFIG_SPL_LOAD_FIT=y
include/configs/imx8mn_evk.h +12 -4
index 142fc3e4ff..3796fe2851 100644
@@ -39,19 +39,27 @@
 #endif
 
 /* Initial environment variables */
+/* see include/configs/ti_armv7_common.h */
+#define ENV_MEM_LAYOUT_SETTINGS \
+	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
+	"kernel_addr_r=0x42000000\0" \
+	"fdt_addr_r=0x48000000\0" \
+	"fdtoverlay_addr_r=0x49000000\0" \
+	"ramdisk_addr_r=0x48080000\0" \
+	"initrd_addr=0x48080000\0" \
+	"scriptaddr=0x40000000\0" \
+	"pxefile_addr_r=0x40100000\0"
+
 #define CONFIG_EXTRA_ENV_SETTINGS		\
 	"image=Image\0" \
 	BOOTENV \
-	"scriptaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
-	"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
 	"console=ttymxc1,115200\0" \
-	"fdt_addr_r=0x43000000\0"			\
 	"boot_fit=no\0" \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
-	"initrd_addr=0x43800000\0"		\
 	"bootm_size=0x10000000\0" \
 	"mmcpart=1\0" \
 	"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
+	ENV_MEM_LAYOUT_SETTINGS
 
 /* Link Definitions */
 
Signature · 1 line
2.30.2
#1 lore raw

PATCH v2 1/1 ARM: imx: imx8mn-evk: change environment address variables

Quoted 9 lines

Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB. To have enough space to load kernel images bigger than 32MB change the variables to a feasible value.
The new environment variables layout is based on the scheme from "include/configs/ti_armv7_common.h".
The CONFIG_SYS_LOAD_ADDR value is set to 0x42000000. With that we have the same value as for the kernel_addr_r.

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: [email protected]
=====================================================================