U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Better smartphone support (Qualcomm)
@ 2024-10-04 12:46 Caleb Connolly
  2024-10-04 12:46 ` [PATCH v2 1/4] board/qualcomm: introduce phone config Caleb Connolly
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Caleb Connolly @ 2024-10-04 12:46 UTC (permalink / raw)
  To: Caleb Connolly, Neil Armstrong, Sumit Garg, Tom Rini, Simon Glass
  Cc: u-boot-qcom, u-boot

Improve support for running U-Boot on [Qualcomm] smartphones, with:

* A boot menu which can be entered by holding power during boot
* Hang on panic (so errors can be read on the display)
* Serial gadget which can be enabled by holding volume down or via
  boot menu

In its current form, U-Boot's boot menu is perfectly adequate, however
once an option is picked U-Boot will just drop to the CLI again.

On a phone (with no keyboard), dropping to the CLI effectively makes the
device unusable until manually rebooted, since there is no way to run
any commands...

To rectify this, let's revive CONFIG_BOOT_RETRY for the
hush parser and make it run the contents of "bootcmd", as well as
re-reading the value of the bootretry environment variable. In tandem,
this provides for a flexible menu system which we can enter and exit.
See qcom-phone.env in patch 1 for more details.

Finally, provide some rough-ish documentation to describe how Qualcomm
phone support works and outline some debugging steps for when UART and
the framebuffer are unavailable.

This series depends on CONFIG_REMAP_PHONE_KEYS [1] to enable navigating the
boot menu when using upstream DT.

[1]: https://lore.kernel.org/u-boot/20240714194948.1271135-1-caleb.connolly@linaro.org/

---
Changes in v2:
- Fix CONFIG_BUTTON_REMAP_PHONE_KEYS name in qcom-phone.config
- Add Tom and Simon to CC
- Link to v1: https://lore.kernel.org/r/20240831-qcom-phones-v1-0-08614edd8e35@linaro.org

---
Caleb Connolly (4):
      board/qualcomm: introduce phone config
      cli_hush: run bootmenu on retry
      bootretry: check for bootretry variable changes
      doc: board/qualcomm: describe phone support and bringup

 board/qualcomm/qcom-phone.config |  12 ++++
 board/qualcomm/qcom-phone.env    |  49 ++++++++++++++++
 boot/bootretry.c                 |   2 +
 common/cli_hush.c                |   2 +-
 common/cli_hush_upstream.c       |   2 +-
 doc/board/qualcomm/board.rst     |   5 ++
 doc/board/qualcomm/index.rst     |   1 +
 doc/board/qualcomm/phones.rst    | 122 +++++++++++++++++++++++++++++++++++++++
 8 files changed, 193 insertions(+), 2 deletions(-)
---
change-id: 20240831-qcom-phones-c789d14de657
base-commit: 00292c6b39b3f7dcb34e8c3ae6ef276ac862a146

// Caleb (they/them)


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH v2 0/4] Better smartphone support (Qualcomm)
@ 2025-03-11 12:31 Caleb Connolly
  2025-03-11 12:31 ` [PATCH v2 1/4] board/qualcomm: introduce phone config Caleb Connolly
  0 siblings, 1 reply; 14+ messages in thread
From: Caleb Connolly @ 2025-03-11 12:31 UTC (permalink / raw)
  To: Caleb Connolly, Neil Armstrong, Sumit Garg, Tom Rini
  Cc: u-boot-qcom, u-boot, Simon Glass

Improve support for running U-Boot on [Qualcomm] smartphones, with:

* A boot menu which can be entered by holding power during boot
* Hang on panic (so errors can be read on the display)
* Serial gadget which can be enabled by holding volume down or via
  boot menu

In its current form, U-Boot's boot menu is perfectly adequate, however
once an option is picked U-Boot will never return to the menu, always to
the CLI.

On a phone (with no keyboard), dropping to the CLI effectively makes the
device unusable until manually rebooted, since there is no way to run
any commands...

To rectify this, let's revive CONFIG_BOOT_RETRY for the hush parser and
add an option CONFIG_RETRY_BOOTCMD to run the contents of "bootcmd".
This provides for a flexible menu system which we can enter and exit.
See qcom-phone.env in patch 1 for more details.

Finally, provide some rough-ish documentation to describe how Qualcomm
phone support works and outline some debugging steps for when UART and
the framebuffer are unavailable.

---
Changes in v3:
- Minor wording/clarification improvements in docs
- Introduce CONFIG_RETRY_BOOTCMD rather than changing the default
  behaviour.
- Enable some more gadgets in the phone config fragment.
- Link to v2: https://lore.kernel.org/u-boot/20241004-qcom-phones-v2-0-c7ab67ac3043@linaro.org

Changes in v2:
- Fix CONFIG_BUTTON_REMAP_PHONE_KEYS name in qcom-phone.config
- Add Tom and Simon to CC
- Link to v1: https://lore.kernel.org/r/20240831-qcom-phones-v1-0-08614edd8e35@linaro.org

---
Caleb Connolly (4):
      board/qualcomm: introduce phone config
      cli_hush: support running bootcmd on boot retry
      bootretry: check for bootretry variable changes
      doc: board/qualcomm: describe phone support and bringup

 board/qualcomm/qcom-phone.config |  17 ++++++
 board/qualcomm/qcom-phone.env    |  49 ++++++++++++++++
 boot/Kconfig                     |   7 +++
 boot/bootretry.c                 |   2 +
 common/cli_hush.c                |   6 +-
 common/cli_hush_upstream.c       |   6 +-
 doc/board/qualcomm/board.rst     |   5 ++
 doc/board/qualcomm/index.rst     |   1 +
 doc/board/qualcomm/phones.rst    | 122 +++++++++++++++++++++++++++++++++++++++
 9 files changed, 211 insertions(+), 4 deletions(-)
---
base-commit: 78f8c8c58f7d3f7c3a26af4afbd08aba21c14c90

Caleb Connolly <caleb.connolly@linaro.org>


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-03-30 13:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 12:46 [PATCH v2 0/4] Better smartphone support (Qualcomm) Caleb Connolly
2024-10-04 12:46 ` [PATCH v2 1/4] board/qualcomm: introduce phone config Caleb Connolly
2024-10-07 15:23   ` Simon Glass
2024-12-06 16:50   ` Julius Lehmann
2024-12-07  1:02     ` Alexey Minnekhanov
2024-10-04 12:46 ` [PATCH v2 2/4] cli_hush: run bootmenu on retry Caleb Connolly
2024-10-04 17:14   ` Tom Rini
2024-10-04 12:46 ` [PATCH v2 3/4] bootretry: check for bootretry variable changes Caleb Connolly
2024-10-04 17:16   ` Tom Rini
2024-10-04 12:46 ` [PATCH v2 4/4] doc: board/qualcomm: describe phone support and bringup Caleb Connolly
2024-10-07 15:23   ` Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2025-03-11 12:31 [PATCH v2 0/4] Better smartphone support (Qualcomm) Caleb Connolly
2025-03-11 12:31 ` [PATCH v2 1/4] board/qualcomm: introduce phone config Caleb Connolly
2025-03-30  8:23   ` Sam Day
2025-03-30 13:30     ` Caleb Connolly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox