summaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-02-19 10:57:16 +0100
committerDavid Hendricks <david.hendricks@gmail.com>2019-10-18 15:38:19 +0000
commitd9c799c5296c8f300031dafade682cf613ec4d34 (patch)
treea5fea47be474ac35efc557150c3e6ed778066974 /Makefile.inc
parent7ba58718defffdddc785507809b25b231a889d27 (diff)
downloadcoreboot-d9c799c5296c8f300031dafade682cf613ec4d34.tar.xz
build: Mark bootblock files on x86 as IBB
* Add cbfsoption --ibb to mark files as IBB * Will be used by "Legacy FIT TXT" boot Change-Id: I83313f035e7fb7e1eb484b323862522e28cb73d4 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31497 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index d13a7959ab..f7f3708a15 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -678,6 +678,18 @@ find-class = $(if $(filter $(1),$(basename $(1))),$(if $(CC_$(1)), $(1), $(call
# the linker marked it NOBITS automatically because there are only zeroes in it.
preserve-bss-flags := --set-section-flags .bss=load,alloc,data --set-section-flags .data=load,alloc,data
+# For Intel TXT files in the CBFS needs to be marked as 'Initial Boot Block'.
+# As CBFS attributes aren't cheap, only mark them if TXT is enabled.
+ifeq ($(CONFIG_INTEL_TXT),y)
+
+TXTIBB := --ibb
+
+else
+
+TXTIBB :=
+
+endif
+
ifeq ($(CONFIG_COMPRESS_BOOTBLOCK),y)
$(objcbfs)/bootblock.lz4: $(objcbfs)/bootblock.elf $(objutil)/cbfstool/cbfs-compression-tool
@@ -1031,6 +1043,7 @@ ifeq ($(CONFIG_ARCH_X86),y)
-f $(objcbfs)/bootblock.bin \
-n bootblock \
-t bootblock \
+ $(TXTIBB) \
-b -$(call file-size,$(objcbfs)/bootblock.bin) $(cbfs-autogen-attributes) \
$(TS_OPTIONS)
else # ifeq ($(CONFIG_ARCH_X86),y)
@@ -1168,6 +1181,9 @@ endif # CONFIG_NO_FIXED_XIP_ROM_SIZE
endif # CONFIG_NO_XIP_EARLY_STAGES
endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64
+ifeq ($(CONFIG_VBOOT_STARTS_IN_ROMSTAGE),y)
+$(CONFIG_CBFS_PREFIX)/romstage-options += $(TXTIBB)
+endif
cbfs-files-$(CONFIG_HAVE_RAMSTAGE) += $(CONFIG_CBFS_PREFIX)/ramstage
$(CONFIG_CBFS_PREFIX)/ramstage-file := $(RAMSTAGE)