summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc12
-rw-r--r--src/arch/x86/Makefile.inc7
2 files changed, 8 insertions, 11 deletions
diff --git a/Makefile.inc b/Makefile.inc
index f7433a0c41..052edae501 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -1105,18 +1105,8 @@ endif
$(shell rm -f $(obj)/coreboot.pre)
ifneq ($(CONFIG_UPDATE_IMAGE),y)
-$(obj)/coreboot.pre: $(objcbfs)/bootblock.bin $$(prebuilt-files) $(CBFSTOOL) $(obj)/fmap.fmap $(obj)/fmap.desc
+$(obj)/coreboot.pre: $$(prebuilt-files) $(CBFSTOOL) $(obj)/fmap.fmap $(obj)/fmap.desc
$(CBFSTOOL) $@.tmp create -M $(obj)/fmap.fmap -r $(shell cat $(obj)/fmap.desc)
-ifeq ($(CONFIG_ARCH_X86),y)
- $(CBFSTOOL) $@.tmp add \
- -f $(objcbfs)/bootblock.bin \
- -n bootblock \
- -t bootblock \
- $(TXTIBB) \
- -b -$(call file-size,$(objcbfs)/bootblock.bin) $(cbfs-autogen-attributes) \
- $(TS_OPTIONS) \
- $(CBFSTOOL_ADD_CMD_OPTIONS)
-endif # ifeq ($(CONFIG_ARCH_X86),y)
$(prebuild-files) true
mv $@.tmp $@
else # ifneq ($(CONFIG_UPDATE_IMAGE),y)
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 458bcc637e..ff35c2930f 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -100,6 +100,13 @@ else
$(eval $(call early_x86_stage,bootblock,elf64-x86-64))
endif
+ifneq ($(CONFIG_UPDATE_IMAGE),y)
+$(call add_intermediate, add_bootblock, $(objcbfs)/bootblock.bin)
+ @printf " CBFS $(subst $(obj)/,,$(@))\n"
+ $(CBFSTOOL) $< add -f $(objcbfs)/bootblock.bin -n bootblock -t bootblock $(TXTIBB) -b -$(call file-size,$(objcbfs)/bootblock.bin) \
+ $(cbfs-autogen-attributes) $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS)
+endif
+
$(call src-to-obj,bootblock,$(dir)/walkcbfs.S): $(obj)/fmap_config.h
bootblock-y += walkcbfs.S