Makefile: socfpga: Add target to generate hex output for combined spl and dtb
PATCH v2 1/1 Makefile: socfpga: Add target to generate hex output for combined spl and dtb
From: Dalon Westergreen <[email protected]>
Add target to Makefile to generate "u-boot-spl-dtb.hex" for Intel SOCFPGA SOC64 devices (Stratix 10 and Agilex). "u-boot-spl-dtb.hex" is hex formatted spl with and offset of CONFIG_SPL_TEXT_BASE. It combines the spl image and dtb. "u-boot-spl-dtb.hex" is needed to generate the final configuration bitstream for Intel SOCFPGA SOC64 devices.
---
v2: Update commit message
---
--- Makefile | 11 ++++++----- include/configs/socfpga_soc64_common.h | 2 +- scripts/Makefile.spl | 8 ++++++++ 3 files changed, 15 insertions(+), 6 deletions(-)
Makefile +6 -5
@@ -1263,11 +1263,6 @@ OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \ $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec) -OBJCOPYFLAGS_u-boot-spl.hex = $(OBJCOPYFLAGS_u-boot.hex) - -spl/u-boot-spl.hex: spl/u-boot-spl FORCE - $(call if_changed,objcopy) - binary_size_check: u-boot-nodtb.bin FORCE @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ map_size=$(shell cat u-boot.map | \
@@ -1935,6 +1930,12 @@ spl/u-boot-spl.bin: spl/u-boot-spl @: $(SPL_SIZE_CHECK) +spl/u-boot-spl-dtb.bin: spl/u-boot-spl + @: + +spl/u-boot-spl-dtb.hex: spl/u-boot-spl + @: + spl/u-boot-spl: tools prepare \ $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATDATA),dts/dt.dtb) \ $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATDATA),dts/dt.dtb)
include/configs/socfpga_soc64_common.h +1 -1
@@ -200,7 +200,7 @@ unsigned int cm_get_l4_sys_free_clk_hz(void);* 0x8000_0000 ...... End of SDRAM_1 (assume 2GB) * */ -#define CONFIG_SPL_TARGET "spl/u-boot-spl.hex" +#define CONFIG_SPL_TARGET "spl/u-boot-spl-dtb.hex"#define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR#define CONFIG_SPL_BSS_MAX_SIZE 0x100000/* 1 MB */
scripts/Makefile.spl +8 -0
@@ -229,6 +229,9 @@ ifneq ($(CONFIG_TARGET_SOCFPGA_GEN5)$(CONFIG_TARGET_SOCFPGA_ARRIA10),) INPUTS-y += $(obj)/$(SPL_BIN).sfp endif +INPUTS-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += $(obj)/u-boot-spl-dtb.hex +INPUTS-$(CONFIG_TARGET_SOCFPGA_AGILEX) += $(obj)/u-boot-spl-dtb.hex + ifdef CONFIG_ARCH_SUNXI INPUTS-y += $(obj)/sunxi-spl.bin
@@ -389,6 +392,11 @@ $(obj)/$(SPL_BIN).sfp: $(obj)/$(SPL_BIN).bin FORCE MKIMAGEFLAGS_sunxi-spl.bin = -T sunxi_egon \ -n $(CONFIG_DEFAULT_DEVICE_TREE) +OBJCOPYFLAGS_u-boot-spl-dtb.hex := -I binary -O ihex --change-address=$(CONFIG_SPL_TEXT_BASE) + +$(obj)/u-boot-spl-dtb.hex: $(obj)/u-boot-spl-dtb.bin FORCE + $(call if_changed,objcopy) + $(obj)/sunxi-spl.bin: $(obj)/$(SPL_BIN).bin FORCE $(call if_changed,mkimage)
Signature · 1 line
2.13.0
Tan
PATCH v2 1/1 Makefile: socfpga: Add target to generate hex output for combined spl and dtb
Quoted 95 lines
-----Original Message-----
From: Lim, Elly Siew Chin <[email protected]>
Sent: Wednesday, February 24, 2021 9:54 AM
To: u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; Tan, Ley Foon <[email protected]>; See, Chin Liang <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>; Westergreen, Dalon <[email protected]>; Simon Glass <[email protected]>; Gan, Yau Wai <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: [v2]Makefile: socfpga: Add target to generate hex output for combined spl and dtbFrom: Dalon Westergreen <[email protected]>
Add target to
Makefileto generate "u-boot-spl-dtb.hex" for Intel SOCFPGA SOC64 devices (Stratix 10 and Agilex). "u-boot-spl-dtb.hex" is hex formatted spl with and offset ofCONFIG_SPL_TEXT_BASE. It combines the spl image and dtb.
"u-boot-spl-dtb.hex" is needed to generate the final configuration bitstream for Intel SOCFPGA SOC64 devices.Signed-off-by Dalon Westergreen <[email protected]>Signed-off-by Siew Chin Lim <[email protected]>---
v2: Update commit message
------ Makefile | 11 ++++++----- include/configs/socfpga_soc64_common.h | 2 +- scripts/Makefile.spl | 8 ++++++++ 3 files changed, 15 insertions(+), 6 deletions(-)Makefile +6
-6@@ -1263,11 +1263,6 @@ OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \ $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec) -OBJCOPYFLAGS_u-boot-spl.hex = $(OBJCOPYFLAGS_u-boot.hex) - -spl/u-boot-spl.hex: spl/u-boot-spl FORCE - $(call if_changed,objcopy) - binary_size_check: u-boot-nodtb.bin FORCE @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ map_size=$(shell cat u-boot.map | \@@ -1935,6 +1930,12 @@ spl/u-boot-spl.bin: spl/u-boot-spl @: $(SPL_SIZE_CHECK) +spl/u-boot-spl-dtb.bin: spl/u-boot-spl + @: + +spl/u-boot-spl-dtb.hex: spl/u-boot-spl + @: + spl/u-boot-spl: tools prepare \ $(if$(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATD ATA),dts/dt.dtb) \
$(if
$(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATD ATA),dts/dt.dtb)include/configs/socfpga_soc64_common.h +1
-1@@ -200,7 +200,7 @@ unsigned int cm_get_l4_sys_free_clk_hz(void);* 0x8000_0000 ...... End of SDRAM_1 (assume 2GB) * */ -#define CONFIG_SPL_TARGET "spl/u-boot-spl.hex" +#define CONFIG_SPL_TARGET "spl/u-boot-spl-dtb.hex"#define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR#define CONFIG_SPL_BSS_MAX_SIZE 0x100000/* 1 MB */ scripts/Makefile.spl index renamed from scripts/Makefile.spl +0
-0
ea4e045769..625e06d0d9100644scripts/Makefile.spl +0
-0@@ -229,6 +229,9 @@ ifneq($(CONFIG_TARGET_SOCFPGA_GEN5)$(CONFIG_TARGET_SOCFPGA_ARRIA 10),)
INPUTS-y += $(obj)/$(SPL_BIN).sfp
endif
Quoted 4 lines
+INPUTS-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += $(obj)/u-boot-spl-
dtb.hex
+INPUTS-$(CONFIG_TARGET_SOCFPGA_AGILEX) += $(obj)/u-
boot-spl-dtb.hex
Can use CONFIG_TARGET_SOCFPGA_SOC64.
Regards
Ley Foon
Lim
PATCH v2 1/1 Makefile: socfpga: Add target to generate hex output for combined spl and dtb
Hi Ley Foon,
Quoted 113 lines
-----Original Message-----
From: Tan, Ley Foon <[email protected]>
Sent: Friday, February 26, 2021 5:38 PM
To: Lim, Elly Siew Chin <[email protected]>; u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; See, Chin Liang <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>; Westergreen, Dalon <[email protected]>; Simon Glass <[email protected]>; Gan, Yau Wai <[email protected]>
Subject: RE: [v2]Makefile: socfpga: Add target to generate hex output for combined spl and dtbQuoted 41 lines
-----Original Message-----
From: Lim, Elly Siew Chin <[email protected]>
Sent: Wednesday, February 24, 2021 9:54 AM
To: u-boot at lists.denx.de
Cc: Marek Vasut <[email protected]>; Tan, Ley Foon <[email protected]>; See, Chin Liang <[email protected]>; Simon Goldschmidt <[email protected]>; Chee, Tien Fong <[email protected]>; Westergreen, Dalon <[email protected]>; Simon Glass <[email protected]>; Gan, Yau Wai <[email protected]>; Lim, Elly Siew Chin <[email protected]>
Subject: [v2]Makefile: socfpga: Add target to generate hex output for combined spl and dtbFrom: Dalon Westergreen <[email protected]>
Add target to
Makefileto generate "u-boot-spl-dtb.hex" for Intel SOCFPGA
SOC64 devices (Stratix 10 and Agilex). "u-boot-spl-dtb.hex" is hex formatted spl with and offset ofCONFIG_SPL_TEXT_BASE. It combines the spl image and dtb.
"u-boot-spl-dtb.hex" is needed to generate the final configuration bitstream for Intel SOCFPGA SOC64 devices.Signed-off-by Dalon Westergreen <[email protected]>Signed-off-by Siew Chin Lim <[email protected]>---
v2: Update commit message
------ Makefile | 11 ++++++----- include/configs/socfpga_soc64_common.h | 2 +- scripts/Makefile.spl | 8 ++++++++ 3 files changed, 15 insertions(+), 6 deletions(-)Makefile +0
-0Makefile OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ · line 1264
Quoted 2 lines
Makefile +0
-0@@ -1263,11 +1263,6 @@ OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \ $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg-R .resetvec)
Quoted 12 lines
Makefile +0
-5-OBJCOPYFLAGS_u-boot-spl.hex = $(OBJCOPYFLAGS_u-boot.hex) - -spl/u-boot-spl.hex: spl/u-boot-spl FORCE - $(call if_changed,objcopy) - binary_size_check: u-boot-nodtb.bin FORCE @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ map_size=$(shell cat u-boot.map | \@@ -1935,6 +1930,12 @@ spl/u-boot-spl.bin: spl/u-boot-spl @: $(SPL_SIZE_CHECK)Makefile spl/u-boot-spl.bin: spl/u-boot-spl · line 1941
Quoted 10 lines
Makefile +6
-0+spl/u-boot-spl-dtb.bin: spl/u-boot-spl + @: + +spl/u-boot-spl-dtb.hex: spl/u-boot-spl + @: + spl/u-boot-spl: tools prepare \ $(if$(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATD
Quoted 3 lines
ATA),dts/dt.dtb) \
$(if$(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATD
Quoted 7 lines
ATA),dts/dt.dtb)
include/configs/socfpga_soc64_common.h +0
-0include/configs/socfpga_soc64_common.h unsigned int cm_get_l4_sys_free_clk_hz(void); · line 206
Quoted 8 lines
include/configs/socfpga_soc64_common.h +1
-1@@ -200,7 +200,7 @@ unsigned int cm_get_l4_sys_free_clk_hz(void);* 0x8000_0000 ...... End of SDRAM_1 (assume 2GB) * */ -#define CONFIG_SPL_TARGET "spl/u-boot-spl.hex" +#define CONFIG_SPL_TARGET "spl/u-boot-spl-dtb.hex"#define CONFIG_SPL_MAX_SIZE CONFIG_SYS_INIT_RAM_SIZE#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR#define CONFIG_SPL_BSS_MAX_SIZE 0x100000/* 1 MB */
scripts/Makefile.spl ifneq · line 229
Quoted 6 lines
scripts/Makefile.spl index renamed from scripts/Makefile.spl +0
-0
ea4e045769..625e06d0d9100644scripts/Makefile.spl +0
-0@@ -229,6 +229,9 @@ ifneq($(CONFIG_TARGET_SOCFPGA_GEN5)$(CONFIG_TARGET_SOCFPGA_ARRIA
Quoted 4 lines
scripts/Makefile.spl +0
-010),) INPUTS-y += $(obj)/$(SPL_BIN).sfp endif
Quoted 6 lines
Quoted 4 lines
scripts/Makefile.spl +1
-0+INPUTS-$(CONFIG_TARGET_SOCFPGA_STRATIX10) += $(obj)/u-boot-spl-dtb.hex
+INPUTS-$(CONFIG_TARGET_SOCFPGA_AGILEX) += $(obj)/u-
boot-spl-dtb.hexCan use
CONFIG_TARGET_SOCFPGA_SOC64.
I have changed to use TARGET_SOCFPGA_SOC64.
I have included this patch in 4th version of VAB series because it is depending on TARGET_SOCFPGA_SOC64 patch in VAB series. Thanks.
Quoted 3 lines
Regards
Ley Foon