summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2012-09-27 14:54:02 +0800
committerGerrit <chrome-bot@google.com>2012-09-27 19:08:01 -0700
commitcb85206ebf1e5fc551c1df1d1f6e016b05a16b2f (patch)
tree2dd63b58d95e49288fbbcf8d44ae855a9b1f9858
parent283cbf89a9893f3a024809eb7d6c84ed353df6b4 (diff)
downloadvboot-cb85206ebf1e5fc551c1df1d1f6e016b05a16b2f.tar.gz
vboot_api_kernel: 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=flash image to Link, set GBB flags to 0x39, boot to DEV screen and press SPACE (TONORM); gets beep and warning messages. Change-Id: Id48c12693c7575001fae7fad92a868cb5465e83d Reviewed-on: https://gerrit.chromium.org/gerrit/34172 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org>
-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 750edb24..8f7be6ab 100644
--- a/firmware/lib/vboot_api_kernel.c
+++ b/firmware/lib/vboot_api_kernel.c
@@ -201,6 +201,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: