Makefile:Add u-boot-with-spl-pbl.bin target for SPL
PATCH v2 4/6 Makefile:Add u-boot-with-spl-pbl.bin target for SPL
This image combines the pbl format of SPL with and U-Boot. This is a convenient way of having a single image to program on indirect boot source.
Corenet platforms like T4240, P4080 etc have PBL hardware which read data in PBL format and copy to internal SRAM for further execution. This image configures DDR, copy u-boot to DDR and transfer the control.
---
Based upon git://git.denx.de/u-boot-mpc85xx.git branch next
Changes for v2: Sending as it is
Makefile | 7 +++++++ spl/Makefile | 9 +++++++++ 2 files changed, 16 insertions(+)
Makefile +7 -0
@@ -497,6 +497,9 @@ endif $(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(SPL_PAYLOAD) $(call SPL_PAD_APPEND,$<,$(SPL_PAYLOAD),spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) +$(obj)u-boot-with-spl-pbl.bin: $(obj)spl/u-boot-spl.pbl $(SPL_PAYLOAD) + $(call SPL_PAD_APPEND,$<,$(SPL_PAYLOAD),spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) + $(obj)tpl/u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin $(call SPL_PAD_APPEND,$<,$(obj)u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO))
@@ -624,6 +627,9 @@ $(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend $(MAKE) -C spl all +$(obj)spl/u-boot-spl.pbl: $(SUBDIR_TOOLS) depend + $(MAKE) -C spl all + $(obj)tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend $(MAKE) -C spl all CONFIG_TPL_BUILD=y
@@ -918,6 +924,7 @@ clobber: tidy @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map} @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map} @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map} + @rm -f $(obj)spl/u-boot-spl.pbl @rm -f $(obj)spl/u-boot-spl.lds @rm -f $(obj)tpl/{u-boot-tpl,u-boot-tpl.bin,u-boot-tpl.map} @rm -f $(obj)tpl/u-boot-spl.lds
spl/Makefile +9 -0
@@ -181,6 +181,10 @@ ifdef CONFIG_SAMSUNG ALL-y += $(obj)$(BOARD)-spl.bin endif +ifdef CONFIG_PBLPBI_CONFIG +ALL-y += $(obj)$(SPL_BIN).pbl +endif + all: $(ALL-y) ifdef CONFIG_SAMSUNG
@@ -192,6 +196,11 @@ endif $(obj)$(SPL_BIN).bin: $(obj)$(SPL_BIN) $(OBJCOPY) $(OBJCFLAGS) -O binary $< $@ +$(obj)$(SPL_BIN).pbl: $(obj)$(SPL_BIN).bin + $(obj)../tools/mkimage -n $(CONFIG_PBLRCW_CONFIG) \ + -R $(CONFIG_PBLPBI_CONFIG) -T pblimage \ + -d $< $@ + GEN_UBOOT = \ cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(__START) \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
Signature · 1 line
1.7.9.5
PATCH v2 4/6 Makefile:Add u-boot-with-spl-pbl.bin target for SPL
spl/Makefile ifdef CONFIG_SAMSUNG · line 186
Quoted 3 lines · Prabhakar Kushwaha
spl/Makefile +3
-0+ifdef CONFIG_PBLPBI_CONFIG +ALL-y += $(obj)$(SPL_BIN).pbl +endif
I realize this symbol has already been introduced, but it's not documented and would be better called something like CONFIG_SYS_FSL_PBL_PBI (and likewise CONFIG_SYS_FSL_PBL_RCW).
spl/Makefile endif · line 202
Quoted 11 lines
all: $(ALL-y)
ifdef
CONFIG_SAMSUNGspl/Makefile +4
-0@@ -192,6 +196,11 @@ endif $(obj)$(SPL_BIN).bin: $(obj)$(SPL_BIN) $(OBJCOPY) $(OBJCFLAGS) -O binary $< $@ +$(obj)$(SPL_BIN).pbl: $(obj)$(SPL_BIN).bin + $(obj)../tools/mkimage -n $(CONFIG_PBLRCW_CONFIG) \ + -R $(CONFIG_PBLPBI_CONFIG) -T pblimage \ + -d $< $@
This could be moved to rules.mk as a pattern rule for turning any .bin into .pbl (and thus avoid duplication between spl and the main makefile).
-Scott