summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShelley Chen <shchen@chromium.org>2017-02-14 14:50:54 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-03-02 09:33:57 -0800
commit19a41188cd50b5cdcd6fc50b718031a3d469c025 (patch)
tree77c2760ea4f29214d8d591fddebb12201c837fcb
parente6198e7fc0e9c998fb89ad180fefc9f87340df51 (diff)
downloadvboot-19a41188cd50b5cdcd6fc50b718031a3d469c025.tar.gz
poppy: reinstating fw ctrl functions
Putting ctrl+D, ctrl+U, ctrl+L shortcuts back in from the fw screens. BUG=b:35585623 BRANCH=None TEST=reboot and try ctrl+D, etc. in fw screen to make sure that they have desired effects. Change-Id: I5ca555658eddabeeea6a2f64794e6839f35d75f7 Signed-off-by: Shelley Chen <shchen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/443349 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--firmware/lib/vboot_ui_menu.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index c731c733..7cf18525 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -670,6 +670,49 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
/* Only disable virtual dev switch if allowed by GBB */
if (!(gbb->flags & GBB_FLAG_ENTER_TRIGGERS_TONORM))
break;
+ case 0x04:
+ /* Ctrl+D = dismiss warning; advance to timeout */
+ VB2_DEBUG("user pressed Ctrl+D; skip delay\n");
+ ctrl_d_pressed = 1;
+ goto fallout;
+ break;
+ case 0x0c:
+ VB2_DEBUG("user pressed Ctrl+L; Try legacy boot\n");
+ VbTryLegacyMenu(allow_legacy);
+ break;
+ case 0x15:
+ /* Ctrl+U = try USB boot, or beep if failure */
+ VB2_DEBUG("user pressed Ctrl+U; try USB\n");
+ if (!allow_usb) {
+ VB2_DEBUG("USB booting is disabled\n");
+ VbExDisplayDebugInfo(
+ "WARNING: Booting from external media "
+ "(USB/SD) has not been enabled. Refer "
+ "to the developer-mode documentation "
+ "for details.\n");
+ VbExBeep(120, 400);
+ VbExSleepMs(120);
+ VbExBeep(120, 400);
+ } else {
+ /*
+ * Clear the screen to show we get the Ctrl+U
+ * key press.
+ */
+ VbDisplayScreen(ctx, cparams, VB_SCREEN_BLANK,
+ 0);
+ if (VBERROR_SUCCESS ==
+ VbTryUsbMenu(ctx, cparams)) {
+ VbAudioClose(audio);
+ return VBERROR_SUCCESS;
+ } else {
+ /* Show dev mode warning screen again */
+ VbDisplayScreen(ctx,
+ cparams,
+ VB_SCREEN_BASE,
+ 0);
+ }
+ }
+ break;
case VB_BUTTON_VOL_UP:
case VB_KEY_UP:
vb2_get_current_menu_size(current_menu,