summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/Makefile.bigbootblock.inc4
-rw-r--r--src/arch/x86/Makefile.bootblock.inc9
-rw-r--r--src/arch/x86/Makefile.inc17
3 files changed, 19 insertions, 11 deletions
diff --git a/src/arch/x86/Makefile.bigbootblock.inc b/src/arch/x86/Makefile.bigbootblock.inc
index a60681670b..a6b8e11bca 100644
--- a/src/arch/x86/Makefile.bigbootblock.inc
+++ b/src/arch/x86/Makefile.bigbootblock.inc
@@ -1,9 +1,9 @@
#######################################################################
# Build the final rom image
-$(obj)/coreboot.pre: $(obj)/coreboot.bootblock $(CBFSTOOL)
+$(obj)/coreboot.pre: $(obj)/coreboot.pre1 $(CBFSTOOL)
rm -f $@
- $(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K $(obj)/coreboot.bootblock
+ cp $(obj)/coreboot.pre1 $@
#######################################################################
# Build the bootblock
diff --git a/src/arch/x86/Makefile.bootblock.inc b/src/arch/x86/Makefile.bootblock.inc
index f522fc2150..425ee0792c 100644
--- a/src/arch/x86/Makefile.bootblock.inc
+++ b/src/arch/x86/Makefile.bootblock.inc
@@ -1,15 +1,6 @@
#######################################################################
# Build the final rom image
-ifneq ($(CONFIG_UPDATE_IMAGE),y)
-$(obj)/coreboot.pre1: $(obj)/coreboot.bootblock $(CBFSTOOL)
- rm -f $@
- $(CBFSTOOL) $@ create $(CONFIG_COREBOOT_ROMSIZE_KB)K $(obj)/coreboot.bootblock
-else
-$(obj)/coreboot.pre1: $(CBFSTOOL)
- mv $(obj)/coreboot.rom $@
-endif
-
$(obj)/coreboot.pre: $(obj)/coreboot.romstage $(obj)/coreboot.pre1 $(CBFSTOOL)
rm -f $@
cp $(obj)/coreboot.pre1 $@
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