Skip to contentSkip to conversation

armv8: fsl : create bootcmd and mcinitcmd as per boot source

PATCH Superseded Wasim Khan 2 participants 3 messages Jul 8, 2021 – Jul 20, 2021 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Wasim Khan

author
#0 lore raw

PATCH 1/1 armv8: fsl : create bootcmd and mcinitcmd as per boot source

From: Wasim Khan <[email protected]>

NXP platforms expect custom bootcmd and mcinitcmd to be updated as per boot source with default environment. Check env variable fsl_bootcmd_mcinitcmd_set to prepare bootcmd and mcinitcmd

Fixes cbf77d2018

---
 arch/arm/cpu/armv8/fsl-layerscape/soc.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/soc.c +6 -3
index c3cd6c7ac7..f804a7f68d 100644
@@ -953,12 +953,15 @@ int board_late_init(void)
 #endif
 #ifdef CONFIG_TFABOOT
 	/*
-	 * Set bootcmd and mcinitcmd if they don't exist in the environment.
+	 * Set bootcmd and mcinitcmd if "fsl_bootcmd_mcinitcmd_set" does
+	 * not exists in env
 	 */
-	if (!env_get("bootcmd"))
+	if (env_get_yesno("fsl_bootcmd_mcinitcmd_set") <= 0) {
+		// Set bootcmd and mcinitcmd as per boot source
 		fsl_setenv_bootcmd();
-	if (!env_get("mcinitcmd"))
 		fsl_setenv_mcinitcmd();
+		env_set("fsl_bootcmd_mcinitcmd_set", "y");
+	}
 #endif
 #ifdef CONFIG_QSPI_AHB_INIT
 	qspi_ahb_init();
Signature · 1 line
2.25.1
#1 lore raw
Quoted 47 lines

-----Original Message-----
From: Wasim Khan (OSS) <[email protected]>
Sent: Thursday, July 8, 2021 12:36 PM
To: Priyanka Jain <[email protected]>; Varun Sethi <[email protected]>; Bedel, Alban <[email protected]>
Cc: [email protected]; Wasim Khan <[email protected]>
Subject: [PATCH] armv8: fsl : create bootcmd and mcinitcmd as per boot source

From: Wasim Khan <[email protected]>

NXP platforms expect custom bootcmd and mcinitcmd to be updated as per boot source with default environment.
Check env variable fsl_bootcmd_mcinitcmd_set to prepare bootcmd and mcinitcmd

Fixes cbf77d2018

---
arch/arm/cpu/armv8/fsl-layerscape/soc.c | 9 ++++++---

1 file changed, 6 insertions(+), 3 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/soc.c +0 -0
index c3cd6c7ac7..f804a7f68d 100644
@@ -953,12 +953,15 @@ int board_late_init(void)  #endif  #ifdef

CONFIG_TFABOOT

	/*
arch/arm/cpu/armv8/fsl-layerscape/soc.c +2 -1
-	 * Set bootcmd and mcinitcmd if they don't exist in the environment.
+	 * Set bootcmd and mcinitcmd if "fsl_bootcmd_mcinitcmd_set" does
+	 * not exists in env
	 */
arch/arm/cpu/armv8/fsl-layerscape/soc.c +2 -1
-	if (!env_get("bootcmd"))
+	if (env_get_yesno("fsl_bootcmd_mcinitcmd_set") <= 0) {
+		// Set bootcmd and mcinitcmd as per boot source
		fsl_setenv_bootcmd();
arch/arm/cpu/armv8/fsl-layerscape/soc.c +0 -1
-	if (!env_get("mcinitcmd"))
		fsl_setenv_mcinitcmd();
arch/arm/cpu/armv8/fsl-layerscape/soc.c +2 -0
+		env_set("fsl_bootcmd_mcinitcmd_set", "y");
+	}

#endif

Quoted 4 lines
#ifdef CONFIG_QSPI_AHB_INIT
	qspi_ahb_init();

--
2.25.1

Alban,

Is it possible for you to test this if it works fine in your environment?

Regards
Priyanka

#2 lore raw
Quoted 31 lines

-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Priyanka Jain
Sent: Monday, July 12, 2021 1:37 PM
To: Wasim Khan (OSS) <[email protected]>; Varun Sethi <[email protected]>; Bedel, Alban <[email protected]>
Cc: [email protected]; Wasim Khan <[email protected]>
Subject: RE: [PATCH] armv8: fsl : create bootcmd and mcinitcmd as per boot source

Quoted 18 lines

-----Original Message-----
From: Wasim Khan (OSS) <[email protected]>
Sent: Thursday, July 8, 2021 12:36 PM
To: Priyanka Jain <[email protected]>; Varun Sethi <[email protected]>; Bedel, Alban <[email protected]>
Cc: [email protected]; Wasim Khan <[email protected]>
Subject: [PATCH] armv8: fsl : create bootcmd and mcinitcmd as per boot source

From: Wasim Khan <[email protected]>

NXP platforms expect custom bootcmd and mcinitcmd to be updated as per boot source with default environment.
Check env variable fsl_bootcmd_mcinitcmd_set to prepare bootcmd and mcinitcmd

Fixes cbf77d2018

<snip>
Kindly update commit it with commit details as well as per patch guidelines.

Regards
Priyanka