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.
This commit is contained in:
alex authored and Alex Zenla committed 2026-10-03 20:23:57 -07:00
1 parent 27c2d32900
commit 4e10d57143
8 files changed
+72 -20

No files matched your search

+13 -2
View File
@@ -266,6 +266,9 @@ fn generate_type1(
let mut boot = bootable_entry(context, bls, &name, &entry, &initrds, entry_root);
boot.set_id_suffix(&extension);
if entry.profile_number() > 0 {
boot.mark_extra_profile();
}
// Record where the boot counter lives so a try can be consumed when this entry boots.
if let Some(counter) = boot_counter {
@@ -458,13 +461,21 @@ pub fn generate(context: Rc<SproutContext>, bls: &BlsConfiguration) -> Result<Ve
let path = context.stamp(&bls.path);
let uki_path = bls.uki_path_for(&path);
let mut entries = generate_partition(
// A problem with this partition only stops the generator when there is no other partition.
let mut entries = match generate_partition(
&context,
bls,
&path,
uki_path.as_deref(),
BlsConfiguration::root_of(&path),
)?;
) {
Ok(entries) => entries,
Err(error) if bls.xbootldr => {
warn!("unable to generate bls entries: {:#}", error);
Vec::new()
}
Err(error) => return Err(error),
};
// Add the entries of the Extended Boot Loader Partition, which are sorted together with the
// others. A problem with it should not prevent booting from the entries that are found.