[PATCH 4/4] arm: socfpga: soc64: Load and boot for NAND flash with UBI and UBIFS in enviroment

Jit Loon Lim jit.loon.lim at intel.com
Sun Dec 11 15:40:47 CET 2022


From: Sin Hui Kho <sin.hui.kho at intel.com>

Load kernel and device tree from UBI volume. Set root file system type
for NAND boot as UBIFS located at UBI volume on MTD partition 1 or
namely "root".

Signed-off-by: Sin Hui Kho <sin.hui.kho at intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim at intel.com>
---
 include/configs/socfpga_soc64_common.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index 5939f13231..5b1d243153 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -92,10 +92,15 @@
 	"scriptfile=u-boot.scr\0" \
 	"fatscript=if fatload mmc 0:1 ${scriptaddr} ${scriptfile};" \
 		   "then source ${scriptaddr}:script; fi\0" \
+	"nandroot=ubi0:rootfs\0" \
+	"nandload=ubi part root; ubi readvol ${loadaddr} kernel; ubi readvol ${fdt_addr} dtb\0" \
+	"nandboot=setenv bootargs " CONFIG_BOOTARGS \
+			" root=${nandroot} rw rootwait rootfstype=ubifs ubi.mtd=1; " \
+			"booti ${loadaddr} - ${fdt_addr}\0" \
 	"nandfitboot=setenv bootargs " CONFIG_BOOTARGS \
-			" root=${nandroot} rw rootwait rootfstype=jffs2; " \
+			" root=${nandroot} rw rootwait rootfstype=ubifs ubi.mtd=1; " \
 			"bootm ${loadaddr}\0" \
-	"nandfitload=nand read ${loadaddr} kernel\0" \
+	"nandfitload=ubi part root; ubi readvol ${loadaddr} kernel\0" \
 	"socfpga_legacy_reset_compat=1\0" \
 	"rsu_status=rsu dtb; rsu display_dcmf_version; "\
 		"rsu display_dcmf_status; rsu display_max_retry\0" \
-- 
2.26.2



More information about the U-Boot mailing list