Skip to contentSkip to conversation

smegw01: Use CONFIG_SYS_LOAD_ADDR for loading fitImage

PATCH New Fabio Estevam 2 participants 2 messages Sep 20, 2023 – Sep 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smegw01: Use CONFIG_SYS_LOAD_ADDR for loading fitImage

From: Eduard Strehlau <[email protected]>

Set CONFIG_SYS_LOAD_ADDR=0x88000000 and use this address for loading fitImage.

Also pass the standard CONFIG_BOOTFILE option to indicate the fitImage file.

---
 board/storopack/smegw01/smegw01.env | 14 +++++++-------
 configs/smegw01_defconfig           |  3 +++
 2 files changed, 10 insertions(+), 7 deletions(-)
board/storopack/smegw01/smegw01.env +7 -7
index 1263ddac8ed0..528310dd810f 100644
@@ -48,13 +48,8 @@ commit_mmc=
 		saveenv;
 	fi;
 console=ttymxc0
-fdt_addr=0x83000000
-fdtfile=imx7d-smegw01.dtb
-fit_addr=0x88000000
-image=fitImage
-loadaddr=0x80800000
 loadbootpart=mmc partconf 1 boot_part
-loadimage=load mmc ${mmcdev}:${gpt_partition_entry} ${fit_addr} boot/${image}
+loadimage=load mmc ${mmcdev}:${gpt_partition_entry}
 loadpart=gpt setenv mmc ${mmcdev} rootfs-${mmcpart_committed}
 mmcargs=
 	setenv bootargs console=${console},${baudrate} root=/dev/mmcblk${mmcdev}p${gpt_partition_entry} rootwait rw SM_ROOT_DEV=${mmcdev} SM_ROOT_PART=${gpt_partition_entry} SM_BOOT_PART=${boot_part}
@@ -71,8 +66,13 @@ mmcboot=
 	else
 		run altbootcmd;
 	fi;
+#ifdef CONFIG_SYS_BOOT_LOCKED
+	hab_auth_img ${fileaddr} ${filesize};
+#else
+	hab_auth_img_or_fail ${fileaddr} ${filesize};
+#endif
 	run mmcargs;
-	if bootm ${fit_addr}; then
+	if bootm; then
 		;
 	else
 		run altbootcmd;
configs/smegw01_defconfig +3 -0
index 7f1b2bee8e16..616038387e27 100644
@@ -14,6 +14,7 @@ CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 CONFIG_IMX_RDC=y
 CONFIG_IMX_BOOTAUX=y
 CONFIG_IMX_HAB=y
+CONFIG_SYS_LOAD_ADDR=0x88000000
 CONFIG_SYS_MEMTEST_START=0x80000000
 CONFIG_SYS_MEMTEST_END=0xa0000000
 CONFIG_FIT=y
@@ -54,6 +55,8 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_DEV=1
 CONFIG_ENV_WRITEABLE_LIST=y
 CONFIG_ENV_ACCESS_IGNORE_FORCE=y
+CONFIG_USE_BOOTFILE=y
+CONFIG_BOOTFILE="boot/fitImage"
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_BOUNCE_BUFFER=y
 CONFIG_BOOTCOUNT_LIMIT=y
Signature · 1 line
2.34.1
#1 lore raw

PATCH 1/1 smegw01: Use CONFIG_SYS_LOAD_ADDR for loading fitImage

Quoted 7 lines

From: Eduard Strehlau <[email protected]>
Set CONFIG_SYS_LOAD_ADDR=0x88000000 and use this address for loading fitImage.
Also pass the standard CONFIG_BOOTFILE option to indicate the fitImage file.

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

Best regards,
Stefano Babic

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