Commit Graph
508 Commits
Author SHA1 Message Date
alex ab9f3cd2d3 fix(boot): stamp generated entry actions with the final entry context 2026-10-04 17:53:13 -07:00
alex 5f81a99d21 fix(boot): keep the one-shot entry as default when the menu is forced 2026-10-04 17:53:13 -07:00
alex 7c4b2e87b0 fix(boot): boot a counted unified kernel image by its renamed file 2026-10-04 17:53:13 -07:00
alex 4198dfbb8c fix(eficore): keep backslashes in command-line arguments 2026-10-04 17:53:13 -07:00
alex 5be2c1b561 feat(boot): add enable-logo and enable-animation to the graphical menu (#123) 2026-10-04 14:36:35 -07:00
alex afc6d87b91 fix(boot): use more of the graphical menu for titles (#122) 2026-10-04 14:27:46 -07:00
alex c6cb96fb79 fix(boot): only redraw what changed in the graphical menu (#121)
Each frame redrew the whole screen and blitted the entire framebuffer. The static background and panel are now cached, and only the changed regions are blitted.
2026-10-04 14:22:43 -07:00
alex 808b162e55 docs(config): move CONFIG.md to docs/config.md (#120)
Keeps the configuration reference next to the setup guides. Updates the README, CLAUDE.md, the doc comment in crates/config and the update-config-docs skill to match.
2026-10-04 14:19:32 -07:00
alex ea115d3a16 docs(config): add CONFIG.md and move the configuration reference out of the README (#119)
CONFIG.md documents every section of sprout.toml, the command line options, BLS support and strict mode. The README keeps the overview and minimal examples and links to it. Adds an update-config-docs skill to keep the reference in sync with the code.
2026-10-04 14:14:13 -07:00
alex 9ac55ada50 fix(boot): make the graphical menu mouse opt-in
Add menu-styles.graphical.enable-mouse, which is off by default. Without it, or without a pointing device, the cursor is not drawn and the hint only mentions the keyboard.
2026-10-04 14:03:34 -07:00
alex ffbfcbc1f0 docs: add CLAUDE.md and document the release process 2026-10-04 12:32:37 -07:00
alex 612268b9d5 fix(ci): correct the version comment on the create-github-app-token pin 2026-10-04 11:29:05 -07:00
alex ce8f590b7b docs(readme): correct the strict mode table 2026-10-04 10:55:07 -07:00
alex 5a4bfefb6e fix(boot): count tries without using them, add XBOOTLDR once, and warn about dropped initrds
An entry that is not counted in strict mode still has its tries, so it
can be bad. Strict mode adds the extended boot loader partition to the
first BLS generator only. A chainload chain that does not list an initrd
that the entry has now warns, as the kernel may not find its root
without it, and strict autoconfigure says when it can't find the
partition of Sprout.
2026-10-04 10:55:07 -07:00
alex 47020c7b92 fix(bls): keep the Sprout name and version fields outside strict mode 2026-10-04 10:55:07 -07:00
alex cb9f05f199 docs(readme): document strict mode and the new precedence 2026-10-04 10:55:07 -07:00
alex 975df0457e fix(boot): show the path of a missing BLS file in the warning 2026-10-04 10:55:07 -07:00
alex 14463d5776 feat(boot): read only the boot partitions for BLS in strict mode
In strict mode autoconfigure reads BLS entries from the partition Sprout
was loaded from and the extended boot loader partition of its disk, with
one generator, and no longer makes entries from other disks. Other
filesystems that have BLS are still not scanned for Linux kernels.
2026-10-04 10:55:07 -07:00
alex ca01353df4 feat(boot): make strict mode follow systemd-boot's selection and menu rules
In strict mode a one-shot entry only becomes the default, the default
entry may be one with no boot counter tries left, no menu timeout means a
hidden menu, the menu is shown again when a started image returns, and
entries that mix linux, efi and uki, entries whose file is missing, and
unified kernel images with no name are hidden. Plain EFI entries are not
counted, the XBOOTLDR partition is always read, and a devicetree that
can't be installed fails the entry.

Outside of strict mode these keep working as they did, and each one is
now logged where it applies. The initrd limit of BLS entries is 32.
A devicetree that can't be installed is skipped with a warning.
2026-10-04 10:55:07 -07:00
alex bd37e9058c feat(bls): follow the systemd-boot fallbacks for unified kernel image names 2026-10-04 10:55:07 -07:00
alex 7e1207097b feat(boot): add the bls-strict-mode option
Add --bls-strict-mode and bls-strict-mode in the options of sprout.toml.
It does nothing yet; the behaviors it controls follow.
2026-10-04 10:55:07 -07:00
alex bfca43fe07 fix(boot): let the bootloader interface outrank the configuration
The default entry and the menu timeout that bootctl sets in LoaderEntryDefault,
LoaderEntryPreferred and LoaderConfigTimeout now win over default-entry and
menu-timeout in sprout.toml, as they do over loader.conf in systemd-boot.
--menu-timeout and the one-shot timeout still win over everything.
2026-10-04 10:55:07 -07:00
alex c6524b7bed feat(hack): add scripts to drive the dev environment headless
Start QEMU in the background with a QMP socket and console logs, take
screenshots, press keys and wait for serial output, so the graphical boot
menu can be driven without a terminal or a window. boot.sh gets opt-in
knobs for this and behaves as before otherwise.
2026-10-04 10:24:36 -07:00
alex 4e10d57143 fix(boot): tidy the devicetree, reboot and profile handling after review
Only warn about a devicetree under Secure Boot when the entry has one,
skip the fixup if its protocol can't be opened, and reject a devicetree
whose size is smaller than its header. Announce a reboot before the
delay, advertise the multi-profile UKI feature, and treat a Type 1 entry
with a profile after the first as an extra profile that is not picked as
the fallback default. A failure to read Sprout's own partition no longer
drops the entries of the XBOOTLDR partition, and the README lists every
initrd slot and describes the reboot behaviour more exactly.
2026-10-03 20:23:57 -07:00
alex 27c2d32900 docs(readme): describe the BLS, boot counting and loader.conf support
Update the feature list for what is implemented now, including the
graphical menu and the generators, add the command line options that
were missing, and document the BLS generator options, boot counting,
loader.conf, and the bootloader interface.
2026-10-03 20:23:57 -07:00
alex 1658ce0bef feat(bls): read the extended boot loader partition in the BLS generator
Add an xbootldr option to the BLS generator. When it is enabled, the
partition with the XBOOTLDR type on the same disk as Sprout's partition
is read as well, and its entries and unified kernel images are sorted
with the others. As their files are on that partition, every entry has
an entry-root value, which is the device of the partition or nothing for
Sprout's own, to use in a path like $entry-root\$chainload. It is off
by default, as existing actions would look for the files on the wrong
partition.
2026-10-03 20:23:57 -07:00
alex 50f62f5bb6 feat(bls): one entry for each profile of a unified kernel image
A unified kernel image can have several profiles, each started by a
.profile section and made of the sections after it on top of the base.
Every profile is an entry. The first has the id of the file, and the
others add @ and the identifier or the number of the profile, with a
title that names the profile and the profile number as the load options.
The profiles share the boot counter of the file, sort in the order they
are in the image, and a profile after the first is not picked as the
default entry when no default was asked for.

The PE reader keeps every section in order, so repeated names and the
sections that a profile removes can be told apart, and reads images with
more than 96 sections.
2026-10-03 20:23:57 -07:00
alex ac49899294 fix(eficore): log when the devicetree of the firmware is restored 2026-10-03 20:23:57 -07:00
alex ac4ec69c02 feat(boot): install the devicetree of a BLS entry
Add a devicetree option to the chainload action, set from the devicetree
key of a BLS entry. The file is installed as the EFI devicetree table
with the memory type that a devicetree has to be in, patched by the
fixup protocol when the firmware has one, and the table of the firmware
is put back when the image returns or fails to start. It is ignored when
Secure Boot is enabled, as it can't be verified, and the DeviceTree
loader feature is advertised.
2026-10-03 20:23:57 -07:00
alex ef14e5bd98 feat(bls): parse the devicetree key 2026-10-03 20:23:57 -07:00
alex 5b345c82d1 feat(eficore): find the extended boot loader partition on the disk of a partition
Look for a filesystem on the same disk whose GPT partition type is the
XBOOTLDR type, using the partition info protocol. open_shared moves to
the handle module so the graphical menu and the discovery share it.
2026-10-03 20:23:57 -07:00
alex d41bcaa292 feat(bls): reboot when an entry with boot counting fails to start
Add the reboot-on-error loader.conf setting. With auto, which is the
default, the machine resets after a failed start only if a boot counter
try was just used up and there were tries left, so the entry eventually
runs out of tries and the next boot picks another one. yes always resets
and no never does.
2026-10-03 20:23:57 -07:00
alex 14bcfc2653 fix(bls): write boot counters systemd can read and match systemd on small details
Do not pad the boot counter digits or cap the tries done counter, as
systemd-bless-boot reads a counter with a leading zero as octal and
systemd-boot never writes one. A profile only selects a profile when it
is a number above zero, an unterminated bracket in a pattern matches
nothing, and files that start with auto- are ignored in any case and for
unified kernel images too. The saved entry is compared ignoring case, and
entry settings are only expanded for sources that are looked at.
2026-10-03 19:41:39 -07:00
alex 8bb5f1132d fix(menu): let a key press show a hidden menu
A menu with a zero timeout or menu-hidden now waits 100 ms for a key press
before booting the default entry, which is how the boot loader interface
lets a user interrupt a hidden menu. menu-disabled still skips the wait.
2026-10-03 19:41:39 -07:00
alex 590eeead5e fix(boot): match and publish BLS entry ids like systemd-boot
Entries now have an id, the file name without the boot counter and with
its .conf or .efi extension in lower case, which is what systemd-boot
publishes in LoaderEntries and LoaderEntrySelected and what bootctl
expects. LoaderEntryDefault, LoaderEntryOneShot and loader.conf match by
id, ignoring case, with *, ? and [a-z], and no longer match titles or
numbers. A type 1 and a type 2 entry with the same name no longer clash.

@saved now works from LoaderEntryDefault as well, stops saving when it
is not asked for, and removes a stale saved entry. LoaderEntryPreferred
and the loader.conf preferred key select an entry that skips bad boot
counter entries. An entry with no tries left that is booted by hand is
counted too, and a read-only entry file is left alone.

Type 1 entries can name an architecture, which hides them on another
architecture, and a uki with an optional profile. Files that start with
auto- are ignored. loader.conf is read lossily, and a failed measurement
no longer stops the boot.
2026-10-03 19:41:39 -07:00
alex a26a5f1639 feat(eficore): advertise the sort key and preferred entry features 2026-10-03 19:41:39 -07:00
alex 6ea9fa9dbf feat(bls): parse the architecture, uki and profile keys 2026-10-03 19:41:39 -07:00
alex 9d123d6a13 feat(bls): keep boot counter digit widths and sort ties by tries 2026-10-03 19:41:39 -07:00
alex cd49b27ccb feat(bls): read the loader.conf preferred key and strip quotes 2026-10-03 19:41:39 -07:00
alex 4794de9db5 feat(parsing): match entry ids the way systemd-boot does 2026-10-03 19:41:39 -07:00
alex f4221131f1 feat(bls): boot unified kernel images (Type #2 entries) (#111)
* feat(bls): read PE sections without loading the whole image

* feat(bls): produce entries from unified kernel images

* feat(bls): boot unified kernel images as type 2 entries

Scan the EFI/Linux directory, or the new uki-path option of the BLS
generator, for .efi files and turn each one into an entry using the
metadata in its PE sections. Autoconfigure now also detects a disk that
only has unified kernel images. An image with the id of a type 1 entry is
skipped, and boot counting works on the .efi file name.

* fix(boot): rename boot counter files in place instead of copying them

* fix(bls): skip hidden files and keep unified kernel images when the type 1 scan fails

Check file name suffixes without slicing by byte offset, drop the PE
section bytes once an image has been parsed, and only fail the generator
on a type 1 error when unified kernel images are disabled.
2026-10-03 19:09:17 -07:00
dependabot[bot] 98e8c9ad44 chore(deps): bump astral-sh/setup-uv in the actions-updates group
Bumps the actions-updates group with 1 update: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).


Updates `astral-sh/setup-uv` from 10.1.0 to 10.2.0
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/bec219d24cd3e171d82865faccec33120bb574f4...c18668ad3cf93ea998bef934396af7bb5c839dc7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: 10.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions-updates
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-10-03 18:59:43 -07:00
alex 1e3b0d3081 fix(hack): use Homebrew's firmware for accelerated aarch64 VMs
The firmware in the dev image hangs before it starts Sprout when run with
hvf on Apple Silicon. QEMU_FIRMWARE overrides which firmware is used.
2026-10-03 18:59:20 -07:00
alex 27d2a5c56e feat(menu): inset the graphical menu in a panel with the logo above it
Entries now sit in a centered panel instead of spanning the screen, and only
the selected entry gets a pill. The logo and name are in a header above the
panel and always show. Long titles end in an ellipsis, and a scrollbar and
position show when the list doesn't fit. Text scale is capped so 1440p
displays aren't dominated by the titles.
2026-10-03 18:05:12 -07:00
alex 1bebcd2ecc fix(menu): draw the graphical menu to every display
The first graphics output may not be a display anyone is looking at. Open
each output that has a device path, and skip the console splitter's output
unless it is the only one. The cursor is shown at the same relative place on
each display, and hovering over an entry on any of them selects it.
2026-10-03 18:05:12 -07:00
alex 795e310ae7 fix(menu): open the graphics output shared to keep the text console connected 2026-10-03 18:05:12 -07:00
alex e12e5dd7cf fix(menu): open the pointers shared so the graphical menu doesn't hang
An exclusive open makes the firmware disconnect the drivers that use the
protocol, and on some firmware that call never returns. Prefer the pointer
on the console input handle, which belongs to the console splitter.
2026-10-03 18:05:12 -07:00
alex de2df4a183 fix(eficore): don't panic when filling a rectangle past the right edge
The slice start was after its end when the rectangle began beyond the
framebuffer width, which happens when the cursor is at the right edge.
2026-10-03 18:05:12 -07:00
alex 7d913b3ab4 fix(boot): load loader.conf before one-shot variables and normalize the boot count path 2026-10-03 17:39:38 -07:00
alex 2c18f229c0 fix(boot): skip bad entries when picking the default source, don't save forced boots for @saved 2026-10-03 17:39:38 -07:00