diff options
author | Hung-Te Lin <hungte@chromium.org> | 2019-03-11 12:14:22 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-12 03:33:00 -0700 |
commit | 3f02fc10e59fbbe77f831a047793849a205a5889 (patch) | |
tree | e428a7ddc5949d93afa062b884f5d4775c056a78 | |
parent | 1516f722948242c3335b5bda2ce5b4dc3d2027ff (diff) | |
download | vboot-3f02fc10e59fbbe77f831a047793849a205a5889.tar.gz |
futility: updater: Allow single model devices with broken mosys to update
We are recently seeing more and more issues that mosys on early build of
devices can't report model properly and caused recovery to fail.
For single-model manifest, the updater used to double check if "mosys
platform name" matches the single model name for unibuild devices
(non-empty signature_id); however this is not really necessary since we
have other platform checks and key checks.
Remove the check and always return the single model to simplify
development in early stage.
BUG=None
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None
Change-Id: I1bb901dc9661623cd1161dde6ee4573c5da958a7
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1513997
Reviewed-by: Joel Kitching <kitching@chromium.org>
-rw-r--r-- | futility/updater_archive.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/futility/updater_archive.c b/futility/updater_archive.c index 3c3dac0f..73d1c05b 100644 --- a/futility/updater_archive.c +++ b/futility/updater_archive.c @@ -799,11 +799,15 @@ const struct model_config *manifest_find_model(const struct manifest *manifest, const struct model_config *model = NULL; int i; - /* Match if the manifest has only one package without signature. */ - if (manifest->num == 1 && !manifest->models[0].signature_id) - model = &manifest->models[0]; - - if (!model && !model_name) { + /* + * For manifest with single model defined, we should just return because + * there are other mechanisms like platform name check to double confirm + * if the firmware is valid. + */ + if (manifest->num == 1) + return &manifest->models[0]; + + if (!model_name) { sys_model_name = host_shell("mosys platform model"); DEBUG("System model name: '%s'", sys_model_name); model_name = sys_model_name; |