summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc1
-rw-r--r--src/vendorcode/google/chromeos/vboot2/Makefile.inc11
2 files changed, 12 insertions, 0 deletions
diff --git a/Makefile.inc b/Makefile.inc
index aab1efbcd2..ab7248a1a1 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -112,6 +112,7 @@ spc :=
spc +=
$(spc) :=
$(spc) +=
+comma := ,
# files-in-dir-recursive,dir,files
files-in-dir-recursive=$(filter $(1)%,$(2))
diff --git a/src/vendorcode/google/chromeos/vboot2/Makefile.inc b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
index fdb0d4e954..34f1f745dc 100644
--- a/src/vendorcode/google/chromeos/vboot2/Makefile.inc
+++ b/src/vendorcode/google/chromeos/vboot2/Makefile.inc
@@ -85,3 +85,14 @@ else
romstage-srcs += $(objgenerated)/libverstage.a
endif
endif # CONFIG_SEPARATE_VERSTAGE
+
+# Define a list of files that need to be in RO only.
+# All other files will be installed into RO and RW regions
+# Use $(sort) to cut down on extra spaces that would be translated to commas
+regions-for-file = $(subst $(spc),$(comma),$(sort \
+ $(if $(filter \
+ $(if $(filter y,$(CONFIG_VBOOT_STARTS_IN_BOOTBLOCK)),, \
+ %/romstage) \
+ mts \
+ %/verstage \
+ ,$(1)),COREBOOT,COREBOOT FW_MAIN_A FW_MAIN_B)))