Skip to contentSkip to conversation

arm: dts: soc64: Add U-boot script in FIT Image

PATCH New Jit Loon Lim 1 participant 2 messages Nov 21, 2022 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm: dts: soc64: Add U-boot script in FIT Image

From: Yau Wai Gan <[email protected]>

HSD #1509829545-1: Build u-boot script in FIT image format to align with binman usage.

---
 arch/arm/dts/socfpga_soc64_fit-u-boot.dtsi | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm/dts/socfpga_soc64_fit-u-boot.dtsi +23 -0
index 84b91e8df0..d72855ea47 100644
@@ -14,6 +14,29 @@
 };
 
 &binman {
+	u-boot-script {
+		filename = "u-boot.scr";
+		fit {
+			description = "FIT image for u-boot script";
+			#address-cells = <1>;
+
+			images {
+				script {
+					description = "U-Boot script";
+					type = "script";
+					compression = "none";
+					data: blob-ext {
+						filename = "u-boot.txt";
+					};
+
+					hash {
+						algo = "crc32";
+					};
+				};
+			};
+		};
+	};
+
 	u-boot {
 		filename = "u-boot.itb";
 		fit {
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 include: configs: soc64: Update source command format

From: Yau Wai Gan <[email protected]>

HSD #1509829545-2: U-boot script is in FIT image, this requires to update the source command to supply the FIT subimage name.

---
 include/configs/socfpga_soc64_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/configs/socfpga_soc64_common.h +1 -1
index 552a922e39..5939f13231 100644
@@ -91,7 +91,7 @@
 	"scriptaddr=0x02100000\0" \
 	"scriptfile=u-boot.scr\0" \
 	"fatscript=if fatload mmc 0:1 ${scriptaddr} ${scriptfile};" \
-		   "then source ${scriptaddr}; fi\0" \
+		   "then source ${scriptaddr}:script; fi\0" \
 	"nandfitboot=setenv bootargs " CONFIG_BOOTARGS \
 			" root=${nandroot} rw rootwait rootfstype=jffs2; " \
 			"bootm ${loadaddr}\0" \
Signature · 1 line
2.26.2