0004-Blank-the-screen-before-showing-the-disabled-USB-boo.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From a131e477601a89d8ca920ff9eb49131919536976 Mon Sep 17 00:00:00 2001
  2. From: Hal Emmerich <hal@halemmerich.com>
  3. Date: Sun, 8 Dec 2019 21:57:21 -0600
  4. Subject: [PATCH] Blank the screen before showing the disabled USB boot
  5. warning, and wait for user to press a key to return to the developer mode
  6. screen
  7. ---
  8. firmware/lib/vboot_ui.c | 12 +++++++++++-
  9. 1 file changed, 11 insertions(+), 1 deletion(-)
  10. diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
  11. index c84452b7..cc8abba2 100644
  12. --- a/firmware/lib/vboot_ui.c
  13. +++ b/firmware/lib/vboot_ui.c
  14. @@ -231,6 +231,7 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx)
  15. }
  16. }
  17. +developer_mode_screen:
  18. /* Show the dev mode warning screen */
  19. VbDisplayScreen(ctx, VB_SCREEN_DEVELOPER_WARNING, 0);
  20. @@ -339,14 +340,23 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx)
  21. if (!allow_usb) {
  22. VB2_DEBUG("VbBootDeveloper() - "
  23. "USB booting is disabled\n");
  24. +
  25. + VbDisplayScreen(ctx, VB_SCREEN_BLANK, 1);
  26. +
  27. +
  28. VbExDisplayDebugInfo(
  29. "WARNING: Booting from external media "
  30. "(USB/SD) has not been enabled. Refer "
  31. "to the developer-mode documentation "
  32. - "for details.\n");
  33. + "for details.\n\n"
  34. + "Press any key to continue.\n\n");
  35. VbExBeep(120, 400);
  36. VbExSleepMs(120);
  37. VbExBeep(120, 400);
  38. +
  39. + while (!VbExKeyboardRead()) ;
  40. +
  41. + goto developer_mode_screen;
  42. } else {
  43. /*
  44. * Clear the screen to show we get the Ctrl+U
  45. --
  46. 2.20.1