summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-01-16 07:04:03 -0700
committerBin Meng <bmeng.cn@gmail.com>2017-02-06 11:38:46 +0800
commit84547b4e667b99ff69d4682d15ae051664a1b409 (patch)
treedc1413d27cce77bdcceeece052afe885b405a16b /scripts
parent3c2dd537c77277e17f414dd74cbc44ce455cccfe (diff)
downloadu-boot-imx-84547b4e667b99ff69d4682d15ae051664a1b409.zip
u-boot-imx-84547b4e667b99ff69d4682d15ae051664a1b409.tar.gz
u-boot-imx-84547b4e667b99ff69d4682d15ae051664a1b409.tar.bz2
x86: Add SPL build rules for start-up code
When SPL is used we need to build the 16-bit start-up code. Add Makefile rules to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.spl9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 82cfc60..b52f996 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -179,6 +179,8 @@ ifeq ($(CONFIG_SYS_SOC),"at91")
ALL-y += boot.bin
endif
+ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-spl.bin
+
ALL-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin
ALL-$(CONFIG_ARCH_ZYNQMP) += $(obj)/boot.bin
@@ -263,11 +265,16 @@ endif
quiet_cmd_objcopy = OBJCOPY $@
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
-OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary
+OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary \
+ $(if $(CONFIG_SPL_X86_16BIT_INIT),-R .start16 -R .resetvec)
$(obj)/$(SPL_BIN)-nodtb.bin: $(obj)/$(SPL_BIN) FORCE
$(call if_changed,objcopy)
+OBJCOPYFLAGS_u-boot-x86-16bit-spl.bin := -O binary -j .start16 -j .resetvec
+$(obj)/u-boot-x86-16bit-spl.bin: $(obj)/u-boot-spl FORCE
+ $(call if_changed,objcopy)
+
LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL)
ifneq ($(CONFIG_SPL_TEXT_BASE),)
LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE)