Attention is currently required from: Martin Roth, Arthur Heymans. Hello Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/59132
to review the following change.
Change subject: Makefile.inc: Move updating the master header pointer later ......................................................................
Makefile.inc: Move updating the master header pointer later
To keep the master header at the top of cbfs, add a placeholder.
Change-Id: I3ba01be7da1f09a8cac287751497c18cda97d293 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M Makefile.inc 1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/59132/1
diff --git a/Makefile.inc b/Makefile.inc index 860331e..e04a767 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1140,7 +1140,6 @@ -b -$(call file-size,$(objcbfs)/bootblock.bin) $(cbfs-autogen-attributes) \ $(TS_OPTIONS) \ $(CBFSTOOL_ADD_CMD_OPTIONS) - $(CBFSTOOL) $< add-master-header $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS) else $(call add_intermediate, add_bootblock, $(objcbfs)/bootblock.bin) printf " FMAP BOOTBLOCK adding bootblock\n" @@ -1157,13 +1156,26 @@ -b -4 \ $(CBFSTOOL_ADD_CMD_OPTIONS) rm -f $@.tmp - $(CBFSTOOL) $< add-master-header $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS) endif # ARCH_X86 endif # UPDATE_IMAGE
$(call add_intermediate, add_prebuild_files, $$(prebuilt-files)) $(prebuild-files) true
+$(obj)/placeholder: + dd if=/dev/zero of=$@ bs=32 count=1 + +cbfs-files-y += cbfs_master_header +cbfs_master_header-file := $(obj)/placeholder +cbfs_master_header-position := 0 +cbfs_master_header-type := "cbfs header" + +$(call add_intermediate, update_master_header, add_prebuild_files) + printf " CBFS Updating master header\n" + rm -f $(obj)/placeholder + $(CBFSTOOL) $< remove -n cbfs_master_header + $(CBFSTOOL) $< add-master-header $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS) + $(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