[coreboot-gerrit] Change in coreboot[master]: mainboard/google/zoombini: consolidate SPD makefiles

Nick Vaccaro (Code Review) gerrit at coreboot.org
Mon Feb 26 22:27:18 CET 2018


Hello Nick Vaccaro,

I'd like you to do a code review. Please visit

    https://review.coreboot.org/23874

to review the following change.


Change subject: mainboard/google/zoombini: consolidate SPD makefiles
......................................................................

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 at chromium.org>
---
M src/mainboard/google/zoombini/Makefile.inc
R src/mainboard/google/zoombini/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex
R src/mainboard/google/zoombini/spd/Hynix_H9HCNNNCPUMLHR_4GB.spd.hex
A src/mainboard/google/zoombini/spd/Makefile.inc
R src/mainboard/google/zoombini/spd/Micron_MT53B1024M32D4_4GB.spd.hex
R src/mainboard/google/zoombini/spd/Micron_MT53B512M32D2_2GB.spd.hex
R src/mainboard/google/zoombini/spd/Samsung_K4F6E3S4HM_2GB.spd.hex
R src/mainboard/google/zoombini/spd/Samsung_K4F8E304HB_1GB.spd.hex
M src/mainboard/google/zoombini/variants/meowth/Makefile.inc
D src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc
A src/mainboard/google/zoombini/variants/zoombini/Makefile.inc
D src/mainboard/google/zoombini/variants/zoombini/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex
D src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc
13 files changed, 29 insertions(+), 110 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/23874/1

diff --git a/src/mainboard/google/zoombini/Makefile.inc b/src/mainboard/google/zoombini/Makefile.inc
index e4a036d..b1e31b4 100644
--- a/src/mainboard/google/zoombini/Makefile.inc
+++ b/src/mainboard/google/zoombini/Makefile.inc
@@ -38,3 +38,5 @@
 subdirs-y += variants/$(VARIANT_DIR)
 CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include
 subdirs-y += variants/$(VARIANT_DIR)/spd
+
+subdirs-y += spd
diff --git a/src/mainboard/google/zoombini/variants/meowth/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex b/src/mainboard/google/zoombini/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex
similarity index 100%
rename from src/mainboard/google/zoombini/variants/meowth/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex
rename to src/mainboard/google/zoombini/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex
diff --git a/src/mainboard/google/zoombini/variants/meowth/spd/Hynix_H9HCNNNCPUMLHR_4GB.spd.hex b/src/mainboard/google/zoombini/spd/Hynix_H9HCNNNCPUMLHR_4GB.spd.hex
similarity index 100%
rename from src/mainboard/google/zoombini/variants/meowth/spd/Hynix_H9HCNNNCPUMLHR_4GB.spd.hex
rename to src/mainboard/google/zoombini/spd/Hynix_H9HCNNNCPUMLHR_4GB.spd.hex
diff --git a/src/mainboard/google/zoombini/spd/Makefile.inc b/src/mainboard/google/zoombini/spd/Makefile.inc
new file mode 100644
index 0000000..b73ddd2
--- /dev/null
+++ b/src/mainboard/google/zoombini/spd/Makefile.inc
@@ -0,0 +1,19 @@
+SPD_BIN = $(obj)/spd.bin
+
+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)/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/Micron_MT53B1024M32D4_4GB.spd.hex b/src/mainboard/google/zoombini/spd/Micron_MT53B1024M32D4_4GB.spd.hex
similarity index 100%
rename from src/mainboard/google/zoombini/variants/zoombini/spd/Micron_MT53B1024M32D4_4GB.spd.hex
rename to src/mainboard/google/zoombini/spd/Micron_MT53B1024M32D4_4GB.spd.hex
diff --git a/src/mainboard/google/zoombini/variants/zoombini/spd/Micron_MT53B512M32D2_2GB.spd.hex b/src/mainboard/google/zoombini/spd/Micron_MT53B512M32D2_2GB.spd.hex
similarity index 100%
rename from src/mainboard/google/zoombini/variants/zoombini/spd/Micron_MT53B512M32D2_2GB.spd.hex
rename to src/mainboard/google/zoombini/spd/Micron_MT53B512M32D2_2GB.spd.hex
diff --git a/src/mainboard/google/zoombini/variants/meowth/spd/Samsung_K4F6E3S4HM_2GB.spd.hex b/src/mainboard/google/zoombini/spd/Samsung_K4F6E3S4HM_2GB.spd.hex
similarity index 100%
rename from src/mainboard/google/zoombini/variants/meowth/spd/Samsung_K4F6E3S4HM_2GB.spd.hex
rename to src/mainboard/google/zoombini/spd/Samsung_K4F6E3S4HM_2GB.spd.hex
diff --git a/src/mainboard/google/zoombini/variants/meowth/spd/Samsung_K4F8E304HB_1GB.spd.hex b/src/mainboard/google/zoombini/spd/Samsung_K4F8E304HB_1GB.spd.hex
similarity index 100%
rename from src/mainboard/google/zoombini/variants/meowth/spd/Samsung_K4F8E304HB_1GB.spd.hex
rename to src/mainboard/google/zoombini/spd/Samsung_K4F8E304HB_1GB.spd.hex
diff --git a/src/mainboard/google/zoombini/variants/meowth/Makefile.inc b/src/mainboard/google/zoombini/variants/meowth/Makefile.inc
index 51ebbad..487bc44 100644
--- a/src/mainboard/google/zoombini/variants/meowth/Makefile.inc
+++ b/src/mainboard/google/zoombini/variants/meowth/Makefile.inc
@@ -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
diff --git a/src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc b/src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc
deleted file mode 100644
index a4a7955..0000000
--- a/src/mainboard/google/zoombini/variants/meowth/spd/Makefile.inc
+++ /dev/null
@@ -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
diff --git a/src/mainboard/google/zoombini/variants/zoombini/Makefile.inc b/src/mainboard/google/zoombini/variants/zoombini/Makefile.inc
new file mode 100644
index 0000000..6007e12
--- /dev/null
+++ b/src/mainboard/google/zoombini/variants/zoombini/Makefile.inc
@@ -0,0 +1,3 @@
+SPD_SOURCES = Hynix_H9HCNNN8KUMLHR_1GB          # 0b000
+SPD_SOURCES += Micron_MT53B512M32D2_2GB         # 0b001
+SPD_SOURCES += Micron_MT53B1024M32D4_4GB        # 0b010
diff --git a/src/mainboard/google/zoombini/variants/zoombini/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex b/src/mainboard/google/zoombini/variants/zoombini/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex
deleted file mode 100644
index 7b13b4d..0000000
--- a/src/mainboard/google/zoombini/variants/zoombini/spd/Hynix_H9HCNNN8KUMLHR_1GB.spd.hex
+++ /dev/null
@@ -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
diff --git a/src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc b/src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc
deleted file mode 100644
index a0bf3e3..0000000
--- a/src/mainboard/google/zoombini/variants/zoombini/spd/Makefile.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## This file is part of the coreboot project.
-##
-## Copyright 2017 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_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)
-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

-- 
To view, visit https://review.coreboot.org/23874
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2291ebaf0ef5da1b22eb0e8fa7af8dbb50848c29
Gerrit-Change-Number: 23874
Gerrit-PatchSet: 1
Gerrit-Owner: Nick Vaccaro <nvaccaro at google.com>
Gerrit-Reviewer: Nick Vaccaro <nvaccaro at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180226/fb1c5743/attachment-0001.html>


More information about the coreboot-gerrit mailing list