Store the payload config and revision in CBFS

Store the payload config and version files in CBFS if using a
SeaBIOS or filo payload if INCLUDE_CONFIG_FILE is enabled.

Change-Id: I0c1b4da8f6179b9cee06cecfa76bc631b43196e0
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: http://review.coreboot.org/10607
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
Martin Roth 2015-06-19 20:50:59 -06:00 committed by Martin Roth
parent 188e37072f
commit 7b928cd0c3
2 changed files with 21 additions and 0 deletions

View File

@ -646,6 +646,16 @@ ifeq ($(CONFIG_CPU_MICROCODE_ADDED_DURING_BUILD),y)
@printf " UPDATE-FIT \n" @printf " UPDATE-FIT \n"
$(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) $(CBFSTOOL) $@.tmp update-fit -n cpu_microcode_blob.bin -x $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES)
endif endif
endif
ifeq ($(CONFIG_INCLUDE_CONFIG_FILE),y)
@printf " CONFIG $(PAYLOAD_CONFIG)\n"
if [ -f "$(PAYLOAD_CONFIG)" ]; then \
$(CBFSTOOL) $@.tmp add -f "$(PAYLOAD_CONFIG)" -n payload_config -t raw; \
fi
@printf " REVISION $(PAYLOAD_VERSION)\n"
if [ -f "$(PAYLOAD_VERSION)" ]; then \
$(CBFSTOOL) $@.tmp add -f "$(PAYLOAD_VERSION)" -n payload_revision -t raw; \
fi
endif endif
mv $@.tmp $@ mv $@.tmp $@
@printf " CBFSPRINT $(subst $(obj)/,,$(@))\n\n" @printf " CBFSPRINT $(subst $(obj)/,,$(@))\n\n"

View File

@ -32,6 +32,17 @@ ifeq ($(CONFIG_PAYLOAD_GRUB2),y)
COREBOOT_ROM_DEPENDENCIES+=grub2 COREBOOT_ROM_DEPENDENCIES+=grub2
endif endif
######################################################################
# set up payload config and version files for later inclusion
ifeq ($(CONFIG_PAYLOAD_SEABIOS),y)
PAYLOAD_CONFIG=payloads/external/SeaBIOS/seabios/.config
PAYLOAD_VERSION=payloads/external/SeaBIOS/seabios/out/version.c
endif
ifeq ($(CONFIG_PAYLOAD_FILO),y)
PAYLOAD_CONFIG=payloads/external/FILO/filo/.config
PAYLOAD_VERSION=payloads/external/FILO/filo/build/version.h
endif
SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1) SEABIOS_CC_OFFSET=$(if $(filter %ccache,$(HOSTCC)),2,1)
seabios: seabios:
$(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \ $(MAKE) -C payloads/external/SeaBIOS -f Makefile.inc \