summaryrefslogtreecommitdiffstats
path: root/Makefile.inc
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-03-30 20:16:36 +0200
committerArthur Heymans <arthur@aheymans.xyz>2022-05-12 11:11:53 +0000
commit75226bb879837e2e4aa710aadb27dbadb4044ed3 (patch)
treedb8e3c6ec0b7d2dcd4ac4883eddba0744d7a35fb /Makefile.inc
parentc8c6185d8eda1a58a1c7084812e93fb3d2c8f254 (diff)
downloadcoreboot-75226bb879837e2e4aa710aadb27dbadb4044ed3.tar.gz
coreboot-75226bb879837e2e4aa710aadb27dbadb4044ed3.tar.bz2
coreboot-75226bb879837e2e4aa710aadb27dbadb4044ed3.zip
Makefile.inc: Generate master header and pointer as C structs
The makefiles don't like cbfs file names with spaces in them so update the file name with '_' instead of spaces. To keep the master header at the top of cbfs, add a placeholder. This removes the need to handle the cbfs master header in cbfstool. This functionality will be dropped in a later CL. On x86 reserve some space in the linker script to add the pointer. On non-x86 generate a pointer inside a C struct file. As a bonus this would actually fix the master header pointer mechanism on Intel/APL as only the bootblock inside IFWI gets memory mapped. TESTED on thinkpad X201: SeaBIOS correctly finds the cbfs master header. Change-Id: I3ba01be7da1f09a8cac287751497c18cda97d293 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/59132 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'Makefile.inc')
-rw-r--r--Makefile.inc11
1 files changed, 0 insertions, 11 deletions
diff --git a/Makefile.inc b/Makefile.inc
index 654b366adef9..ff2b0c4f152d 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -1120,18 +1120,7 @@ else # ifeq ($(CONFIG_ARCH_X86),y)
$(CBFSTOOL) $@.tmp write -u \
-r BOOTBLOCK \
-f $(objcbfs)/bootblock.bin
- # make space for the CBFS master header pointer. "ptr_" is just
- # arbitrary 4 bytes that will be overwritten by add-master-header.
- printf "ptr_" > $@.tmp.2
- $(CBFSTOOL) $@.tmp add \
- -f $@.tmp.2 \
- -n "header pointer" \
- -t "cbfs header" \
- -b -4 \
- $(CBFSTOOL_ADD_CMD_OPTIONS)
- rm -f $@.tmp.2
endif # ifeq ($(CONFIG_ARCH_X86),y)
- $(CBFSTOOL) $@.tmp add-master-header $(TS_OPTIONS) $(CBFSTOOL_ADD_CMD_OPTIONS)
$(prebuild-files) true
mv $@.tmp $@
else # ifneq ($(CONFIG_UPDATE_IMAGE),y)