summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2012-09-27 14:54:02 +0800
committerShawn Nematbakhsh <shawnn@google.com>2012-10-17 16:51:39 -0700
commit71bcbb3e25357947506513bb07e05e2957c61d19 (patch)
tree7fa38be2b38440d42a969f1e31297c19d1f7ed3c
parent9f5af2f478e39ed223fb6dde29da9a2c38786de6 (diff)
downloadvboot-71bcbb3e25357947506513bb07e05e2957c61d19.tar.gz
BUTTERFLY-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=all BUG=chrome-os-partner:14474 TEST=manual, test basic firmware functions. Change-Id: I607b1a005632cd15bc7e109006e6095edfb20543 Original-Change-Id: Id48c12693c7575001fae7fad92a868cb5465e83d Reviewed-on: https://gerrit.chromium.org/gerrit/35781 Reviewed-by: Shawn Nematbakhsh <shawnn@google.com> Tested-by: Shawn Nematbakhsh <shawnn@google.com>
-rw-r--r--firmware/lib/vboot_api_kernel.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
index ccd97997..41653084 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -199,6 +199,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: