diff options
Diffstat (limited to 'Makefile.inc')
-rw-r--r-- | Makefile.inc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc index ba4f6fad1ec2..d2d3f8860713 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -934,11 +934,22 @@ prebuild-files = $(foreach region,$(all-regions), \ $(call sort-files,$(call placed-files-in-region,$(region))), \ $(call cbfs-add-cmd,$(file),$(region),$(CONFIG_UPDATE_IMAGE)))) +# If no FMD file (Flashmap) is supplied by mainboard, fall back to a default ifeq ($(CONFIG_FMDFILE),) -# For a description of the flash layout described by these variables, check -# the $(DEFAULT_FLASHMAP) .fmd files. + ifeq ($(CONFIG_ARCH_X86),y) + DEFAULT_FLASHMAP:=$(top)/util/cbfstool/default-x86.fmd +# check if IFD_CHIPSET is set and if yes generate a FMAP template from IFD descriptor +ifneq ($(CONFIG_IFD_CHIPSET),) +ifeq ($(CONFIG_HAVE_IFD_BIN),y) +DEFAULT_FLASHMAP:=$(obj)/fmap-template.fmd +$(DEFAULT_FLASHMAP): $(call strip_quotes,$(CONFIG_IFD_BIN_PATH)) $(IFDTOOL) + echo " IFDTOOL -p $(CONFIG_IFD_CHIPSET) -F $@ $<" + $(IFDTOOL) -p $(CONFIG_IFD_CHIPSET) -F $@ $< +endif # ifeq($(CONFIG_HAVE_IFD_BIN),y) +endif # ifneq($(CONFIG_IFD_CHIPSET),) + # entire flash FMAP_ROM_ADDR := $(call int-subtract, 0x100000000 $(CONFIG_ROM_SIZE)) FMAP_ROM_SIZE := $(CONFIG_ROM_SIZE) |