Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5219072

Browse files
committedMay 15, 2025·
Allow flashing EC RW region
Works well on Linux. It's disabled by the windows driver at the moment though. No need to block it in this application, users could also use ectool. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent d8c292c commit 5219072

File tree

1 file changed

+2
-7
lines changed
  • framework_lib/src/commandline

1 file changed

+2
-7
lines changed
 

‎framework_lib/src/commandline/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -570,19 +570,14 @@ fn flash_ec(ec: &CrosEc, ec_bin_path: &str, flash_type: EcFlashType) {
570570
let data = crate::uefi::fs::shell_read_file(ec_bin_path);
571571
#[cfg(not(feature = "uefi"))]
572572
let data: Option<Vec<u8>> = {
573-
let _data = match fs::read(ec_bin_path) {
573+
match fs::read(ec_bin_path) {
574574
Ok(data) => Some(data),
575575
// TODO: Perhaps a more user-friendly error
576576
Err(e) => {
577577
println!("Error {:?}", e);
578578
None
579579
}
580-
};
581-
582-
// EC communication from OS is not stable enough yet,
583-
// it can't be trusted to reliably flash the EC without risk of damage.
584-
println!("Sorry, flashing EC from the OS is not supported yet.");
585-
None
580+
}
586581
};
587582

588583
if let Some(data) = data {

0 commit comments

Comments
 (0)
Please sign in to comment.