Skip to content

Commit ecd5fcf

Browse files
committed
Do not boot to firmware setup after MeSet
Allow boot to continue normally after flashing instead of dropping users into the firmware setup menu without explanation. This case only happens when MeSet is run to unlock firmware. Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent afa3784 commit ecd5fcf

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

src/app/mod.rs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use std::uefi::guid;
1313
use std::uefi::reset::ResetType;
1414
use std::uefi::status::{Error, Result, Status};
1515
use std::vars::{
16-
get_boot_current, get_boot_item, get_boot_next, get_boot_order, get_os_indications,
17-
get_os_indications_supported, set_boot_item, set_boot_next, set_boot_order, set_os_indications,
16+
get_boot_current, get_boot_item, get_boot_next, get_boot_order,
17+
set_boot_item, set_boot_next, set_boot_order,
1818
};
1919

2020
use crate::display::{Display, Output, ScaledDisplay};
@@ -225,7 +225,6 @@ fn inner() -> Result<()> {
225225
} else if !validations.iter().any(|v| *v == ValidateKind::Found) {
226226
"* No updates were found *"
227227
} else {
228-
let mut setup_menu = false;
229228
let c = if let Ok((_, ectag)) = find(ECTAG) {
230229
// Attempt to remove EC tag
231230
match (ectag.0.Delete)(ectag.0).branch() {
@@ -245,8 +244,7 @@ fn inner() -> Result<()> {
245244
validations.clear();
246245
'\n'
247246
} else if find(MESETTAG).is_ok() {
248-
// Skip enter if ME unlocked, and boot into firmware setup to disable ME
249-
setup_menu = true;
247+
// Skip enter if ME unlocked
250248
'\n'
251249
} else if find(IFLASHVTAG).is_ok() {
252250
// Skip enter if flashing a meer5 and flashing already occured
@@ -314,18 +312,6 @@ fn inner() -> Result<()> {
314312
println!("Failed to reset DMI: {:?}", err);
315313
}
316314

317-
if setup_menu {
318-
let supported = get_os_indications_supported().unwrap_or(0);
319-
if supported & 1 == 1 {
320-
println!("Booting into BIOS setup on next boot");
321-
let mut indications = get_os_indications().unwrap_or(0);
322-
indications |= 1;
323-
set_os_indications(Some(indications))?;
324-
} else {
325-
println!("Cannot boot into BIOS setup automatically");
326-
}
327-
}
328-
329315
reboot = true;
330316
"* All updates applied successfully *"
331317
} else {

0 commit comments

Comments
 (0)