summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-06-03 11:54:59 -0500
committerAaron Durbin <adurbin@chromium.org>2015-06-09 20:31:17 +0200
commit999ed64ac5e1a9c7b7c4f85ff08f68b8512abb83 (patch)
tree46682010fc3f69c202878fe9031626b7c1c564ab
parentc16e9dfa18cb37b40ef7eef87f22385215b04ec2 (diff)
update_image: add all CBFS_PREFIX files to cbfs
In order to accomodate objects not directly linked into ramstage anymore those files need to be added to the image when UPDATE_IMAGE is selected. Otherwise many required pieces are missing from booting correctly. Change-Id: Ic0b24387d24d0af3b75f5fd6fa1795fd381c4d58 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/10410 Tested-by: build bot (Jenkins) Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
-rw-r--r--Makefile.inc16
1 files changed, 14 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 585fd17d9b..b5acdd0b97 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -552,9 +552,21 @@ $(obj)/coreboot.pre1: $(objcbfs)/bootblock.bin $$(prebuilt-files) $(FMAPTOOL) $(
$(call add-cpu-microcode-to-cbfs,$@.tmp)
mv $@.tmp $@
else
+prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
+# Add all cbfs files to image of the form: CONFIG_CBFS_PREFIX/<filename>
+prebuild-files = \
+ $(foreach file,$(cbfs-files), \
+ $(if $(filter $(call strip_quotes, $(CONFIG_CBFS_PREFIX))/%,\
+ $(call extract_nth,2,$(file))), \
+ $(if $(call extract_nth,6,$(file)),$(CBFSTOOL) $@.tmp locate -f $(call extract_nth,1,$(file)) -n $(call extract_nth,2,$(file)) -a $(call extract_nth,6,$(file))|xargs -i \
+ $(cbfs-add-cmd) -b {} &&,\
+ $(cbfs-add-cmd) $(if $(call extract_nth,5,$(file)),-b $(call extract_nth,5,$(file))) &&)))
+
.PHONY: $(obj)/coreboot.pre1
-$(obj)/coreboot.pre1: $(CBFSTOOL)
- mv $(obj)/coreboot.rom $@
+$(obj)/coreboot.pre1: $$(prebuilt-files) $(CBFSTOOL)
+ mv $(obj)/coreboot.rom $@.tmp
+ $(prebuild-files) true
+ mv $@.tmp $@
endif
ifeq ($(CONFIG_PAYLOAD_LINUX),y)