[PATCH 00/20] fbconsole: support TUI-relevant escape sequences

Ahmad Fatoum a.fatoum at barebox.org
Sun May 3 01:33:02 PDT 2026


A BIOS-style TUI in barebox could go a long way towards making barebox
more user friendly: It could list different parameters with familiar
controls instead of having to juggle around commands like varinfo,
devinfo and magicvar.

This could especially be the case for barebox running on laptops.
Laptops tend to not have a serial port routed out though, so the TUI we
provide will need to be displayed on the framebuffer.

Instead of adding a graphic toolkit to barebox, let's flesh out the
framebuffer console support, so it can display a TUI that can avoid full
redraws. Bonus benefit: The same UI will be usable over serial as well.

A mockup of how this could look like is available at barebox.org/demo when
running the tui command.

Ahmad Fatoum (20):
  fbconsole: remove incomplete CSI_CNT state
  fbconsole: improve handling of unexpected escape sequences
  fbconsole: fix handling of CSI buffer overflow
  fbconsole: do not reset cursor visibility alongside attributes
  fbconsole: respect hidden cursor everywhere
  fbconsole: call fb_blit_area for every drawchar
  fbconsole: skip fb_flush when processing escape sequences
  fbconsole: factor out helpers for clamped cursor row/col setting
  fbconsole: precompute foreground/background colors
  fbconsole: collect renderable state into struct fbc_screen_state
  fbconsole: implement CSI A/B/C/D cursor movement sequences
  fbconsole: restrict cursor visibility to DEC private mode 25
  fbconsole: add new clear_chars helper
  fbconsole: implement erase entire line CSI
  fbconsole: support ESC[0J and ESC[1J partial screen clear
  fbconsole: implement DEC save/restore cursor
  fbconsole: implement VT100 deferred wrap (last column flag)
  fbconsole: implement alternate screen buffer (ESC[?1049h/l)
  fbconsole: adapt logging depending on activated streams
  netconsole: suppress log message when opening console file

 common/console.c          |   8 +-
 common/serdev.c           |   2 +-
 drivers/video/fbconsole.c | 541 ++++++++++++++++++++++++++------------
 include/console.h         |   4 +-
 net/netconsole.c          |   5 +-
 5 files changed, 376 insertions(+), 184 deletions(-)

-- 
2.47.3




More information about the barebox mailing list