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
merged 5 commits into from Oct 18, 2020

Conversation

@samueldr
Copy link
Member

@samueldr samueldr commented Oct 16, 2020

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.

samueldr added 5 commits Oct 16, 2020
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
them.

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
needed!
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.
@samueldr
Copy link
Member Author

@samueldr samueldr commented Oct 18, 2020

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
3 checks passed
3 checks passed
@github-actions
Parse_nix Parse_nix
Details
@github-actions
Documentation Documentation
Details
@github-actions
Instantiation Instantiation
Details
@samueldr samueldr deleted the samueldr-wip:feature/reboot-hal branch Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant