Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boot GUI: only show relevant reboot options #228

merged 5 commits into from Oct 18, 2020


Copy link

This adds a "HAL" options layer where we can describe some hardware-specific abstractions.

The only one implemented for now is the reboot modes list.

This list is interpreted by the boot GUI in an implementation-defined way. All of the implementation details are internal and could change at any time for now.

The goal is to make sure that, e.g. on the Pinephone, the reboot options that don't apply are not present.

We'll think it over for how we want to handle custom reboot commands,
but some platforms (e.g. u-boot, depthcharge, qemu) don't and can't use

A goal is to keep stage-2 as generic as possible, so building into it
some knowledge of this is harder.

At any rate, the user can still reboot, and hold the key combo as
This will be used by the boot GUI to only show relevant reboot options.

We might add other HAL-ish things in there.

Note that this is all internal stuff :)
This way we can clean up the recovery menu from useless options.

Furthermore, if a device in the future gives us more option, we can
implement them.
Copy link
Member Author

Implementation detail note:

The goal here is that in Nix, only generic labels are used to represent options that the HAL knows how to handle. So the current implementation is an implementation detail, and could change in the future, while leaving the interface (those labels) as they are.

@samueldr samueldr merged commit 258cb1a into NixOS:master Oct 18, 2020
@samueldr samueldr deleted the feature/reboot-hal branch October 18, 2020 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant