summaryrefslogtreecommitdiffstats
path: root/util/spd_tools/Makefile
diff options
context:
space:
mode:
authorReka Norman <rekanorman@google.com>2021-09-09 14:49:55 +1000
committerFurquan Shaikh <furquan@google.com>2021-09-20 23:51:07 +0000
commitb05edb1fea25c71c802ba5bc6c64c7f9cb9a5e85 (patch)
treec1110bd0bcaa5ff73432d4d7d808cde454968ba5 /util/spd_tools/Makefile
parentcf0014b14552038181d3a3c22448b9a5e77e755b (diff)
downloadcoreboot-b05edb1fea25c71c802ba5bc6c64c7f9cb9a5e85.tar.gz
coreboot-b05edb1fea25c71c802ba5bc6c64c7f9cb9a5e85.tar.bz2
coreboot-b05edb1fea25c71c802ba5bc6c64c7f9cb9a5e85.zip
util/spd_tools: Implement a unified version of the part_id_gen tool
Currently there are two versions of gen_part_id.go, one for LP4x and one DDR4. This change implements a unified version of this tool. The new part_id_gen.go is almost identical to the existing ddr4/gen_part_id.go. The new version was based on the ddr4 version and not the lp4x version, since the ddr4 version contains extra logic to support fixed IDs in the mem_parts_used files. The only non-trivial change from ddr4/gen_part_id.go is to include the full paths of SPD files in the generated Makefile.inc. E.g. instead of SPD_SOURCES += lp4x-spd-1.hex the full path relative to the coreboot root directory is included: SPD_SOURCES += spd/lp4x/set-0/spd-1.hex BUG=b:191776301 TEST=For each variant of brya/volteer/dedede/guybrush/zork, run part_id_gen and verify that the generated Makefile.inc and dram_id.generated.txt are identical to those currently in the src tree, except for the modified SPD file paths in Makefile.inc. Example: util/spd_tools/bin/part_id_gen \ spd/lp4x/set-0 \ src/mainboard/google/brya/variants/kano/memory \ src/mainboard/google/brya/variants/kano/memory/mem_parts_used.txt Change-Id: Ib33d09076f340f688519dae7956a2b27af090c0b Signed-off-by: Reka Norman <rekanorman@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57585 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'util/spd_tools/Makefile')
-rw-r--r--util/spd_tools/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/spd_tools/Makefile b/util/spd_tools/Makefile
index 8a9d3924a11f..d8806724fa3f 100644
--- a/util/spd_tools/Makefile
+++ b/util/spd_tools/Makefile
@@ -1,10 +1,14 @@
SPD_GEN = bin/spd_gen
+PART_ID_GEN = bin/part_id_gen
-all: $(SPD_GEN)
+all: $(SPD_GEN) $(PART_ID_GEN)
$(SPD_GEN):
go build -o $(SPD_GEN) src/spd_gen/*.go
+$(PART_ID_GEN):
+ go build -o $(PART_ID_GEN) src/part_id_gen/*.go
+
clean:
rm -rf bin/