Makefile.inc: Add x86 bootblock as a separate target
Some platforms don't need a top aligned bootblock in cbfs like Intel APL or modern AMD platforms as the bootblock is loaded differently. So they don't need the top aligned cbfs bootblock. To not clutter the main make file move out adding the bootblock. Change-Id: I4de9d7fedf1ae5a37a3310dd42eb07b44c030930 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56122 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
This commit is contained in:
parent
abf6b1ed00
commit
31187bb0e0
12
Makefile.inc
12
Makefile.inc
|
@ -1105,18 +1105,8 @@ endif
|
||||||
$(shell rm -f $(obj)/coreboot.pre)
|
$(shell rm -f $(obj)/coreboot.pre)
|
||||||
|
|
||||||
ifneq ($(CONFIG_UPDATE_IMAGE),y)
|
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)
|
$(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
|
$(prebuild-files) true
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
else # ifneq ($(CONFIG_UPDATE_IMAGE),y)
|
else # ifneq ($(CONFIG_UPDATE_IMAGE),y)
|
||||||
|
|
|
@ -100,6 +100,13 @@ else
|
||||||
$(eval $(call early_x86_stage,bootblock,elf64-x86-64))
|
$(eval $(call early_x86_stage,bootblock,elf64-x86-64))
|
||||||
endif
|
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
|
$(call src-to-obj,bootblock,$(dir)/walkcbfs.S): $(obj)/fmap_config.h
|
||||||
bootblock-y += walkcbfs.S
|
bootblock-y += walkcbfs.S
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue