[U-Boot] [PATCH 4/9] ARM: socfpga: Bundle U-Boot fitImage into SFP on Arria10
tien.fong.chee at intel.com
tien.fong.chee at intel.com
Wed Nov 21 10:41:43 UTC 2018
From: Tien Fong Chee <tien.fong.chee at intel.com>
Bundle U-Boot fitImage containing U-Boot and FPGA bitstream into the
u-boot-with-spl.sfp on Arria10. This lets U-Boot operate in a very
similar fashion to Gen5, where the U-Boot binary got loaded by the
SPL from a uImage concatenated at the end of the SPL SFP image. On
Gen10, the U-Boot is in fitImage which contains the FPGA bitstream
as well. In this case, the SPL can load the FPGA bitstream first and
load the U-Boot afterward in the same manner. This is nonetheless a
stopgap measure until there is a proper firmware loader in U-Boot.
Signed-off-by: Marek Vasut <marex at denx.de>
Signed-off-by: Tien Fong Chee <tien.fong.chee at intel.com>
---
Makefile | 9 +++++++--
include/configs/socfpga_common.h | 4 ++++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index a55915d..4ecc19d 100644
--- a/Makefile
+++ b/Makefile
@@ -1212,9 +1212,14 @@ ifneq ($(CONFIG_ARCH_SOCFPGA),)
quiet_cmd_socboot = SOCBOOT $@
cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \
spl/u-boot-spl.sfp spl/u-boot-spl.sfp \
- u-boot.img > $@ || rm -f $@
+ $2 > $@ || rm -f $@
+ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
+u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.itb FORCE
+ $(call if_changed,socboot,u-boot.itb)
+else
u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
- $(call if_changed,socboot)
+ $(call if_changed,socboot,u-boot.img)
+endif
endif
ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index bd8f5c8..ffdc6eb 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -268,7 +268,11 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
/* SPL SDMMC boot support */
#ifdef CONFIG_SPL_MMC_SUPPORT
#if defined(CONFIG_SPL_FAT_SUPPORT) || defined(CONFIG_SPL_EXT_SUPPORT)
+#if CONFIG_SPL_FIT
+#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.itb"
+#else
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img"
+#endif
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
#endif
#else
--
1.7.7.4
More information about the U-Boot
mailing list