util/spd_tools: Automatically determine the SPD dir in part_id_gen
commit4e4e2d7ab1fbb6a6c744b3fed9072f92706b5952
authorReka Norman <rekanorman@google.com>
Mon, 13 Sep 2021 01:47:54 +0000 (13 11:47 +1000)
committerFurquan Shaikh <furquan@google.com>
Tue, 21 Sep 2021 17:21:39 +0000 (21 17:21 +0000)
tree69e8eff0fb3bbabd0a7ce729157b812a76e675aa
parent780b04e639976eabc784ac40f802ee0fc9275056
util/spd_tools: Automatically determine the SPD dir in part_id_gen

Currently, one of the arguments to part_id_gen is the directory
containing the SPD files, e.g. spd/lp4x/set-0. This requires the user of
the tool to understand the spd/ directory structure, and manually look
up the set number corresponding to their platform.

Change part_id_gen to take the platform and memory technology as
arguments instead of the SPD directory, and automatically determine the
SPD directory by reading the platforms manifest file generated by
spd_gen.go.

BUG=b:191776301
TEST=Run part_id_gen and check that the generated Makefile.inc and
dram_id.generated.txt are the same as before. Example:
util/spd_tools/bin/part_id_gen \
  ADL \
  lp4x \
  src/mainboard/google/brya/variants/kano/memory \
  src/mainboard/google/brya/variants/kano/memory/mem_parts_used.txt

Change-Id: I7cd7243d76b5769e8a15daa56b8438274bdd8e96
Signed-off-by: Reka Norman <rekanorman@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57586
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
util/spd_tools/src/part_id_gen/part_id_gen.go