Bootloader Quality Of Life Improvements

  • Student: Connor Bailey (connorbailey777@gmail.com)
  • Mentor: Warner Losh (imp@)

The main goal of this project is to improve overall bootloader quality of life and user experience.

I quantify quality of life/user experience based on the idea that the “ideal” bootloader experience (for a large majority of users) is one where they boot/exit as quickly as possible.

For example, if a cat walks over the keyboard at the wrong time, a plain “OK” prompt is more likely to make someone unfamiliar hit the reset button than type “autoboot”. Like a solid number of quality of life snags, this has an easy fix, but there's many situations like it which all contribute to the greater problem.

Lots of hands-on testing and trying to break things.

While the cat example is not very serious, it shows my general thought process. If there's a mistake which is easy to make, it should be easy to fix.

This list is not concrete, since I am expanding as I find more rough edges, however, the loader prompt changes are the core focus.

Loader prompt:

  • Extending platform-specific key event to terminal escape translation
  • Building out a system to bind keys/terminal escapes to actions at the loader prompt
  • Providing a default set of bindings/actions for “vanilla” editing, such as home/end/left/right/delete
  • Providing an option set of bindings/actions for emacs style editing
  • Implementing actions for history manipulation
  • Implementing actions for command/directory manipulation
  • Better feedback for errors/invalid input
  • Maybe some form of Lua completion

Everything else:

  • Arrow key navigation on splash screen
  • Command to re-enter splash screen from prompt (for accidental key-presses)
  • Hand-holding messages at “easy mistake” points.

The schedule below has been updated to reflect this.

  • Week 1: Development environment setup, both UEFI and legacy BIOS along with investigation into a better way to work on this without rebooting for every change
  • Week 2: Detour through Bug 257018
  • Week 3: Translating UEFI and BIOS key events into terminal escapes passed through the console
  • Week 4: Wire up conf files to assign keys to actions, parsing key/action pairs, potentially figure out a different syntax for mapping keys
  • Week 5: Implement left/right arrow, home/end, delete and such
  • Week 6: Phase 1 deadline
  • Week 7: Implement history keys and commands (investigate using pager for the actual history command)
  • Week 8-9: File completion
  • Week 10: Lua completion (only if nothing else needs attention, same for week 11)
  • Week 11: Flashing cursor
  • Week 11 ½: Final deadline

Generally, the only option is smoke-tests. “does the bootloader work” isn't a very complicated question, so my testing boils down to booting on as many VMs/configurations as possible.

This testing is manual, but I expect I'll get sick of it and end up automating it at some point.

Number of times I've forgotten DESTDIR= and accidentally “tested” changes on my host machine: 3.

  • summerofcode2022projects/freebsdbootloaderqualityoflifeimprovements.txt
  • Last modified: 2022/07/07 20:52
  • by ConnorBailey