0005-firmware-Separate-screen-and-wait-at-device-informat.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. From 457f2227845335bed16b190499278a887eca3939 Mon Sep 17 00:00:00 2001
  2. From: Paul Kocialkowski <contact@paulk.fr>
  3. Date: Mon, 10 Aug 2015 23:53:48 +0200
  4. Subject: [PATCH 5/7] firmware: Separate screen and wait at device information
  5. screen
  6. This blanks the screen (instead of redrawing it) at device information and
  7. waits for the user to press any key to come back to the developer mode screen.
  8. Change-Id: I16364e69ce5bbaba5689f9f7af29c593ddea8558
  9. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
  10. ---
  11. firmware/lib/vboot_api_kernel.c | 12 ++++++++++++
  12. firmware/lib/vboot_display.c | 13 ++++++++-----
  13. 2 files changed, 20 insertions(+), 5 deletions(-)
  14. diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
  15. index 5cf45ec..53ef5c7 100644
  16. --- a/firmware/lib/vboot_api_kernel.c
  17. +++ b/firmware/lib/vboot_api_kernel.c
  18. @@ -481,6 +481,18 @@ developer_mode_screen:
  19. "hold developer mode screen\n"));
  20. hold = 1;
  21. break;
  22. + case 0x09:
  23. + /* Ctrl+I = device information */
  24. + VBDEBUG(("VbBootDeveloper() - "
  25. + "device info\n"));
  26. +
  27. + hold = 1;
  28. + VbDisplayDebugInfo(cparams, &vnc);
  29. +
  30. + while (!VbExKeyboardRead()) ;
  31. +
  32. + goto developer_mode_screen;
  33. + break;
  34. case 0x0c:
  35. VBDEBUG(("VbBootDeveloper() - "
  36. "user pressed Ctrl+L; Try legacy boot\n"));
  37. diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
  38. index 50a2e54..6d8ed92 100644
  39. --- a/firmware/lib/vboot_display.c
  40. +++ b/firmware/lib/vboot_display.c
  41. @@ -544,7 +544,7 @@ const char *RecoveryReasonString(uint8_t code)
  42. return "We have no idea what this means";
  43. }
  44. -#define DEBUG_INFO_SIZE 512
  45. +#define DEBUG_INFO_SIZE 768
  46. VbError_t VbDisplayDebugInfo(VbCommonParams *cparams, VbNvContext *vncptr)
  47. {
  48. @@ -559,8 +559,8 @@ VbError_t VbDisplayDebugInfo(VbCommonParams *cparams, VbNvContext *vncptr)
  49. VbError_t ret;
  50. uint32_t i;
  51. - /* Redisplay current screen to overwrite any previous debug output */
  52. - VbDisplayScreen(cparams, disp_current_screen, 1, vncptr);
  53. + /* Blank screen */
  54. + VbDisplayScreen(cparams, VB_SCREEN_BLANK, 1, vncptr);
  55. /* Add hardware ID */
  56. VbRegionReadHWID(cparams, hwid, sizeof(hwid));
  57. @@ -669,8 +669,11 @@ VbError_t VbDisplayDebugInfo(VbCommonParams *cparams, VbNvContext *vncptr)
  58. used += StrnAppend(buf + used, sha1sum, DEBUG_INFO_SIZE - used);
  59. }
  60. - /* Make sure we finish with a newline */
  61. - used += StrnAppend(buf + used, "\n", DEBUG_INFO_SIZE - used);
  62. + /* Make sure we finish with newlines */
  63. + used += StrnAppend(buf + used, "\n\n", DEBUG_INFO_SIZE - used);
  64. +
  65. + used += StrnAppend(buf + used, "Press any key to continue\n\n",
  66. + DEBUG_INFO_SIZE - used);
  67. /* TODO: add more interesting data:
  68. * - Information on current disks */
  69. --
  70. 2.10.2