From ffe6dd1f43d6fb2eefd79b2346c4eec6e477d74c Mon Sep 17 00:00:00 2001 From: Nick Vaccaro Date: Tue, 9 Jan 2018 12:04:27 -0800 Subject: 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 Reviewed-on: https://review.coreboot.org/23190 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/mainboard/google/zoombini/Makefile.inc | 19 ------------------- .../google/zoombini/variants/meowth/spd/Makefile.inc | 20 ++++++++++++++++++++ .../zoombini/variants/zoombini/spd/Makefile.inc | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 19 deletions(-) (limited to 'src/mainboard') 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 -- cgit v1.2.3