stage-1: Remove dependency on ply-image + better error reporting #95
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces our reliance on
ply-image
with a custom "applet" that uses LVGUI to show stuff on the framebuffer.boot-splash
The
boot-splash
applet is expected to be used with an SVG file path. That SVG will be shown centered on a black background, just likeply-image
did with PNGs.This seems useless at first glance, but it's not.
It allows us to remove
ply-image
from the stage-1, shaving off kilobytes off our weight. Reminder that our minimum budget with splash is around 7.5MiB and we're a bit over it. Re-purposing the existing LVGUI/LVGL and mruby code is helpful here.What's more useful, though, is this allows us to use an SVG image, rather than relying on a PNG file. This means that the splash scales better!
boot-error
Here's the fun improvement.
First of all, this side-steps an issue ply-image had with transparent backgrounds. It would render the transparent parts as black even if given a color to clear with.
Not too thrilling.
What's amazing here, though, is that we can now show text on errors! This means there is less guesswork when you enter in a failure
Closes #84
Logo
This fixes stage-1 side of #75. Stage-2 is still the NixOS logo.
Stage-2 will be handled in the future. The main issue is figuring out what to use to show the Stage-2 splash. Should it be a continuation of the Stage-1 bespoke splash? Should it rely on existing machinery like plymouth? (Will it work correctly on mobile devices? Probably.) For now this is the last bit relying on ply-image.