summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vendorcode/google/chromeos/cr50_enable_update.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vendorcode/google/chromeos/cr50_enable_update.c b/src/vendorcode/google/chromeos/cr50_enable_update.c
index 5b3a1a3474..e30fe2a44c 100644
--- a/src/vendorcode/google/chromeos/cr50_enable_update.c
+++ b/src/vendorcode/google/chromeos/cr50_enable_update.c
@@ -72,8 +72,12 @@ static void enable_update(void *unused)
int cr50_reset_reqd = 0;
uint8_t num_restored_headers;
- /* Nothing to do on recovery mode. */
- if (vboot_recovery_mode_enabled())
+ /**
+ * Never update during manually-triggered recovery to ensure update
+ * cannot interfere. Non-manual VB2_RECOVERY_TRAIN_AND_REBOOT
+ * sometimes used to update in factory.
+ */
+ if (vboot_get_context()->flags & VB2_CONTEXT_FORCE_RECOVERY_MODE)
return;
ret = tlcl_lib_init();