Skip to contentSkip to conversation

msc_sm2s_imx8mp: Adjust the initrd_addr location

PATCH Applied Fabio Estevam 2 participants 3 messages Jul 4, 2024 – Jul 6, 2024 Arm i.MX and Layerscape

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH v2 1/1 msc_sm2s_imx8mp: Adjust the initrd_addr location

From: Fabio Estevam <[email protected]>

Booting an initramfs with the current initrd_addr address may lead to initramfs corruption and boot failure.

Fix the initramfs problem by applying the following layout suggested by Tom Rini:

loadaddr=0x40480000 --> Gets moved to 0x40600000 in run-time:

Uncompressing Kernel Image
Moving Image from 0x40480000 to 0x40600000, end=41e80000

fdt_addr_r= moved loadaddr + 128 MiB = 0x48600000

initrd_addr=fdt_addr_r + 512 KiB = 0x48680000

---
Changes since v2:
- Apply Tom's suggested layout.
- Added Stefano's Tested-by.

 include/configs/msc_sm2s_imx8mp.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/configs/msc_sm2s_imx8mp.h +2 -2
index 3c7d96cb3c0..d0c5da7b98d 100644
@@ -36,10 +36,10 @@
 	"kernel_addr_r=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
 	"image=Image\0" \
 	"console=ttymxc1,115200\0" \
-	"fdt_addr_r=0x43000000\0"			\
+	"fdt_addr_r=0x48600000\0"			\
 	"boot_fdt=try\0" \
 	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
-	"initrd_addr=0x43800000\0"		\
+	"initrd_addr=0x48680000\0"		\
 	"bootm_size=0x10000000\0" \
 	"mmcpart=1\0" \
 	"mmcroot=/dev/mmcblk1p2 rootwait rw\0" \
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 13 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Booting an initramfs with the current initrd_addr address may lead to initramfs corruption and boot failure.

Fix the initramfs problem by applying the following layout suggested by Tom Rini:

loadaddr=0x40480000 --> Gets moved to 0x40600000 in run-time:

Uncompressing Kernel Image
Moving Image from 0x40480000 to 0x40600000, end=41e80000

Quoted 6 lines

fdt_addr_r= moved loadaddr + 128 MiB = 0x48600000

initrd_addr=fdt_addr_r + 512 KiB = 0x48680000

Signature · 1 line
Tom
author reviewer Applied
#2 lore raw
In reply to Fabio Estevam
Quoted 14 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

Booting an initramfs with the current initrd_addr address may lead to initramfs corruption and boot failure.

Fix the initramfs problem by applying the following layout suggested by Tom Rini:

loadaddr=0x40480000 --> Gets moved to 0x40600000 in run-time:

Uncompressing Kernel Image
Moving Image from 0x40480000 to 0x40600000, end=41e80000

Quoted 6 lines

fdt_addr_r= moved loadaddr + 128 MiB = 0x48600000

initrd_addr=fdt_addr_r + 512 KiB = 0x48680000

Applied, thanks.