mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Add CTRL-L in dev screen to support a "legacy boot option"
This option is disabled per default and can be enabled with
crossystem dev_boot_legacy=1
or by setting the GBB flag
GBB_FLAG_FORCE_DEV_BOOT_LEGACY 0x00000080
BUG=chrome-os-partner:6108
TEST=crossystem dev_boot_legacy=1
boot to dev mode screen, press CTRL-L, see SeaBIOS start
(other CLs needed)
BRANCH=link
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Change-Id: I593d2be7cff5ca07b8d08012c4514a172bd75a38
Reviewed-on: https://gerrit.chromium.org/gerrit/31265
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Stefan Reinauer <reinauer@chromium.org>
This commit is contained in:
@@ -156,16 +156,19 @@ VbError_t VbBootNormal(VbCommonParams* cparams, LoadKernelParams* p) {
|
||||
VbError_t VbBootDeveloper(VbCommonParams* cparams, LoadKernelParams* p) {
|
||||
GoogleBinaryBlockHeader* gbb = (GoogleBinaryBlockHeader*)cparams->gbb_data;
|
||||
VbSharedDataHeader* shared = (VbSharedDataHeader*)cparams->shared_data_blob;
|
||||
uint32_t allow_usb = 0;
|
||||
uint32_t allow_usb = 0, allow_legacy = 0;
|
||||
VbAudioContext* audio = 0;
|
||||
|
||||
VBDEBUG(("Entering %s()\n", __func__));
|
||||
|
||||
/* Check if USB booting is allowed */
|
||||
VbNvGet(&vnc, VBNV_DEV_BOOT_USB, &allow_usb);
|
||||
VbNvGet(&vnc, VBNV_DEV_BOOT_LEGACY, &allow_legacy);
|
||||
/* Handle GBB flag override */
|
||||
if (gbb->flags & GBB_FLAG_FORCE_DEV_BOOT_USB)
|
||||
allow_usb = 1;
|
||||
if (gbb->flags & GBB_FLAG_FORCE_DEV_BOOT_LEGACY)
|
||||
allow_legacy = 1;
|
||||
|
||||
/* Show the dev mode warning screen */
|
||||
VbDisplayScreen(cparams, VB_SCREEN_DEVELOPER_WARNING, 0, &vnc);
|
||||
@@ -227,6 +230,20 @@ VbError_t VbBootDeveloper(VbCommonParams* cparams, LoadKernelParams* p) {
|
||||
VBDEBUG(("VbBootDeveloper() - user pressed Ctrl+D; skip delay\n"));
|
||||
goto fallout;
|
||||
break;
|
||||
case 0x0c:
|
||||
VBDEBUG(("VbBootDeveloper() - user pressed Ctrl+L; Try legacy boot\n"));
|
||||
/* If VbExLegacy() succeeds, it will never return.
|
||||
* If it returns, beep.
|
||||
*/
|
||||
if (allow_legacy)
|
||||
VbExLegacy();
|
||||
else
|
||||
VBDEBUG(("VbBootDeveloper() - Legacy boot is disabled\n"));
|
||||
|
||||
VbExBeep(120, 400);
|
||||
VbExSleepMs(120);
|
||||
VbExBeep(120, 400);
|
||||
break;
|
||||
/* The Ctrl-Enter is special for Lumpy test purpose. */
|
||||
case VB_KEY_CTRL_ENTER:
|
||||
case 0x15:
|
||||
|
||||
Reference in New Issue
Block a user