diff options
author | Bill Richardson <wfrichar@chromium.org> | 2011-11-28 12:20:54 -0800 |
---|---|---|
committer | Stefan Reinauer <reinauer@chromium.org> | 2011-12-06 15:00:45 -0800 |
commit | 8b3e29c101dd2fc89a986d9e200ec9ae63d6db7b (patch) | |
tree | b296c491381e0149f8cf32bc391b343879d4b097 | |
parent | 9400324371a8beb7b77add430e17fb0576c7daf0 (diff) | |
download | vboot-8b3e29c101dd2fc89a986d9e200ec9ae63d6db7b.tar.gz |
ONLY pressing the recovery button okays booting from USB
BUG=chrome-os-partner:1113
TEST=manual
With the dev-switch OFF, insert a bootable USB drive, reboot while holding
down recovery button. It should boot from the USB without prompting for
removal.
With the dev-switch OFF and the same bootable USB drive inserted, run
crossystem recovery_request=2
reboot
The BIOS screen should prompt you to remove the USB drive, then to insert it
before it will boot from the USB.
Prior to this fix, using recovery_request=2 would NOT require removal, while
other non-zero values would. NO values of recovery_request should be able to
override the removal request. Only physically pressing the button should
allow booting immediately from recovery mode with the dev-switch OFF.
Change-Id: I9a670e4ddf2f9691373bc0919978164d6c0e624e
Reviewed-on: https://gerrit.chromium.org/gerrit/12143
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/12445
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index a8368603..344adb64 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -194,8 +194,10 @@ VbError_t VbBootRecovery(VbCommonParams* cparams, LoadKernelParams* p) { VBDEBUG(("VbBootRecovery() start\n")); - /* If dev mode switch is off, require removal of all external media. */ - if (!(shared->flags & VBSD_BOOT_DEV_SWITCH_ON)) { + /* If the dev-mode switch is off and the user didn't press the recovery + * button, require removal of all external media. */ + if (!(shared->flags & VBSD_BOOT_DEV_SWITCH_ON) && + !(shared->flags & VBSD_BOOT_REC_SWITCH_ON)) { VbDiskInfo* disk_info = NULL; uint32_t disk_count = 0; |