Skip to content

feat(bls): boot unified kernel images (Type #2 entries) - #111

Merged
azenla merged 5 commits into
mainfrom
azenla/feat/bls-type-2
Oct 4, 2026
Merged

azenla merged 5 commits into
mainfrom
azenla/feat/bls-type-2

Conversation

@azenla

@azenla azenla commented Oct 4, 2026

Copy link
Copy Markdown
Member

Adds BLS Type #2 support. The BLS generator now scans \EFI\Linux (or the new uki-path option, where an empty value turns it off) for .efi files and makes an entry from each unified kernel image, using the title and version from its .osrel section. Only the PE headers and the .osrel, .cmdline and .uname sections are read, so large images are never loaded. Images without .osrel, or built for another architecture, are skipped, and a unified kernel image with the same id as a Type #1 entry is ignored. Autoconfigure also detects a disk that only has unified kernel images.

Boot counting works on .efi file names too. The counter rename is now done in place instead of copying the file, which matters for 100 MB images and also makes the .conf rename atomic.

Scanning is on by default, so existing BLS setups will list any images in \EFI\Linux. Two generators that read the same directory would list every image twice, so only one should scan it. When uki-path isn't set it follows the device of path. I tested with QEMU/OVMF using synthetic images, not real signed unified kernel images, and not on aarch64 at runtime or with Secure Boot.

azenla added 5 commits October 3, 2026 19:03
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.
…ype 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.
@azenla
azenla merged commit f422113 into main Oct 4, 2026
12 checks passed
@azenla
azenla deleted the azenla/feat/bls-type-2 branch October 4, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant