From acc94a73bab2ede4e876e58c2de53ee0551f703c Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sat, 26 Dec 2015 17:02:41 -0700 Subject: [PATCH] Makefile.inc: Fmaptool build fixes - make sure CONFIG_CBFS_SIZE is lowercase for fmaptool. - Regenerate the fmap.fmd file when config.h changes. - Print the fmaptool step when doing the build. Change-Id: Ib518ed469d9e39eb41c81f7b19480c7789067d2d Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/12806 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc --- Makefile.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 345a28a41a..06dea87354 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -659,7 +659,7 @@ FMAP_ROM_SIZE := $(CONFIG_ROM_SIZE) # entire "BIOS" region (everything directly of concern to the host system) # relative to ROM_BASE FMAP_BIOS_BASE := $(call int-subtract, $(CONFIG_ROM_SIZE) $(CONFIG_CBFS_SIZE)) -FMAP_BIOS_SIZE := $(CONFIG_CBFS_SIZE) +FMAP_BIOS_SIZE := $(shell echo $(CONFIG_CBFS_SIZE) | tr A-F a-f) # position and size of flashmap, relative to BIOS_BASE FMAP_FMAP_BASE := 0 FMAP_FMAP_SIZE := 0x100 @@ -683,7 +683,7 @@ FMAP_CBFS_BASE := $(call int-add,$(FMAP_FMAP_BASE) $(FMAP_FMAP_SIZE)) FMAP_CBFS_SIZE := $(call int-subtract,$(FMAP_BIOS_SIZE) $(FMAP_CBFS_BASE)) endif -$(obj)/fmap.fmd: $(top)/Makefile.inc $(DEFAULT_FLASHMAP) +$(obj)/fmap.fmd: $(top)/Makefile.inc $(DEFAULT_FLASHMAP) $(obj)/config.h sed -e "s,##ROM_BASE##,$(FMAP_ROM_ADDR)," \ -e "s,##ROM_SIZE##,$(FMAP_ROM_SIZE)," \ -e "s,##BIOS_BASE##,$(FMAP_BIOS_BASE)," \ @@ -695,7 +695,7 @@ $(obj)/fmap.fmd: $(top)/Makefile.inc $(DEFAULT_FLASHMAP) $(DEFAULT_FLASHMAP) > $@.tmp mv $@.tmp $@ else -$(obj)/fmap.fmd: $(CONFIG_FMDFILE) +$(obj)/fmap.fmd: $(CONFIG_FMDFILE) $(obj)/config.h cp $< $@ endif @@ -703,6 +703,7 @@ endif $(obj)/fmap.h: $(obj)/fmap.fmap $(obj)/fmap.fmap: $(obj)/fmap.fmd $(FMAPTOOL) + echo " FMAP $(FMAPTOOL) -h $(obj)/fmap.h $< $@" $(FMAPTOOL) -h $(obj)/fmap.h $< $@ $(obj)/coreboot.pre: $(objcbfs)/bootblock.bin $$(prebuilt-files) $(CBFSTOOL) $$(cpu_ucode_cbfs_file) $(obj)/fmap.fmap