futility/updater: Utilize identity.csv or crosid for --detect-model-only
Currently we special-case --detect-model-only to detect model by FRID
only, which is implemented in CL:3965584 in order to support non-host
programmers (i.e., cfg->dut_is_remote). However, even if the host
programmer "internal" is used, the code path will still call
manifest_detect_model_from_frid() for model detection, which may result
in incorrect result if the archive manifest contains multiple entries
with the same FRID model name. For example, Steelix and Rusty both have
the same FRID model name "Google_Steelix".
To improve it, change the condition to cfg->dut_is_remote, so that
manifest_detect_model_from_frid() will be called only for non-host
programmers. The futility --detect-model-only command running on DUT
will still utilize either identity.csv or crosid for most accurate model
detection.
BUG=b:431694612
TEST=make futil runfutiltests
BRANCH=none
Cq-Depend: chromium:6831778
Change-Id: I5aa015955018759410c5a3b6893efb24351a7ff4
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/6831795
Reviewed-by: Jakub "Kuba" Czapiga <czapiga@google.com>
Commit-Queue: Jakub "Kuba" Czapiga <czapiga@google.com>
3 files changed