mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-23 17:55:01 +00:00
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>
This commit is contained in:
@@ -670,6 +670,49 @@ VbError_t vb2_developer_menu(struct vb2_context *ctx, VbCommonParams *cparams)
|
|||||||
/* Only disable virtual dev switch if allowed by GBB */
|
/* Only disable virtual dev switch if allowed by GBB */
|
||||||
if (!(gbb->flags & GBB_FLAG_ENTER_TRIGGERS_TONORM))
|
if (!(gbb->flags & GBB_FLAG_ENTER_TRIGGERS_TONORM))
|
||||||
break;
|
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_BUTTON_VOL_UP:
|
||||||
case VB_KEY_UP:
|
case VB_KEY_UP:
|
||||||
vb2_get_current_menu_size(current_menu,
|
vb2_get_current_menu_size(current_menu,
|
||||||
|
|||||||
Reference in New Issue
Block a user