diff options
-rw-r--r-- | Makefile.inc | 14 | ||||
-rw-r--r-- | src/arch/x86/Makefile.inc | 10 |
2 files changed, 10 insertions, 14 deletions
diff --git a/Makefile.inc b/Makefile.inc index 8da6cba004..da1458a1e5 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1100,13 +1100,19 @@ ifeq ($(CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK),y) TS_OPTIONS := -j $(CONFIG_INTEL_TOP_SWAP_BOOTBLOCK_SIZE) endif +ifneq ($(CONFIG_ARCH_X86),y) +add_bootblock = $(CBFSTOOL) $(1) write -u -r BOOTBLOCK -f $(2) +endif + # coreboot.pre doesn't follow the standard Make conventions. It gets modified # by multiple rules, and thus we can't compute the dependencies correctly. $(shell rm -f $(obj)/coreboot.pre) ifneq ($(CONFIG_UPDATE_IMAGE),y) -$(obj)/coreboot.pre: $$(prebuilt-files) $(CBFSTOOL) $(obj)/fmap.fmap $(obj)/fmap.desc +$(obj)/coreboot.pre: $$(prebuilt-files) $(CBFSTOOL) $(obj)/fmap.fmap $(obj)/fmap.desc $(objcbfs)/bootblock.bin $(CBFSTOOL) $@.tmp create -M $(obj)/fmap.fmap -r $(shell cat $(obj)/fmap.desc) + printf " BOOTBLOCK\n" + $(call add_bootblock,$@.tmp,$(objcbfs)/bootblock.bin) $(prebuild-files) true mv $@.tmp $@ else # ifneq ($(CONFIG_UPDATE_IMAGE),y) @@ -1136,12 +1142,6 @@ add_intermediate = \ $(1): $(obj)/coreboot.pre $(2) | $(INTERMEDIATE) \ $(eval INTERMEDIATE+=$(1)) $(eval PHONY+=$(1)) -ifneq ($(CONFIG_ARCH_X86),y) -$(call add_intermediate, add_bootblock, $(objcbfs)/bootblock.bin) - printf " FMAP writing BOOTBLOCK region\n" - $(CBFSTOOL) $< write -u -r BOOTBLOCK -f $(objcbfs)/bootblock.bin -endif - $(obj)/coreboot.rom: $(obj)/coreboot.pre $(CBFSTOOL) $(IFITTOOL) $$(INTERMEDIATE) @printf " CBFS $(subst $(obj)/,,$(@))\n" # The full ROM may be larger than the CBFS part, so create an empty diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index 02ee902e38..eaced1f220 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -102,15 +102,11 @@ else $(eval $(call early_x86_stage,bootblock,elf64-x86-64)) endif -ifneq ($(CONFIG_UPDATE_IMAGE),y) ifeq ($(CONFIG_BOOTBLOCK_IN_CBFS),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) \ +add_bootblock = \ + $(CBFSTOOL) $(1) add -f $(2) -n bootblock -t bootblock $(TXTIBB) \ + -b -$(call file-size,$(2)) \ $(cbfs-autogen-attributes) $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS) -else # Make sure the bootblock gets build, if only for buildtesting -$(call add_intermediate, gen_bootblock, $(objcbfs)/bootblock.bin) -endif endif $(call src-to-obj,bootblock,$(dir)/walkcbfs.S): $(obj)/fmap_config.h |