[coreboot-gerrit] Patch set updated for coreboot: build system: allow assigning files to regions
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Wed Jan 20 15:36:45 CET 2016
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13039
-gerrit
commit 594b6acd8095e9473368ae0e5e464cf17c40eb9f
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Mon Jan 18 16:24:10 2016 +0100
build system: allow assigning files to regions
Using the regions-for-file function, the build system can now declare
which (CBFS formatted) fmap region(s) a file should end up in.
The default is to put them in the regular COREBOOT region, but more
complex boot schemes (eg. vboot or fallback/normal) can use the function
to implement suitable policies.
Change-Id: I5e2e6b8e8759fda2cfb0144d5b998ba3e05650c8
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
Makefile.inc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Makefile.inc b/Makefile.inc
index 23cc079..9e303d8 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -648,6 +648,14 @@ $(objcbfs)/%.elf: $(objcbfs)/%.debug
# 4) replace all '*' characters with spaces
extract_nth=$(subst *,$(spc),$(patsubst -%-,%,$(word $(1), $(subst |,- -,-$(2)-))))
+# regions-for-file - Returns a cbfstool regions parameter
+# $(call regions-for-file,$(filename))
+# returns "-r REGION1,REGION2,..."
+#
+# This is the default implementation. When using a boot strategy employing
+# multiple CBFSes in fmap regions, override it.
+regions-for-file ?= -r COREBOOT
+
cbfs-add-cmd = \
printf " CBFS $(call extract_nth,2,$(file))\n"; \
$(CBFSTOOL) $@.tmp \
@@ -656,6 +664,7 @@ cbfs-add-cmd = \
-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))) \
+ $(call regions-for-file,$(call extract_nth,2,$(file))) \
$(call extract_nth,7,$(file))
cbfs-files=$(cbfs-files-fixed) $(cbfs-files-aligned) $(cbfs-files-regular)
More information about the coreboot-gerrit
mailing list