From mboxrd@z Thu Jan 1 00:00:00 1970 From: tien.fong.chee at intel.com Date: Wed, 21 Nov 2018 18:41:43 +0800 Subject: [U-Boot] [PATCH 4/9] ARM: socfpga: Bundle U-Boot fitImage into SFP on Arria10 In-Reply-To: <1542796908-7947-1-git-send-email-tien.fong.chee@intel.com> References: <1542796908-7947-1-git-send-email-tien.fong.chee@intel.com> Message-ID: <1542796908-7947-5-git-send-email-tien.fong.chee@intel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Tien Fong Chee 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 Signed-off-by: Tien Fong Chee --- 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