Skip to contentSkip to conversation

Makefile: Add support of RAMBOOT_SPLPBL

PATCH New Prabhakar Kushwaha 1 participant 1 message Feb 28, 2014 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 5/6 Makefile: Add support of RAMBOOT_SPLPBL

Objective of this target to have concatenate binary having
- SPL binary in PBL command format
- U-boot binary

---
 Makefile |    9 +++++++++
 README   |    4 ++++
 2 files changed, 13 insertions(+)
Makefile +9 -0
index 0281171..2c95130 100644
@@ -708,6 +708,7 @@ ALL-y += u-boot.srec u-boot.bin System.map
 ALL-$(CONFIG_NAND_U_BOOT) += u-boot-nand.bin
 ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin
 ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl
+ALL-$(CONFIG_RAMBOOT_SPLPBL) += u-boot-with-spl-pbl.bin
 ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin
 ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img
 ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
@@ -835,6 +836,14 @@ OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \
 tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE
 	$(call if_changed,pad_cat)
 
+u-boot-with-spl-pbl.bin: spl/u-boot-spl.bin
+		tools/mkimage -n $(CONFIG_SYS_FSL_PBL_RCW) \
+		-R $(CONFIG_SYS_FSL_PBL_PBI) -T pblimage \
+		-d $< $@
+		$(OBJCOPY) -I binary -O binary \
+			--pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff $@
+		cat u-boot.bin >> $@
+
 SPL: spl/u-boot-spl.bin FORCE
 	$(Q)$(MAKE) $(build)=arch/arm/imx-common $@
 
README +4 -0
index 3597a82..2cd0bdf 100644
@@ -486,6 +486,10 @@ The following options need to be configured:
 		PBI commands can be used to configure SoC before it starts the execution.
 		Please refer doc/README.pblimage for more details
 
+		CONFIG_RAMBOOT_SPLPBL
+		It adds a target to create boot binary having SPL binary in PBI format
+		concatenated with u-boot binary.
+
 		CONFIG_SYS_FSL_DDR_BE
 		Defines the DDR controller register space as Big Endian
 
Signature · 1 line
1.7.9.5