core/platform: allow probe function to fail when only one platform exists
Mosys can now compile for just a single platform. This feature is
currently enabled on all unibuild boards.
Before, if a device is mis-provisioned (e.g., missing VPD values,
incorrect SKU in CBI, etc.), mosys will be completely
non-functional. But now that we are compiling for a known platform at
build-time, we can execute most commands (e.g., "mosys memory spd",
"mosys ec info", etc) without needing the model-specific info.
This detects the case we are compiled for only a single platform_intf
and allows the probe to fail. A warning is still printed in this
case, but most mosys commands will continue to function.
BUG=chromium:1070692
TEST=On snappy:
- vpd -s customization_id=BAD && reboot
- mosys memory spd print all
-> notice command works, but we see a warning
Change-Id: Ieef01d524e440da27814a9d4477456c7f84d9046
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/mosys/+/2358455
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: C Shapiro <shapiroc@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
2 files changed