This is an old revision of the document!
"You Never Get a Second Chance to Make a First Impression"
Look at the current text menu of FreeBSD's bootloader, look at the “cool” (not … rather crude) ASCII logo. FreeBSD aims to support the most modern hardware platforms, to implement the latest protocols and greatest algorithms. Do you think it's appropriate that FreeBSD greets its users with a boot screen that looks like a 20 years old DOS program?
That's why I'm working on this:
Graphics support for /boot/loader
Lets start with a screenshot of the current WIP:
The project consists of the following parts (in bottom-up order):
- Graphics functions that access the actual hardware and/or machine firmware (BIOS, EFI, whatever).
- A switch structure that calls the appropriate functions depending on the platform.
- FICL glue that binds the graphics functions to Forth words.
- Forth code that uses the new words to construct a graphical menu.
- A collection of themes.
Every theme has its own subdirectory /boot/themes/<name> which contains at least
a configuration file, and possibly other files as well. Example:
/boot/themes/default/biglogo.pcx /boot/themes/default/default.font /boot/themes/default/theme.conf
And the configuration file looks like this:
theme_background="/boot/themes/default/biglogo.pcx" theme_font="/boot/themes/default/default.font" theme_bgcolor="0 0 0" # black theme_fgcolor="255 255 255" # white theme_options_xy="64 10" theme_actions_xy="64 82"
A theme is enabled by adding a line to /boot/loader.conf:
beastie_theme="/boot/themes/default/theme.conf"
New themes can easily be created. It is expected that the base system will ship only with a limited number of themes, and more themes can be provided through the ports collection.
If a theme wants to do more sophisticated things, such as using
multiples graphics files or fonts, or re-arrange the menu in completely
different ways, it will have to bring its own Forth code and modify
beastie.4th directly.
Work in progress
Note this is currently work in progress, happening in the FreeBSD Perfoce (“p4”) repository. I plan to commit it to FreeBSD when it's ready, after proper review and approval.
For those you are eager to check out the WIP, I'm going to try to prepare a tarball for easy testing ASAP. It will be announced on the -hackers list.
Current status:
| Item | Lang | Status |
|---|---|---|
| low-level graphics functions | C | done for i386/amd64 (BIOS-based, VGA, 4bpp) |
| platform switch | C | in progress |
| FICL Forth words | C | done |
| “beastie” menu graphics support | Forth | done |
| text/binary converter for fonts | awk | done (a version written in C also exists) |
| initial default theme | - | done (background image, font) |
| multiple themes support | Forth | in progress |
If you have any questions or requests, please contact OliverFromme.
