0002-firmware-Text-based-screen-display-in-priority.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From 5f402b9d365dbc17ea68803aeb9a95da01708b9f Mon Sep 17 00:00:00 2001
  2. From: Paul Kocialkowski <contact@paulk.fr>
  3. Date: Mon, 10 Aug 2015 22:44:50 +0200
  4. Subject: [PATCH 2/7] firmware: Text-based screen display in priority
  5. This allows showing text-based screen displays before looking at the GBB bitmaps
  6. since those encourage the use of non-free software (Chrome OS) and don't display
  7. enough information to the user.
  8. Change-Id: I1dc454cd5de1cf096a15957832a8114d4f758eac
  9. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
  10. ---
  11. firmware/lib/vboot_display.c | 17 ++++++-----------
  12. 1 file changed, 6 insertions(+), 11 deletions(-)
  13. diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c
  14. index 1abed92..50a2e54 100644
  15. --- a/firmware/lib/vboot_display.c
  16. +++ b/firmware/lib/vboot_display.c
  17. @@ -335,20 +335,18 @@ static VbError_t VbDisplayScreenLegacy(VbCommonParams *cparams, uint32_t screen,
  18. /* If the screen is blank, turn off the backlight; else turn it on. */
  19. VbExDisplayBacklight(VB_SCREEN_BLANK == screen ? 0 : 1);
  20. - /* Look in the GBB first */
  21. - if (VBERROR_SUCCESS == VbDisplayScreenFromGBB(cparams, screen,
  22. - vncptr, locale))
  23. + /* Display default first */
  24. + if (VBERROR_SUCCESS == VbExDisplayScreen(screen, locale))
  25. return VBERROR_SUCCESS;
  26. - /* If screen wasn't in the GBB bitmaps, fall back to a default */
  27. - return VbExDisplayScreen(screen, locale);
  28. + /* If default doesn't have anything to show, fall back to GBB bitmaps */
  29. + return VbDisplayScreenFromGBB(cparams, screen, vncptr, locale);
  30. }
  31. VbError_t VbDisplayScreen(VbCommonParams *cparams, uint32_t screen,
  32. int force, VbNvContext *vncptr)
  33. {
  34. uint32_t locale;
  35. - GoogleBinaryBlockHeader *gbb = cparams->gbb;
  36. VbError_t rv;
  37. /* If requested screen is the same as the current one, we're done. */
  38. @@ -358,11 +356,8 @@ VbError_t VbDisplayScreen(VbCommonParams *cparams, uint32_t screen,
  39. /* Read the locale last saved */
  40. VbNvGet(vncptr, VBNV_LOCALIZATION_INDEX, &locale);
  41. - if (gbb->bmpfv_size == 0)
  42. - rv = VbExDisplayScreen(screen, locale);
  43. - else
  44. - rv = VbDisplayScreenLegacy(cparams, screen, force, vncptr,
  45. - locale);
  46. + rv = VbDisplayScreenLegacy(cparams, screen, force, vncptr,
  47. + locale);
  48. if (rv == VBERROR_SUCCESS)
  49. /* Keep track of the currently displayed screen */
  50. --
  51. 2.10.2