mainboard/google/zoombini: consolidate SPD makefiles

- consolidate commonality in meowth and zoombini's SPD makefiles into
  a common zoombini/spd/Makefile.inc
- move all SPD hex files into zoombini/spd directory
- move SPD_SOURCES definitions to variants/$(VARIANT_DIR)/Makefile.inc

BUG=b:69011806,b:71776625
BRANCH=master
TEST=Verify 'emerge-meowth coreboot' and 'emerge-zoombini coreboot'
compile and boot successfully.

Change-Id: I2291ebaf0ef5da1b22eb0e8fa7af8dbb50848c29
Signed-off-by: Nick Vaccaro <nvaccaro@chromium.org>
Reviewed-on: https://review.coreboot.org/23874
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Nick Vaccaro 2018-02-26 13:12:11 -08:00 committed by Martin Roth
parent c3892c8fa8
commit c8f0a6c31a
12 changed files with 33 additions and 84 deletions

View File

@ -1,7 +1,7 @@
##
## This file is part of the coreboot project.
##
## Copyright 2017 Google Inc.
## Copyright 2018 Google Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -38,3 +38,5 @@ CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
subdirs-y += variants/$(VARIANT_DIR)
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
subdirs-y += variants/$(VARIANT_DIR)/spd
subdirs-y += spd

View File

@ -1,7 +1,7 @@
##
## This file is part of the coreboot project.
##
## Copyright 2017 Google Inc.
## Copyright 2018 Google Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -15,22 +15,18 @@
SPD_BIN = $(obj)/spd.bin
SPD_SOURCES = Hynix_H9HCNNN8KUMLHR_1GB # 0b000
SPD_SOURCES += Micron_MT53B512M32D2_2GB # 0b001
SPD_SOURCES += Micron_MT53B1024M32D4_4GB # 0b010
ifeq ($(SPD_SOURCES),)
SPD_DEPS := $(error SPD_SOURCES is not set. Variant must provide this)
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)
SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/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; \
do for c in $$(cat $$f | grep -v ^#); \
do printf $$(printf '\%o' 0x$$c); \
done; \
done > $@
cbfs-files-y += spd.bin

View File

@ -1,7 +1,7 @@
##
## This file is part of the coreboot project.
##
## Copyright 2017 Google Inc.
## Copyright 2018 Google Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -13,6 +13,11 @@
## GNU General Public License for more details.
##
SPD_SOURCES = Samsung_K4F8E304HB_1GB # 0b000
SPD_SOURCES += Hynix_H9HCNNN8KUMLHR_1GB # 0b001
SPD_SOURCES += Samsung_K4F6E3S4HM_2GB # 0b010
SPD_SOURCES += Hynix_H9HCNNNCPUMLHR_4GB # 0b011
bootblock-y += gpio.c
romstage-y += memory.c

View File

@ -1,40 +0,0 @@
##
## This file is part of the coreboot project.
##
## Copyright 2017 Google Inc.
## Copyright (C) 2017 Intel Corporation.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; version 2 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
SPD_BIN = $(obj)/spd.bin
SPD_SOURCES = Samsung_K4F8E304HB_1GB # 0b000
SPD_SOURCES += Hynix_H9HCNNN8KUMLHR_1GB # 0b001
SPD_SOURCES += Samsung_K4F6E3S4HM_2GB # 0b010
SPD_SOURCES += Hynix_H9HCNNNCPUMLHR_4GB # 0b011
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

View File

@ -0,0 +1,18 @@
##
## This file is part of the coreboot project.
##
## Copyright 2018 Google Inc.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; version 2 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
SPD_SOURCES = Hynix_H9HCNNN8KUMLHR_1GB # 0b000
SPD_SOURCES += Micron_MT53B512M32D2_2GB # 0b001
SPD_SOURCES += Micron_MT53B1024M32D4_4GB # 0b010

View File

@ -1,32 +0,0 @@
23 11 10 0E 15 19 05 08 00 40 00 00 02 22 00 00
48 00 05 FF 92 55 00 00 8C 00 90 A8 90 A0 05 D0
02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 9E 00 A7 CF D0
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00