0004-firmware-Screen-blank-and-wait-at-disabled-USB-boot-.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From 4560df9f84e342ef51cf071dccd01e3fb5838a37 Mon Sep 17 00:00:00 2001
  2. From: Paul Kocialkowski <contact@paulk.fr>
  3. Date: Mon, 10 Aug 2015 23:13:49 +0200
  4. Subject: [PATCH 4/7] firmware: Screen blank and wait at disabled USB boot
  5. warning
  6. This blanks the screen before showing the disabled USB boot warning.
  7. It also waits for the user to press any key to come back to the developer mode
  8. screen.
  9. Change-Id: Ic23f1e0f8d269242a9b7af6941806951016e6eb4
  10. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
  11. ---
  12. firmware/lib/vboot_api_kernel.c | 12 +++++++++++-
  13. 1 file changed, 11 insertions(+), 1 deletion(-)
  14. diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
  15. index 2e31f08..5cf45ec 100644
  16. --- a/firmware/lib/vboot_api_kernel.c
  17. +++ b/firmware/lib/vboot_api_kernel.c
  18. @@ -376,6 +376,7 @@ VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
  19. }
  20. }
  21. +developer_mode_screen:
  22. /* Show the dev mode warning screen */
  23. VbDisplayScreen(cparams, VB_SCREEN_DEVELOPER_WARNING, 0, &vnc);
  24. @@ -498,14 +499,23 @@ VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
  25. if (!allow_usb) {
  26. VBDEBUG(("VbBootDeveloper() - "
  27. "USB booting is disabled\n"));
  28. +
  29. + VbDisplayScreen(cparams, VB_SCREEN_BLANK, 1,
  30. + &vnc);
  31. +
  32. VbExDisplayDebugInfo(
  33. "WARNING: Booting from external media "
  34. "(USB/SD) has not been enabled. Refer "
  35. "to the developer-mode documentation "
  36. - "for details.\n");
  37. + "for details.\n\n"
  38. + "Press any key to continue.\n\n");
  39. VbExBeep(120, 400);
  40. VbExSleepMs(120);
  41. VbExBeep(120, 400);
  42. +
  43. + while (!VbExKeyboardRead()) ;
  44. +
  45. + goto developer_mode_screen;
  46. } else {
  47. /*
  48. * Clear the screen to show we get the Ctrl+U
  49. --
  50. 2.10.2