diff options
author | Hung-Te Lin <hungte@chromium.org> | 2012-09-27 14:54:02 +0800 |
---|---|---|
committer | Shawn Nematbakhsh <shawnn@google.com> | 2012-10-18 19:10:52 -0700 |
commit | c42170a13ca2eae0661338c326447b6b55bd33d6 (patch) | |
tree | f3f828df0d53f588856b72d9fa7f2648889ead4a | |
parent | e6e835b4dd9d28c0b950a79288830f1b25097f4c (diff) | |
download | vboot-c42170a13ca2eae0661338c326447b6b55bd33d6.tar.gz |
STOUT-FIRMWARE: Print warning in TONORM when GBB flags force DEV.
We use gbb-flag-force-dev-switch-on in default firmware images to make
things easier for factory and some devs.
But when we request normal mode there should be some sort of warning/error
telling the user that this is not available, otherwise we can spent time trying
to figure out why the firmware doesn't work.
BRANCH=stout
BUG=chrome-os-partner:14474
TEST=manual, test basic firmware functions.
Change-Id: Id48c12693c7575001fae7fad92a868cb5465e83d
Reviewed-on: https://gerrit.chromium.org/gerrit/35918
Reviewed-by: Shawn Nematbakhsh <shawnn@google.com>
Tested-by: Shawn Nematbakhsh <shawnn@google.com>
-rw-r--r-- | firmware/lib/vboot_api_kernel.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c index b451a7af..378400f0 100644 --- a/firmware/lib/vboot_api_kernel.c +++ b/firmware/lib/vboot_api_kernel.c @@ -198,6 +198,15 @@ VbError_t VbBootDeveloper(VbCommonParams* cparams, LoadKernelParams* p) { if (shared->flags & VBSD_HONOR_VIRT_DEV_SWITCH && shared->flags & VBSD_BOOT_DEV_SWITCH_ON) { VbAudioClose(audio); /* Stop the countdown while we go ask... */ + if (gbb->flags & GBB_FLAG_FORCE_DEV_SWITCH_ON) { + /* TONORM won't work (only for non-shipping devices). */ + VBDEBUG(("%s() - TONORM rejected by GBB_FLAG_FORCE_DEV_SWITCH_ON\n", + __func__)); + VbExDisplayDebugInfo("WARNING: TONORM is prohibited by " + "GBB_FLAG_FORCE_DEV_SWITCH_ON.\n\n"); + VbExBeep(120, 400); + break; + } VbDisplayScreen(cparams, VB_SCREEN_DEVELOPER_TO_NORM, 0, &vnc); switch (VbUserConfirms(cparams, 0)) { /* Ignore space */ case 1: |