From e83d30bb5a240757b2e0a712e012c9fe6ab44f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Tue, 25 Aug 2020 13:55:53 +0200 Subject: mb: remove duplicated Make code for spd.bin generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop duplicated code for spd.bin generation that is provided globally in lib/Makefile.inc. For all affected boards it has been verified that the output binary functionally matches the original one. The changed execution order of Make instructions influenced the cbfs file order. Hence, the rom images can't be compared directly. Thus, the output files of the two timeless abuild runs have been compared. Further, it was verified that the final files in cbfs stay identical, by comparing the extracted cbfs of each board. The boards (possibly) needing modification could be found with something like this (with false positives, though): find src/mainboard -name Makefile.inc | \ xargs egrep 'SPD_BIN|SPD_DEPS' | cut -d: -f1 | sort -u Signed-off-by: Michael Niewöhner Change-Id: Icd3ac0fd6c901228554115c6350d88bb49874587 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44774 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/mainboard/lenovo/x1_carbon_gen1/Kconfig | 1 + .../lenovo/x1_carbon_gen1/spd/Makefile.inc | 21 +++------------------ src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.hex | 16 ---------------- .../lenovo/x1_carbon_gen1/spd/elpida.spd.hex | 16 ++++++++++++++++ src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex | 16 ---------------- .../lenovo/x1_carbon_gen1/spd/hynix.spd.hex | 16 ++++++++++++++++ src/mainboard/lenovo/x1_carbon_gen1/spd/samsung.hex | 16 ---------------- .../lenovo/x1_carbon_gen1/spd/samsung.spd.hex | 16 ++++++++++++++++ 8 files changed, 52 insertions(+), 66 deletions(-) delete mode 100644 src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.hex create mode 100644 src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.spd.hex delete mode 100644 src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex create mode 100644 src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.spd.hex delete mode 100644 src/mainboard/lenovo/x1_carbon_gen1/spd/samsung.hex create mode 100644 src/mainboard/lenovo/x1_carbon_gen1/spd/samsung.spd.hex (limited to 'src/mainboard/lenovo/x1_carbon_gen1') diff --git a/src/mainboard/lenovo/x1_carbon_gen1/Kconfig b/src/mainboard/lenovo/x1_carbon_gen1/Kconfig index adb999430c..cff79031b2 100644 --- a/src/mainboard/lenovo/x1_carbon_gen1/Kconfig +++ b/src/mainboard/lenovo/x1_carbon_gen1/Kconfig @@ -22,6 +22,7 @@ config BOARD_SPECIFIC_OPTIONS select MAINBOARD_HAS_LIBGFXINIT select GFX_GMA_PANEL_1_ON_LVDS select INTEL_GMA_HAVE_VBT + select GENERIC_SPD_BIN # Workaround for EC/KBC IRQ1. select SERIRQ_CONTINUOUS_MODE diff --git a/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc b/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc index e047c6ee58..d3244d1a9c 100644 --- a/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc +++ b/src/mainboard/lenovo/x1_carbon_gen1/spd/Makefile.inc @@ -1,20 +1,5 @@ ## SPDX-License-Identifier: GPL-2.0-only -SPD_BIN = $(obj)/spd.bin - -SPD_SOURCES = elpida.hex # 0b0000 Single Channel 2GB -SPD_SOURCES += hynix.hex # 0b0001 2GiB -SPD_SOURCES += samsung.hex # 0b0010 4GiB -SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f)) - -# 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 +SPD_SOURCES = elpida # 0b0000 Single Channel 2GB +SPD_SOURCES += hynix # 0b0001 2GiB +SPD_SOURCES += samsung # 0b0010 4GiB diff --git a/src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.hex b/src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.hex deleted file mode 100644 index 816254d379..0000000000 --- a/src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.hex +++ /dev/null @@ -1,16 +0,0 @@ -92 11 0b 03 04 00 00 01 03 52 01 08 0c 00 20 00 -6c 78 6c 30 6c 11 20 81 f8 0a 3c 3c 01 68 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 35 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 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/lenovo/x1_carbon_gen1/spd/elpida.spd.hex b/src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.spd.hex new file mode 100644 index 0000000000..816254d379 --- /dev/null +++ b/src/mainboard/lenovo/x1_carbon_gen1/spd/elpida.spd.hex @@ -0,0 +1,16 @@ +92 11 0b 03 04 00 00 01 03 52 01 08 0c 00 20 00 +6c 78 6c 30 6c 11 20 81 f8 0a 3c 3c 01 68 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 63 35 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 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/lenovo/x1_carbon_gen1/spd/hynix.hex b/src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex deleted file mode 100644 index 111745ce2d..0000000000 --- a/src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.hex +++ /dev/null @@ -1,16 +0,0 @@ -92 11 0b 03 04 00 00 02 03 52 01 08 0c 00 20 00 -6c 78 6c 3c 6c 11 20 81 28 08 3c 3c 01 68 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 ae ea -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 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/lenovo/x1_carbon_gen1/spd/hynix.spd.hex b/src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.spd.hex new file mode 100644 index 0000000000..111745ce2d --- /dev/null +++ b/src/mainboard/lenovo/x1_carbon_gen1/spd/hynix.spd.hex @@ -0,0 +1,16 @@ +92 11 0b 03 04 00 00 02 03 52 01 08 0c 00 20 00 +6c 78 6c 3c 6c 11 20 81 28 08 3c 3c 01 68 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 ae ea +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 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/lenovo/x1_carbon_gen1/spd/samsung.hex b/src/mainboard/lenovo/x1_carbon_gen1/spd/samsung.hex deleted file mode 100644 index 24186362b8..0000000000 --- a/src/mainboard/lenovo/x1_carbon_gen1/spd/samsung.hex +++ /dev/null @@ -1,16 +0,0 @@ -92 11 0b 03 04 00 00 0a 03 52 01 08 0c 00 20 00 -6c 78 6c 3c 6c 11 20 81 28 08 3c 3c 01 68 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 c6 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -00 00 00 00 00 00 00 00 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/lenovo/x1_carbon_gen1/spd/samsung.spd.hex b/src/mainboard/lenovo/x1_carbon_gen1/spd/samsung.spd.hex new file mode 100644 index 0000000000..24186362b8 --- /dev/null +++ b/src/mainboard/lenovo/x1_carbon_gen1/spd/samsung.spd.hex @@ -0,0 +1,16 @@ +92 11 0b 03 04 00 00 0a 03 52 01 08 0c 00 20 00 +6c 78 6c 3c 6c 11 20 81 28 08 3c 3c 01 68 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 c6 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -- cgit v1.2.3