HomeFreeBSD

lualoader: allow graphical bits to be disabled with loader_gfx

Description

lualoader: allow graphical bits to be disabled with loader_gfx

Some people prefer the old ASCII art look and it's good to have a way
to confirm that the fallbacks still work right on systems that have a
functional framebuffer available. Add a loader_gfx loader.conf(5)
variable to disable the eager use of graphics for these use-cases.

While we're here, clean up the style in the area a little bit; the early
porting that I did to lualoader did a lot of redundant ~= nil that has
carried over into some of the later work. We can drop some of that, and
also re-organize some of these variables to improve readability.

ziaee notes that the positioning of the orb is a bit off; this is due to
a change in positioning that happened in
1b4e1171315398dec ("loader: Fix orb position") to account for the image
dimensions. This should be partially reverted to get it right; we
shouldn't assume that we can use the same shift in gfx-* definitions for
both the ASCII art and the associated image -- the {image, image_rl}
pair should be converted to something more like an fbimg or gfx table
that has the image, image width and a shift override to avoid messing
up the ASCII positioning when disabled (or with no graphics available).

Reviewed by: imp, manu, ziaee (manpages)
Differential Revision: https://reviews.freebsd.org/D50706

Details

Provenance
kevansAuthored on Jun 6 2025, 2:44 PM
Reviewer
imp
Differential Revision
D50706: lualoader: allow graphical bits to be disabled with loader_gfx
Parents
rG2542189532b3: qat: update API files to use SPDX identifier
Branches
Unknown
Tags
Unknown