From 5e239183f62cc3740bf775e5204591cea5bf02ae Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Aug 2019 07:22:49 -0600 Subject: binman: x86: Separate out 16-bit reset and init code At present these two sections of code are linked together into a single 2KB chunk in a single file. Some Intel SoCs like to have a FIT (Firmware Interface Table) in the ROM and the pointer for this needs to go at 0xffffffc0 which is in the middle of these two sections. Make use of the new 'reset' entry and change the existing 16-bit entry to include just the 16-bit data. Signed-off-by: Simon Glass --- scripts/Makefile.spl | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'scripts/Makefile.spl') diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 7af6b120b6c..0f3d89b2152 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -229,9 +229,11 @@ ALL-y += $(obj)/boot.bin endif ifdef CONFIG_TPL_BUILD -ALL-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-tpl.bin +ALL-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-tpl.bin \ + $(obj)/u-boot-x86-reset16-tpl.bin else -ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-spl.bin +ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-spl.bin \ + $(obj)/u-boot-x86-reset16-spl.bin endif ALL-$(CONFIG_ARCH_ZYNQ) += $(obj)/boot.bin @@ -337,12 +339,20 @@ OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary \ $(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 +OBJCOPYFLAGS_u-boot-x86-start16-spl.bin := -O binary -j .start16 +$(obj)/u-boot-x86-start16-spl.bin: $(obj)/u-boot-spl FORCE $(call if_changed,objcopy) -OBJCOPYFLAGS_u-boot-x86-16bit-tpl.bin := -O binary -j .start16 -j .resetvec -$(obj)/u-boot-x86-16bit-tpl.bin: $(obj)/u-boot-tpl FORCE +OBJCOPYFLAGS_u-boot-x86-start16-tpl.bin := -O binary -j .start16 +$(obj)/u-boot-x86-start16-tpl.bin: $(obj)/u-boot-tpl FORCE + $(call if_changed,objcopy) + +OBJCOPYFLAGS_u-boot-x86-reset16-spl.bin := -O binary -j .resetvec +$(obj)/u-boot-x86-reset16-spl.bin: $(obj)/u-boot-spl FORCE + $(call if_changed,objcopy) + +OBJCOPYFLAGS_u-boot-x86-reset16-tpl.bin := -O binary -j .resetvec +$(obj)/u-boot-x86-reset16-tpl.bin: $(obj)/u-boot-tpl FORCE $(call if_changed,objcopy) LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) -- cgit v1.2.3