mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 23:52:22 +00:00
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:
1 parent
27c2d32900
commit
4e10d57143
8 files changed
+72
-20
No files matched your search
@@ -20,6 +20,7 @@ pub struct BootableEntry {
|
||||
boot_counter: Option<BootCounterTarget>,
|
||||
id_suffix: Option<String>,
|
||||
id_profile: Option<String>,
|
||||
extra_profile: bool,
|
||||
}
|
||||
|
||||
impl BootableEntry {
|
||||
@@ -41,6 +42,7 @@ impl BootableEntry {
|
||||
boot_counter: None,
|
||||
id_suffix: None,
|
||||
id_profile: None,
|
||||
extra_profile: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +80,12 @@ impl BootableEntry {
|
||||
/// Fetch whether the entry is a profile of a unified kernel image after the first, which
|
||||
/// is never picked as the default entry unless it was asked for.
|
||||
pub fn is_extra_profile(&self) -> bool {
|
||||
self.id_profile.is_some()
|
||||
self.id_profile.is_some() || self.extra_profile
|
||||
}
|
||||
|
||||
/// Mark this entry as booting a profile of a unified kernel image after the first.
|
||||
pub fn mark_extra_profile(&mut self) {
|
||||
self.extra_profile = true;
|
||||
}
|
||||
|
||||
/// Set the profile of a unified kernel image that is part of the id of this entry.
|
||||
|
||||
Reference in new issue
Block a user