diff mbox series

QcomModulePkg: Fastboot: Add extend Fastboot menu to UART interface

Message ID 20190806215359.31641-1-john.stultz@linaro.org
State New
Headers show
Series QcomModulePkg: Fastboot: Add extend Fastboot menu to UART interface | expand

Commit Message

John Stultz Aug. 6, 2019, 9:53 p.m. UTC
We can already somewhat control the fastboot menu
over the serial UART, as up and down changes action mode.

However, there's no way to select the mode over the UART.

So add some feedback over the UART as to the current mode
and use SCAN_RIGHT as the selection option (equivalent to
the power button).

UNTESTED!

Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Amit Pundir <amit.pundir@linaro.org>
Cc: Nicolas Dechense <nicolas.dechesne@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>

---
 QcomModulePkg/Library/BootLib/FastbootMenu.c      | 2 ++
 QcomModulePkg/Library/BootLib/MenuKeysDetection.c | 1 +
 2 files changed, 3 insertions(+)

-- 
2.17.1
diff mbox series

Patch

diff --git a/QcomModulePkg/Library/BootLib/FastbootMenu.c b/QcomModulePkg/Library/BootLib/FastbootMenu.c
index 1d095efe4..7004f76f3 100644
--- a/QcomModulePkg/Library/BootLib/FastbootMenu.c
+++ b/QcomModulePkg/Library/BootLib/FastbootMenu.c
@@ -175,6 +175,8 @@  UpdateFastbootOptionItem (UINT32 OptionItem, UINT32 *pLocation)
     return EFI_OUT_OF_RESOURCES;
   }
 
+  DEBUG ((EFI_D_INFO, "Fastboot Action (Press <Right> to select): %s\n", mFastbootOptionTitle[OptionItem].Msg));
+
   SetMenuMsgInfo (FastbootLineInfo, "__________", COMMON_FACTOR,
                   mFastbootOptionTitle[OptionItem].FgColor,
                   mFastbootOptionTitle[OptionItem].BgColor, LINEATION, Location,
diff --git a/QcomModulePkg/Library/BootLib/MenuKeysDetection.c b/QcomModulePkg/Library/BootLib/MenuKeysDetection.c
index 42e79eb6f..45843bb12 100644
--- a/QcomModulePkg/Library/BootLib/MenuKeysDetection.c
+++ b/QcomModulePkg/Library/BootLib/MenuKeysDetection.c
@@ -397,6 +397,7 @@  MenuKeysHandler (IN EFI_EVENT Event, IN VOID *Context)
       if (MenuPagesAction[MenuInfo->Info.MenuType].Down_Action_Func != NULL)
         MenuPagesAction[MenuInfo->Info.MenuType].Down_Action_Func (MenuInfo);
       break;
+    case SCAN_RIGHT:
     case SCAN_SUSPEND:
       if (MenuPagesAction[MenuInfo->Info.MenuType].Enter_Action_Func != NULL)
         MenuPagesAction[MenuInfo->Info.MenuType].Enter_Action_Func (MenuInfo);