summaryrefslogtreecommitdiff
path: root/src/mainboard/google/zoombini/Makefile.inc
diff options
context:
space:
mode:
authorNick Vaccaro <nvaccaro@chromium.org>2017-12-22 23:01:00 -0800
committerDuncan Laurie <dlaurie@chromium.org>2018-01-09 18:19:32 +0000
commit38fcc8ab5022558928e0cb464b50ebd02ee67c21 (patch)
tree85bd1e530a5ddd3b055bb9ab3ab6345bf1b9ceeb /src/mainboard/google/zoombini/Makefile.inc
parentb3585b9b351adbce05515581e13a6039f8cd4dd3 (diff)
mainboard/google/zoombini: Provide memory configuration variant API
Add support for memory configuration by providing weak implementation from the baseboard. All SPD files are present under spd/ directory. SPD_SOURCES must be provided by the variants to ensure that required SPD hex files are included in the SPD binary. BUG=b:64395641 BRANCH=None TEST=Verify "./util/abuild/abuild -p none -t google/zoombini -x -a" compiles successfully. Change-Id: I449ab56dfc7a75752944b58ba6291b5ee32f81ad Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org> Reviewed-on: https://review.coreboot.org/22205 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/mainboard/google/zoombini/Makefile.inc')
-rw-r--r--src/mainboard/google/zoombini/Makefile.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mainboard/google/zoombini/Makefile.inc b/src/mainboard/google/zoombini/Makefile.inc
index b6fe25e415..a361dcede7 100644
--- a/src/mainboard/google/zoombini/Makefile.inc
+++ b/src/mainboard/google/zoombini/Makefile.inc
@@ -20,6 +20,7 @@ verstage-$(CONFIG_CHROMEOS) += chromeos.c
romstage-y += boardid.c
romstage-$(CONFIG_CHROMEOS) += chromeos.c
+romstage-y += memory.c
romstage-y += romstage.c
ramstage-y += boardid.c
@@ -34,3 +35,23 @@ 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