summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@chromium.org>2018-01-09 12:04:27 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2018-01-11 01:07:23 +0000
commitffe6dd1f43d6fb2eefd79b2346c4eec6e477d74c (patch)
treeb28075cf7723bba0da2369387f97d7be8e2a65d0
parent48ac29ee4cbd159932d919a3d791cfe42d950b28 (diff)
downloadcoreboot-ffe6dd1f43d6fb2eefd79b2346c4eec6e477d74c.tar.xz
mainboard/google/zoombini: fix spd makefiles
The spd.bin file was not getting generated properly, so moved logic to variant's makefile. BUG=b:64395641 BRANCH=none TEST=Verify "./util/abuild/abuild -p none -t google/zoombini -x -a" compiles successfully and spd.bin is found when booting. Change-Id: I4642d6ddb5e65f721d1bde31ca0ca5b4438da554 Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org> Reviewed-on: https://review.coreboot.org/23190 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r--src/mainboard/google/zoombini/Makefile.inc19
-rw-r--r--src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc20
-rw-r--r--src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc20
3 files changed, 40 insertions, 19 deletions
diff --git a/src/mainboard/google/zoombini/Makefile.inc b/src/mainboard/google/zoombini/Makefile.inc
index a361dcede7..10ba0eb0e4 100644
--- a/src/mainboard/google/zoombini/Makefile.inc
+++ b/src/mainboard/google/zoombini/Makefile.inc
@@ -35,23 +35,4 @@ CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
subdirs-y += variants/$(VARIANT_DIR)
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
-
-# If variant using SPD files, include them in the CBFS
-ifneq ($(SPD_SOURCES),)
- SPD_BIN = $(obj)/spd.bin
- SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/spd/$(f).spd.hex)
-
-# Include spd ROM data
-$(SPD_BIN): $(SPD_DEPS)
- for f in $+; \
- do for c in $$(cat $$f | grep -v ^#); \
- do printf $$(printf '\%o' 0x$$c); \
- done; \
- done > $@
-
-cbfs-files-y += spd.bin
-spd.bin-file := $(SPD_BIN)
-spd.bin-type := spd
-endif
-
subdirs-y += variants/$(VARIANT_DIR)/spd
diff --git a/src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc b/src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc
index ff88a20b63..cca43516b7 100644
--- a/src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc
+++ b/src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc
@@ -14,4 +14,24 @@
## GNU General Public License for more details.
##
+SPD_BIN = $(obj)/spd.bin
+
SPD_SOURCES = Samsung_K4F8E304HB_1GB # 0b000
+
+ifeq ($(SPD_SOURCES),)
+ SPD_DEPS := $(error SPD_SOURCES is not set. Variant must provide this)
+else
+ SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/meowth/spd/$(f).spd.hex)
+endif
+
+# Include spd ROM data
+$(SPD_BIN): $(SPD_DEPS)
+ for f in $+; \
+ do for c in $$(cat $$f | grep -v ^#); \
+ do printf $$(printf '\%o' 0x$$c); \
+ done; \
+ done > $@
+
+cbfs-files-y += spd.bin
+spd.bin-file := $(SPD_BIN)
+spd.bin-type := spd
diff --git a/src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc b/src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc
index d55b5dbeb0..6942cb85c8 100644
--- a/src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc
+++ b/src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc
@@ -13,6 +13,26 @@
## GNU General Public License for more details.
##
+SPD_BIN = $(obj)/spd.bin
+
SPD_SOURCES = Hynix_H9HCNNN8KUMLHR_1GB # 0b000
SPD_SOURCES += Micron_MT53B512M32D2_2GB # 1b001
SPD_SOURCES += Micron_MT53B1024M32D4_4GB # 2b010
+
+ifeq ($(SPD_SOURCES),)
+ SPD_DEPS := $(error SPD_SOURCES is not set. Variant must provide this)
+else
+ SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/variants/zoombini/spd/$(f).spd.hex)
+endif
+
+# Include spd ROM data
+$(SPD_BIN): $(SPD_DEPS)
+ for f in $+; \
+ do for c in $$(cat $$f | grep -v ^#); \
+ do printf $$(printf '\%o' 0x$$c); \
+ done; \
+ done > $@
+
+cbfs-files-y += spd.bin
+spd.bin-file := $(SPD_BIN)
+spd.bin-type := spd