build system: Allow giving additional cbfstool options to cbfs-files-y

This enables adding romstage, verstage, and payload, that may need
additional options (eg. for XIP or for linux initrd arguments) to be
added with the build system infrastructure instead of manual rules.

Change-Id: Ifde4ec3ca4ab436aca9b51a3c2cc478ed493fbfb
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/12547
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Patrick Georgi 2015-11-26 16:37:45 +01:00 committed by Patrick Georgi
parent c7b26c381c
commit 99ae578b43
1 changed files with 4 additions and 2 deletions

View File

@ -269,12 +269,13 @@ cbfs-files-handler= \
$(eval tmp-cbfs-file:=$(shell mkdir -p $(obj)/mainboard/$(MAINBOARDDIR); mktemp $(obj)/mainboard/$(MAINBOARDDIR)/cbfs-file.XXXXXX).out) \
$(call cbfs-files-processor-$(tmp-cbfs-method),$(tmp-old-cbfs-file),$(tmp-cbfs-file))) \
$(if $(tmp-cbfs-file), \
$(eval cbfs-files-$(_cbfs-bucket) += $(tmp-cbfs-file)|$(2)|$($(2)-type)|$($(2)-compression)|$(strip $($(2)-position))|$($(2)-align))) \
$(eval cbfs-files-$(_cbfs-bucket) += $(tmp-cbfs-file)|$(2)|$($(2)-type)|$($(2)-compression)|$(strip $($(2)-position))|$($(2)-align)|$($(2)-options))) \
$(eval $(2)-name:=) \
$(eval $(2)-type:=) \
$(eval $(2)-compression:=) \
$(eval $(2)-position:=) \
$(eval $(2)-required:=) \
$(eval $(2)-options:=) \
$(eval $(2)-align:=)
#######################################################################
@ -605,7 +606,8 @@ cbfs-add-cmd = \
-f $(call extract_nth,1,$(file)) \
-n $(call extract_nth,2,$(file)) \
$(if $(filter-out stage,$(call extract_nth,3,$(file))),-t $(call extract_nth,3,$(file))) \
$(if $(call extract_nth,4,$(file)),-c $(call extract_nth,4,$(file)))
$(if $(call extract_nth,4,$(file)),-c $(call extract_nth,4,$(file))) \
$(call extract_nth,7,$(file))
cbfs-files=$(cbfs-files-fixed) $(cbfs-files-aligned) $(cbfs-files-regular)
ifneq ($(CONFIG_UPDATE_IMAGE),y)