0003-firmware-Hold-key-combination-in-developer-mode.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From 78297c1fa4a158047e7bfa8bf0b3435fe498811d Mon Sep 17 00:00:00 2001
  2. From: Paul Kocialkowski <contact@paulk.fr>
  3. Date: Mon, 10 Aug 2015 22:59:50 +0200
  4. Subject: [PATCH 3/7] firmware: Hold key combination in developer mode
  5. This binds the Ctrl + H key combination to hold the developer mode screen.
  6. Change-Id: Ia76080eacd2e5e78b35b83d0f3783bfa5137794a
  7. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
  8. ---
  9. firmware/lib/vboot_api_kernel.c | 9 ++++++++-
  10. 1 file changed, 8 insertions(+), 1 deletion(-)
  11. diff --git a/firmware/lib/vboot_api_kernel.c b/firmware/lib/vboot_api_kernel.c
  12. index e465fc3..2e31f08 100644
  13. --- a/firmware/lib/vboot_api_kernel.c
  14. +++ b/firmware/lib/vboot_api_kernel.c
  15. @@ -308,6 +308,7 @@ VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
  16. uint32_t use_legacy = 0;
  17. uint32_t default_boot = 0;
  18. uint32_t ctrl_d_pressed = 0;
  19. + uint32_t hold = 0;
  20. VbAudioContext *audio = 0;
  21. @@ -473,6 +474,12 @@ VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
  22. ctrl_d_pressed = 1;
  23. goto fallout;
  24. break;
  25. + case 0x08:
  26. + /* Ctrl+H = hold */
  27. + VBDEBUG(("VbBootDeveloper() - "
  28. + "hold developer mode screen\n"));
  29. + hold = 1;
  30. + break;
  31. case 0x0c:
  32. VBDEBUG(("VbBootDeveloper() - "
  33. "user pressed Ctrl+L; Try legacy boot\n"));
  34. @@ -523,7 +530,7 @@ VbError_t VbBootDeveloper(VbCommonParams *cparams, LoadKernelParams *p)
  35. VbCheckDisplayKey(cparams, key, &vnc);
  36. break;
  37. }
  38. - } while(VbAudioLooping(audio));
  39. + } while(hold || VbAudioLooping(audio));
  40. fallout:
  41. --
  42. 2.10.2