Skip to contentSkip to conversation

kontron-sl-mx8mm: change environment address variables

PATCH New Heiko Thiery 2 participants 4 messages Feb 16, 2022 – Apr 12, 2022 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 kontron-sl-mx8mm: change environment address variables

Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB. To have enought 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.

---
 configs/kontron-sl-mx8mm_defconfig |  2 +-
 include/configs/kontron-sl-mx8mm.h | 15 ++++++++++-----
 2 files changed, 11 insertions(+), 6 deletions(-)
configs/kontron-sl-mx8mm_defconfig +1 -1
index 940bf07a92..030e2251e7 100644
@@ -20,7 +20,7 @@ CONFIG_SPL_SERIAL=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SPL=y
 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/kontron-sl-mx8mm.h +10 -5
index d1e87f97d6..788ae77cd3 100644
@@ -67,15 +67,20 @@
 
 #define FEC_QUIRK_ENET_MAC
 
-#define CONFIG_EXTRA_ENV_SETTINGS \
+#define ENV_MEM_LAYOUT_SETTINGS \
+	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
 	"kernel_addr_r=0x42000000\0" \
-	"fdt_addr_r=0x44000000\0" \
-	"ramdisk_addr_r=0x46400000\0" \
-	"pxefile_addr_r=0x46000000\0" \
-	"scriptaddr=0x46000000\0" \
+	"fdt_addr_r=0x48000000\0" \
+	"fdtoverlay_addr_r=0x49000000\0" \
+	"ramdisk_addr_r=0x48080000\0" \
+	"scriptaddr=0x40000000\0"\
+	"pxefile_addr_r=0x40100000\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
 	"dfu_alt_info=sf 0:0=flash-bin raw 0x400 0x1f0000\0" \
 	"bootdelay=3\0" \
 	"hostname=" CONFIG_HOSTNAME "\0" \
+	ENV_MEM_LAYOUT_SETTINGS \
 	BOOTENV
 
 #endif /* __KONTRON_MX8MM_CONFIG_H */
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/1 kontron-pitx-imx8m: change environment address variables

Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB. To have enought 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.

---
 configs/kontron_pitx_imx8m_defconfig |  2 +-
 include/configs/kontron_pitx_imx8m.h | 13 +++++++------
 2 files changed, 8 insertions(+), 7 deletions(-)
configs/kontron_pitx_imx8m_defconfig +1 -1
index 76430213e3..eeb994c253 100644
@@ -20,7 +20,7 @@ CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_SPL=y
 CONFIG_IMX_BOOTAUX=y
 CONFIG_DISTRO_DEFAULTS=y
-CONFIG_SYS_LOAD_ADDR=0x40480000
+CONFIG_SYS_LOAD_ADDR=0x42000000
 CONFIG_FIT=y
 CONFIG_SPL_FIT_PRINT=y
 CONFIG_SPL_LOAD_FIT=y
include/configs/kontron_pitx_imx8m.h +7 -6
index 0f96b905ab..510ce7906d 100644
@@ -49,12 +49,13 @@
 #endif
 
 #define ENV_MEM_LAYOUT_SETTINGS \
-	"kernel_addr_r=0x40880000\0" \
-	"fdt_addr_r=0x43000000\0" \
-	"scriptaddr=0x43500000\0" \
-	"initrd_addr=0x43800000\0" \
-	"pxefile_addr_r=0x43500000\0" \
-	"bootm_size=0x10000000\0" \
+	"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" \
+	"scriptaddr=0x40000000\0" \
+	"pxefile_addr_r=0x40100000\0"
 
 #define BOOT_TARGET_DEVICES(func) \
 	func(MMC, mmc, 0) \
Signature · 1 line
2.30.2
#2 lore raw

PATCH 1/1 kontron-pitx-imx8m: change environment address variables

Quoted 8 lines

Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB. To have enought 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]
=====================================================================
#3 lore raw

PATCH v2 1/1 kontron-sl-mx8mm: change environment address variables

In reply to Heiko Thiery
Quoted 9 lines

Currently the space between kernel_addr_r and the fdt_addr_r is only 32MB. To have enought 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]
=====================================================================