aboutsummaryrefslogtreecommitdiff
path: root/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-11-25 17:04:17 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-11-29 13:04:02 +0100
commit9b5b536b1879ea7a3570b72b3f4e5776ccef2927 (patch)
tree21b7b4339297a53f22fcd62ba77bc1729c1c54d6 /Makefile.inc
parent8528e39fbab6473a61ad3250ef25afb53546bb15 (diff)
build system: establish priority levels for CBFS file additions
Add files with fixed positions, then files with alignment requirements and finally those that can reside everywhere to prevent the most obvious collisions. This isn't perfect yet (the "aligned" group may need some additional sorting), but should avoid the worst instances ("free floating" files allocating space required by fixed location files, for example). Change-Id: I871e1a92ad90e63fc4e299fe1b228b4b00a35930 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/12536 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.inc b/Makefile.inc
index a1c882b6f0..10b336877c 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -238,11 +238,16 @@ cbfs-files-handler= \
$(info ERROR: It is not allowed to specify both alignment and position for $($(2)-file)) \
$(eval FAILBUILD:=1) \
)) \
+ $(eval _cbfs-bucket:=regular ) \
+ $(if $(strip $($(2)-position)), \
+ $(eval _cbfs-bucket:=fixed)) \
+ $(if $(strip $($(2)-align)), \
+ $(eval _cbfs-bucket:=aligned)) \
$(if $(tmp-cbfs-method), \
$(eval tmp-old-cbfs-file:=$(tmp-cbfs-file)) \
$(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))) \
- $(eval cbfs-files += $(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))\
$(eval $(2)-name:=) \
$(eval $(2)-type:=) \
$(eval $(2)-compression:=) \
@@ -580,6 +585,7 @@ cbfs-add-cmd = \
$(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)))
+cbfs-files=$(cbfs-files-fixed) $(cbfs-files-aligned) $(cbfs-files-regular)
ifneq ($(CONFIG_UPDATE_IMAGE),y)
prebuild-files = \
$(foreach file,$(cbfs-files), \