diff mbox series

[2/4] riscv: dts: Support Fast-Boot

Message ID 20221207062334.21292-2-rick@andestech.com
State Changes Requested
Delegated to: Andes
Headers show
Series [1/4] riscv: spl: Introduce SPL_OPENSBI_OS_BOOT | expand

Commit Message

Rick Chen Dec. 7, 2022, 6:23 a.m. UTC
By enabling SPL_OPENSBI_OS_BOOT, it will generate linux.itb instead
of default u-boot.itb after compiling. And Lnux Kernel Image will be
appended in linux.itb. Then it can jump to Linux Kernel from openSBI
directly.

Signed-off-by: Rick Chen <rick@andestech.com>
---
 arch/riscv/dts/binman.dtsi | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/riscv/dts/binman.dtsi b/arch/riscv/dts/binman.dtsi
index b8fc8f7f35..ca72719d19 100644
--- a/arch/riscv/dts/binman.dtsi
+++ b/arch/riscv/dts/binman.dtsi
@@ -13,14 +13,27 @@ 
 
 &binman {
 	itb {
-		filename = "u-boot.itb";
+		filename = CONFIG_SPL_OPENSBI_FIT_NAME;
 
 		fit {
-			description = "Configuration to load OpenSBI before U-Boot";
+			description = "Configuration to load OpenSBI before OS";
 			#address-cells = <1>;
 			fit,fdt-list = "of-list";
 
 			images {
+#ifdef CONFIG_SPL_OPENSBI_OS_BOOT
+				linux {
+					description = "Linux";
+					type = "standalone";
+					os = "Linux";
+					arch = "riscv";
+					compression = "none";
+					load = <CONFIG_TEXT_BASE>;
+					linux_blob: blob-ext {
+						filename = "Image";
+					};
+				};
+#else
 				uboot {
 					description = "U-Boot";
 					type = "standalone";
@@ -33,6 +46,7 @@ 
 						filename = "u-boot-nodtb.bin";
 					};
 				};
+#endif
 
 				opensbi {
 					description = "OpenSBI fw_dynamic Firmware";
@@ -72,6 +86,12 @@ 
 					fdt = "fdt-SEQ";
 #endif
 				};
+
+				conf-2 {
+					description = "linux";
+					firmware = "opensbi";
+					loadables = "linux";
+				};
 			};
 		};
 	};