summaryrefslogtreecommitdiff
path: root/src/arch/x86/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2010-12-16 07:36:28 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2010-12-16 07:36:28 +0000
commitc2c23dca8bea16a0198a21fe900fb1d43170489a (patch)
tree139b089333a552b18daa69c82eaabffe7b137254 /src/arch/x86/Makefile.inc
parent8d0d6718a3afac24029d45540d587a24802730a4 (diff)
downloadcoreboot-c2c23dca8bea16a0198a21fe900fb1d43170489a.tar.xz
Add support for cbfs-files-y to the build system.
That variable allows chipset components to add files to the CBFS image, for details see http://www.coreboot.org/pipermail/coreboot/2010-December/062483.html Compared to the patch in that mail this commit improves dependency tracking a bit. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Joseph Smith <joe@settoplinux.org> Acked-by: Stefan Reinauer <stepan@coreboot.org> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@6182 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/x86/Makefile.inc')
-rw-r--r--src/arch/x86/Makefile.inc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index ea6e3ecb14..c4ac5cd75f 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -53,6 +53,23 @@ ifeq ($(CONFIG_GEODE_VSA_FILE),y)
COREBOOT_ROM_DEPENDENCIES+=$(CONFIG_VSA_FILENAME)
endif
+extract_nth=$(word $(1), $(subst |, ,$(2)))
+
+ifneq ($(CONFIG_UPDATE_IMAGE),y)
+prebuild-files = \
+ $(foreach file,$(cbfs-files), \
+ $(CBFSTOOL) $@ add $(call extract_nth,1,$(file)) $(call extract_nth,2,$(file)) $(call extract_nth,3,$(file)) $(call extract_nth,4,$(file)); )
+prebuilt-files = $(foreach file,$(cbfs-files), $(call extract_nth,1,$(file)))
+
+$(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $(prebuilt-files) $(CBFSTOOL)
+ rm -f $@
+ $(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K $(obj)/coreboot.bootblock
+ $(prebuild-files)
+else
+$(obj)/coreboot.pre1: $(CBFSTOOL)
+ mv $(obj)/coreboot.rom $@
+endif
+
$(obj)/coreboot.rom: $(obj)/coreboot.pre $(obj)/coreboot_ram $(CBFSTOOL) $(call strip_quotes,$(COREBOOT_ROM_DEPENDENCIES))
@printf " CBFS $(subst $(obj)/,,$(@))\n"
cp $(obj)/coreboot.pre $@.tmp