summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2017-12-18 16:01:49 +0800
committerArthur Heymans <arthur@aheymans.xyz>2017-12-19 20:08:06 +0000
commit1d2aed2367b83cd2a0651fa85756c5f394c136f9 (patch)
tree964095a3476636016cbbabf3f1627b08fc4faf80
parent6c2ab060a221a12c93239d2e9b329b03c0d317b7 (diff)
downloadcoreboot-1d2aed2367b83cd2a0651fa85756c5f394c136f9.tar.xz
drivers/mrc_cache: only add mrc.cache when CACHE_MRC_SETTINGS is set
In commit decd0628 (drivers/mrc_cache: move mrc_cache support to drivers) mrc.cache is always added, but CONFIG_MRC_SETTINGS_CACHE_SIZE is not used in Sandy Bridge, which makes mrc.cache have zero size and the machine will fail to boot after the first boot. Change-Id: Iab3ac87e43408ef51f0158f319eb1c8ccfce8a55 Signed-off-by: Iru Cai <mytbk920423@gmail.com> Reviewed-on: https://review.coreboot.org/22925 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
-rw-r--r--src/drivers/mrc_cache/Makefile.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/drivers/mrc_cache/Makefile.inc b/src/drivers/mrc_cache/Makefile.inc
index 819d637e4f..7c8732fb73 100644
--- a/src/drivers/mrc_cache/Makefile.inc
+++ b/src/drivers/mrc_cache/Makefile.inc
@@ -1,6 +1,7 @@
+ifeq ($(CONFIG_CACHE_MRC_SETTINGS),y)
-romstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
-ramstage-$(CONFIG_CACHE_MRC_SETTINGS) += mrc_cache.c
+romstage-y += mrc_cache.c
+ramstage-y += mrc_cache.c
# Create and add the MRC cache to the cbfs image
ifneq ($(CONFIG_CHROMEOS),y)
@@ -9,8 +10,10 @@ $(obj)/mrc.cache: $(obj)/config.h
bs=$(shell printf "%d" $(CONFIG_MRC_SETTINGS_CACHE_SIZE) ) | \
tr '\000' '\377' > $@
-cbfs-files-$(CONFIG_CACHE_MRC_SETTINGS) += mrc.cache
+cbfs-files-y += mrc.cache
mrc.cache-file := $(obj)/mrc.cache
mrc.cache-position := $(CONFIG_MRC_SETTINGS_CACHE_BASE)
mrc.cache-type := mrc_cache
-endif
+endif # ifneq ($(CONFIG_CHROMEOS),y)
+
+endif # ifeq ($(CONFIG_CACHE_MRC_SETTINGS),y)