vboot: allow more flexibility when adding verstage

When a separate verstage is employed the verstage file
was just being added through the cbfs-files mechanism.
However, that doesn't allow one to specify other flags
that aren't supported that an architecture may require.
The x86 architecture is one of those entities in that
it needs its verstage to be XIP. To that end provide
a mechanism for adding verstage with options.

BUG=chrome-os-partner:44827
BRANCH=None
TEST=Built and booted glados using his mechansim on x86.

Change-Id: Iaba053a55a4d84d8455026e7d6fa548744edaa28
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11819
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Aaron Durbin 2015-10-07 15:31:35 -05:00
parent 6f499069e8
commit e3d2d6fd70
2 changed files with 5 additions and 5 deletions

View File

@ -615,7 +615,7 @@ $(REFCODE_BLOB): $(RMODTOOL)
$(RMODTOOL) -i $(CONFIG_REFCODE_BLOB_FILE) -o $@ $(RMODTOOL) -i $(CONFIG_REFCODE_BLOB_FILE) -o $@
endif endif
$(obj)/coreboot.rom: $(obj)/coreboot.pre $(objcbfs)/ramstage.elf $(CBFSTOOL) $$(call strip_quotes,$$(COREBOOT_ROM_DEPENDENCIES)) $$(INTERMEDIATE) $(REFCODE_BLOB) $(obj)/coreboot.rom: $(obj)/coreboot.pre $(objcbfs)/ramstage.elf $(CBFSTOOL) $$(call strip_quotes,$$(COREBOOT_ROM_DEPENDENCIES)) $$(INTERMEDIATE) $(REFCODE_BLOB) $$(VERSTAGE_FILE)
@printf " CBFS $(subst $(obj)/,,$(@))\n" @printf " CBFS $(subst $(obj)/,,$(@))\n"
# The full ROM may be larger than the CBFS part, so create an empty # The full ROM may be larger than the CBFS part, so create an empty
# file (filled with \377 = 0xff) and copy the CBFS image over it. # file (filled with \377 = 0xff) and copy the CBFS image over it.
@ -669,6 +669,9 @@ ifeq ($(CONFIG_INCLUDE_CONFIG_FILE),y)
if [ -f "$(PAYLOAD_VERSION)" ]; then \ if [ -f "$(PAYLOAD_VERSION)" ]; then \
$(CBFSTOOL) $@.tmp add -f "$(PAYLOAD_VERSION)" -n payload_revision -t raw; \ $(CBFSTOOL) $@.tmp add -f "$(PAYLOAD_VERSION)" -n payload_revision -t raw; \
fi fi
endif
ifeq ($(CONFIG_SEPARATE_VERSTAGE),y)
$(CBFSTOOL) $@.tmp add-stage -f $(VERSTAGE_FILE) -n $(CONFIG_CBFS_PREFIX)/verstage $(CBFSTOOL_VERSTAGE_OPTS)
endif endif
mv $@.tmp $@ mv $@.tmp $@
@printf " CBFSPRINT $(subst $(obj)/,,$(@))\n\n" @printf " CBFSPRINT $(subst $(obj)/,,$(@))\n\n"

View File

@ -73,10 +73,7 @@ $(VB2_LIB): $(obj)/config.h
libverstage-srcs += $(VB2_LIB) libverstage-srcs += $(VB2_LIB)
ifeq ($(CONFIG_SEPARATE_VERSTAGE),y) ifeq ($(CONFIG_SEPARATE_VERSTAGE),y)
cbfs-files-y += $(call strip_quotes,$(CONFIG_CBFS_PREFIX))/verstage VERSTAGE_FILE = $(objcbfs)/verstage.elf
$(call strip_quotes,$(CONFIG_CBFS_PREFIX))/verstage-file = $(objcbfs)/verstage.elf
$(call strip_quotes,$(CONFIG_CBFS_PREFIX))/verstage-type = stage
$(call strip_quotes,$(CONFIG_CBFS_PREFIX))/verstage-compression = none
else else
ifeq ($(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK),y) ifeq ($(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK),y)
bootblock-srcs += $(objgenerated)/libverstage.a bootblock-srcs += $(objgenerated)/libverstage.a