mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
build system: allow modifying cbfstool options for files-in-regions
By implementing a more complex options-for-region function, special needs for certain files in certain regions can be dealt with. Change-Id: I2e1e08d5357b717011c41675f76908bf2319f91d Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/13505 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
This commit is contained in:
parent
efe7ff0f81
commit
1bf5e64096
1 changed files with 11 additions and 3 deletions
14
Makefile.inc
14
Makefile.inc
|
@ -645,6 +645,13 @@ extract_nth=$(subst *,$(spc),$(patsubst -%-,%,$(word $(1), $(subst |,- -,-$(2)-)
|
||||||
# multiple CBFSes in fmap regions, override it.
|
# multiple CBFSes in fmap regions, override it.
|
||||||
regions-for-file ?= COREBOOT
|
regions-for-file ?= COREBOOT
|
||||||
|
|
||||||
|
# options-for-region
|
||||||
|
# $(call options-for-region,$(filename),$(region),$(options))
|
||||||
|
#
|
||||||
|
# Returns potentially modified options, depending on file and region.
|
||||||
|
# Default is to return it unmodified
|
||||||
|
options-for-region ?= $(3)
|
||||||
|
|
||||||
ifeq ($(CONFIG_CBFS_AUTOGEN_ATTRIBUTES),y)
|
ifeq ($(CONFIG_CBFS_AUTOGEN_ATTRIBUTES),y)
|
||||||
cbfs-autogen-attributes=-g
|
cbfs-autogen-attributes=-g
|
||||||
endif
|
endif
|
||||||
|
@ -660,9 +667,10 @@ define cbfs-add-cmd-for-region
|
||||||
$(if $(call extract_nth,4,$(1)),-c $(call extract_nth,4,$(1))) \
|
$(if $(call extract_nth,4,$(1)),-c $(call extract_nth,4,$(1))) \
|
||||||
$(cbfs-autogen-attributes) \
|
$(cbfs-autogen-attributes) \
|
||||||
-r $(2) \
|
-r $(2) \
|
||||||
$(if $(call extract_nth,6,$(1)),-a $(call extract_nth,6,$(file)), \
|
$(call options-for-region,$(call extract_nth,2,$(1)),$(2), \
|
||||||
$(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file)))) \
|
$(if $(call extract_nth,6,$(1)),-a $(call extract_nth,6,$(file)), \
|
||||||
$(call extract_nth,7,$(1))
|
$(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file)))) \
|
||||||
|
$(call extract_nth,7,$(1)))
|
||||||
|
|
||||||
endef
|
endef
|
||||||
# Empty line before endef is necessary so cbfs-add-cmd-for-region ends in a
|
# Empty line before endef is necessary so cbfs-add-cmd-for-region ends in a
|
||||||
|
|
Loading…
Add table
Reference in a new issue