On Sunday, October 11th, 2026 at 10:31 AM, Simon Glass <[email protected]> wrote:
> Hi Petr, > > On Sat, 10 Oct 2026 at 23:32, Petr Hodina via B4 Relay > <[email protected]> wrote: > > > > Add a boot menu for devices with a framebuffer where the only inputs are > > the volume and power buttons. The menu is SoC independent and SoC specific > > parts hook in through weak functions. Qualcomm implementation is provided > > in the patch set. > > > > 1. Add helpers for several commands. dfu_pwr is needed because > > the stock dfu loop only exits on Ctrl-C which a phone doesn't have. > > > > 2. The core for the menu which reuses bootmenu_loop() for navigation > > so any board that maps its buttons to keys (BUTTON_REMAP_PHONE_KEYS) > > works unchanged. > > > > 3. Phones often have no usable display during bring-up, or are driven > > from a host so the same menu is also drawn with ANSI escapes. > > > > 4. Not specific to the menu: Qualcomm keeps A/B state in the GPT > > attribute flags, not in "misc", so ab_select_slot() is wrong there. > > > > 5. Generic header info for the slot lookup which is a weak hook and > > the block device comes from the "storage" env var. > > > > 6. The Snapdragon override of that hook kept out of the generic file. > > > > 7. Shows why the device booted (e.g. recovery, fastboot). Reads the BCB > > from the "storage" device. > > > > 8. PMIC reister layout QPNP-PON specific for PM660 to decode the boot > > reason. > > > > 9. The USB ACM stdio device can be listed before it has been started > > and puts() then dereferences NULL private data. > > > > 10. The weak default picks "mmc" from Kconfig, so on UFS boards > > "fastboot reboot bootloader" could never write the BCB. > > > > 11. Usage documentation for the commands above. > > > > Here's the URL with image of the menu on blueline, sargo and enchilada: > > https://download.ixit.cz/u-boot.png > > > > Signed-off-by: Petr Hodina <[email protected]> > > --- > > Petr Hodina (11): > > cmd: phone_util: add poweroff, dfu_pwr and USB Ethernet commands > > cmd: phonemenu: pixel drawn boot menu rendering and navigation > > cmd: phonemenu: mirror the menu to byte-stream consoles > > boot: android_ab: read the A/B slot from the GPT on Snapdragon > > cmd: phonemenu: show active A/B slot in the header > > cmd: phonemenu: read the A/B slot on Snapdragon without "misc" > > cmd: phonemenu: show Android boot reason in the header > > cmd: phonemenu: show PMIC PON status in the header > > usb: gadget: f_acm: check the acm_stdio_puts() against an unstarted > > device > > cmd: phone_util: fix "Cannot set reboot flag" on fastboot reboot > > doc: usage: add phonemenu command documentation > > > > MAINTAINERS | 5 + > > boot/android_ab.c | 42 ++++ > > cmd/Kconfig | 11 + > > cmd/Makefile | 1 + > > cmd/phone_util.c | 148 ++++++++++++ > > cmd/phonemenu.c | 550 > > ++++++++++++++++++++++++++++++++++++++++++++ > > cmd/phonemenu_qcom.c | 112 +++++++++ > > doc/usage/cmd/phonemenu.rst | 92 ++++++++ > > drivers/usb/gadget/f_acm.c | 3 + > > include/phonemenu.h | 17 ++ > > 10 files changed, 981 insertions(+) > > We have expo - rather than duplicating the video output, etc. could we use > that? > > https://docs.u-boot-project.org/en/latest/develop/expo.html > > There is also a boot menu which uses it. > Hi Simon, thanks to pointing to the expo. Yeah seems as the right way to implement the menu for phones. Will refactor the code and send v2. Petr
