diff options
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 |