diff options
author | Ying Zhang <b40530@freescale.com> | 2013-08-16 15:16:15 +0800 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2013-08-20 09:57:22 -0700 |
commit | 3aa29de0b04be9d56251474d1036b23da249f607 (patch) | |
tree | 5d23f12c6be7f1a687911cc0759af856d687ea6b /spl | |
parent | 382ce7e909c09ba28da5763e717efac7a2c4d156 (diff) | |
download | u-boot-imx-3aa29de0b04be9d56251474d1036b23da249f607.zip u-boot-imx-3aa29de0b04be9d56251474d1036b23da249f607.tar.gz u-boot-imx-3aa29de0b04be9d56251474d1036b23da249f607.tar.bz2 |
TPL : introduce the TPL based on the SPL
Due to the nand SPL on some board(e.g. P1022DS)has a size limit, it can
not be more than 4K. So, the SPL cannot initialize the DDR with the SPD
code. This patch introduces TPL to enable a loader stub that is loaded
by the code from the SPL. It initializes the DDR with the SPD or other
operations.
The TPL's size is sizeable, the maximum size is decided by the memory's
size that TPL runs. It initializes the DDR through SPD code, and copys
final uboot image to DDR. So there are three stage uboot images:
* spl_boot, * tpl_boot, * final uboot image
Signed-off-by: Ying Zhang <b40530@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'spl')
-rw-r--r-- | spl/Makefile | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/spl/Makefile b/spl/Makefile index a9a8564..339e5e8 100644 --- a/spl/Makefile +++ b/spl/Makefile @@ -17,10 +17,22 @@ CONFIG_SPL_BUILD := y export CONFIG_SPL_BUILD +ifeq ($(CONFIG_TPL_BUILD),y) +export CONFIG_TPL_BUILD +SPL_BIN := u-boot-tpl +else +SPL_BIN := u-boot-spl +endif + include $(TOPDIR)/config.mk # We want the final binaries in this directory +ifeq ($(CONFIG_TPL_BUILD),y) +obj := $(OBJTREE)/tpl/ +SPLTREE := $(TPLTREE) +else obj := $(OBJTREE)/spl/ +endif HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n) @@ -161,7 +173,7 @@ $(OBJTREE)/MLO.byteswap: $(obj)u-boot-spl.bin $(OBJTREE)/SPL : $(obj)u-boot-spl.bin depend $(MAKE) -C $(SRCTREE)/arch/arm/imx-common $@ -ALL-y += $(obj)u-boot-spl.bin +ALL-y += $(obj)$(SPL_BIN).bin ifdef CONFIG_SAMSUNG ALL-y += $(obj)$(BOARD)-spl.bin @@ -175,15 +187,15 @@ $(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin $(obj)u-boot-spl.bin $(obj)$(BOARD)-spl.bin endif -$(obj)u-boot-spl.bin: $(obj)u-boot-spl +$(obj)$(SPL_BIN).bin: $(obj)$(SPL_BIN) $(OBJCOPY) $(OBJCFLAGS) -O binary $< $@ GEN_UBOOT = \ cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(__START) \ --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ - -Map u-boot-spl.map -o u-boot-spl + -Map $(SPL_BIN).map -o $(SPL_BIN) -$(obj)u-boot-spl: depend $(START) $(LIBS) $(obj)u-boot-spl.lds +$(obj)$(SPL_BIN): depend $(START) $(LIBS) $(obj)u-boot-spl.lds $(GEN_UBOOT) $(START): depend |