[PATCH] configs: defconfig: Load OS via FIT image in QSPI ATF boot for Stratix 10 and Agilex

Jit Loon Lim jit.loon.lim at intel.com
Mon Nov 21 15:40:16 CET 2022


From: Siew Chin Lim <elly.siew.chin.lim at intel.com>

Update to load OS via FIT image in Stratix 10 and Agilex QSPI ATF boot flow.
And, enable FIT signature checking with crc32 algorithm.

Signed-off-by: Siew Chin Lim <elly.siew.chin.lim at intel.com>
Signed-off-by: Jit Loon Lim <jit.loon.lim at intel.com>
---
 configs/socfpga_agilex_qspi_atf_defconfig    | 6 +++++-
 configs/socfpga_stratix10_qspi_atf_defconfig | 6 +++++-
 include/configs/socfpga_soc64_common.h       | 3 +++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/configs/socfpga_agilex_qspi_atf_defconfig b/configs/socfpga_agilex_qspi_atf_defconfig
index 0e82873bc1..745aac3c5c 100755
--- a/configs/socfpga_agilex_qspi_atf_defconfig
+++ b/configs/socfpga_agilex_qspi_atf_defconfig
@@ -15,6 +15,10 @@ CONFIG_IDENT_STRING="socfpga_agilex"
 CONFIG_SPL_FS_FAT=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_agilex_socdk_qspi"
 CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
+CONFIG_SPL_FIT_SIGNATURE=y
+CONFIG_SPL_CRC32_SUPPORT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x2000000
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
@@ -23,7 +27,7 @@ CONFIG_BOOTDELAY=5
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="earlycon panic=-1"
 CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="sf probe;run qspiload;run linux_qspi_enable;rsu dtb;run qspiboot"
+CONFIG_BOOTCOMMAND="sf probe;run qspifitload;run linux_qspi_enable;run rsu_status;run qspifitboot"
 CONFIG_SPL_CACHE=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SPL_ATF=y
diff --git a/configs/socfpga_stratix10_qspi_atf_defconfig b/configs/socfpga_stratix10_qspi_atf_defconfig
index 16ee4896d0..5f42c17d47 100755
--- a/configs/socfpga_stratix10_qspi_atf_defconfig
+++ b/configs/socfpga_stratix10_qspi_atf_defconfig
@@ -15,6 +15,10 @@ CONFIG_IDENT_STRING="socfpga_stratix10"
 CONFIG_SPL_FS_FAT=y
 CONFIG_DEFAULT_DEVICE_TREE="socfpga_stratix10_socdk_qspi"
 CONFIG_FIT=y
+CONFIG_FIT_SIGNATURE=y
+CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
+CONFIG_SPL_FIT_SIGNATURE=y
+CONFIG_SPL_CRC32_SUPPORT=y
 CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x2000000
 # CONFIG_USE_SPL_FIT_GENERATOR is not set
@@ -23,7 +27,7 @@ CONFIG_BOOTDELAY=5
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="earlycon panic=-1"
 CONFIG_USE_BOOTCOMMAND=y
-CONFIG_BOOTCOMMAND="sf probe;run qspiload;run linux_qspi_enable;rsu dtb;run qspiboot"
+CONFIG_BOOTCOMMAND="sf probe;run qspifitload;run linux_qspi_enable;run rsu_status;run qspifitboot"
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SPL_ATF=y
 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index 2343a315b9..12da770077 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -59,6 +59,9 @@
 		"sf read ${fdt_addr} ${qspifdtaddr} ${fdtimagesize}\0" \
 	"qspiboot=setenv bootargs earlycon root=/dev/mtdblock1 rw " \
 		"rootfstype=jffs2 rootwait;booti ${loadaddr} - ${fdt_addr}\0" \
+	"qspifitload=sf read ${loadaddr} ${qspibootimageaddr} ${bootimagesize}\0" \
+	"qspifitboot=setenv bootargs earlycon root=/dev/mtdblock1 rw " \
+		"rootfstype=jffs2 rootwait;bootm ${loadaddr}\0" \
 	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
 	"bootfile=" CONFIG_BOOTFILE "\0" \
 	"fdt_addr=8000000\0" \
-- 
2.26.2



More information about the U-Boot mailing list