Skip to content

Commit 721a938

Browse files
committed
It's H2O, not HO2
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 12b3955 commit 721a938

4 files changed

Lines changed: 17 additions & 14 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ see the [Support Matrices](support-matrices.md).
3030
- [x] CCG5 PD (11th Gen TigerLake) (`--pd-bin`)
3131
- [x] CCG6 PD (12th Gen AlderLake) (`--pd-bin`)
3232
- [x] CCG8 PD (Framework 16) (`--pd-bin`)
33-
- [x] HO2 BIOS Capsule (`--ho2-capsule`)
33+
- [x] H2O BIOS Capsule (`--h2o-capsule`)
3434
- [x] BIOS Version
3535
- [x] EC Version
3636
- [x] CCG5/CCG6/CCG8 PD Version
@@ -182,7 +182,7 @@ Options:
182182
--ec-bin <EC_BIN> Parse versions from EC firmware binary file
183183
--capsule <CAPSULE> Parse UEFI Capsule information from binary file
184184
--dump <DUMP> Dump extracted UX capsule bitmap image to a file
185-
--ho2-capsule <HO2_CAPSULE> Parse UEFI Capsule information from binary file
185+
--h2o-capsule <H2O_CAPSULE> Parse UEFI Capsule information from binary file
186186
--intrusion Show status of intrusion switch
187187
--inputmodules Show status of the input modules (Framework 16 only)
188188
--kblight [<KBLIGHT>] Set keyboard backlight percentage or get, if no value provided

framework_lib/src/commandline/clap_std.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct ClapCli {
100100

101101
/// Parse UEFI Capsule information from binary file
102102
#[arg(long)]
103-
ho2_capsule: Option<std::path::PathBuf>,
103+
h2o_capsule: Option<std::path::PathBuf>,
104104

105105
/// Dump EC flash contents
106106
#[arg(long)]
@@ -259,8 +259,8 @@ pub fn parse(args: &[String]) -> Cli {
259259
.capsule
260260
.map(|x| x.into_os_string().into_string().unwrap()),
261261
dump: args.dump.map(|x| x.into_os_string().into_string().unwrap()),
262-
ho2_capsule: args
263-
.ho2_capsule
262+
h2o_capsule: args
263+
.h2o_capsule
264264
.map(|x| x.into_os_string().into_string().unwrap()),
265265
dump_ec_flash: args
266266
.dump_ec_flash

framework_lib/src/commandline/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ pub struct Cli {
152152
pub ec_bin: Option<String>,
153153
pub capsule: Option<String>,
154154
pub dump: Option<String>,
155-
pub ho2_capsule: Option<String>,
155+
pub h2o_capsule: Option<String>,
156156
pub dump_ec_flash: Option<String>,
157157
pub flash_ec: Option<String>,
158158
pub flash_ro_ec: Option<String>,
@@ -932,7 +932,7 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
932932
println!("Capsule is invalid.");
933933
}
934934
}
935-
} else if let Some(capsule_path) = &args.ho2_capsule {
935+
} else if let Some(capsule_path) = &args.h2o_capsule {
936936
#[cfg(feature = "uefi")]
937937
let data = crate::uefi::fs::shell_read_file(capsule_path);
938938
#[cfg(not(feature = "uefi"))]
@@ -954,7 +954,10 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
954954
println!(" BIOS Version: {:>18}", cap.version);
955955
}
956956
if let Some(ec_bin) = find_ec_in_bios_cap(&data) {
957+
debug!("Found EC binary in BIOS capsule");
957958
analyze_ec_fw(ec_bin);
959+
} else {
960+
debug!("Didn't find EC binary in BIOS capsule");
958961
}
959962
if let Some(pd_bin) = find_pd_in_bios_cap(&data) {
960963
debug!("Found PD binary in BIOS capsule");
@@ -1025,7 +1028,7 @@ Options:
10251028
--ec-bin <EC_BIN> Parse versions from EC firmware binary file
10261029
--capsule <CAPSULE> Parse UEFI Capsule information from binary file
10271030
--dump <DUMP> Dump extracted UX capsule bitmap image to a file
1028-
--ho2-capsule <HO2_CAPSULE> Parse UEFI Capsule information from binary file
1031+
--h2o-capsule <H2O_CAPSULE> Parse UEFI Capsule information from binary file
10291032
--dump-ec-flash <DUMP_EC_FLASH> Dump EC flash contents
10301033
--flash-ec <FLASH_EC> Flash EC with new firmware from file
10311034
--flash-ro-ec <FLASH_EC> Flash EC with new firmware from file
@@ -1292,13 +1295,13 @@ pub fn analyze_ec_fw(data: &[u8]) {
12921295
if let Some(ver) = ec_binary::read_ec_version(data, true) {
12931296
ec_binary::print_ec_version(&ver, true);
12941297
} else {
1295-
println!("Failed to read version")
1298+
println!("Failed to read EC version")
12961299
}
12971300
// Readwrite firmware
12981301
if let Some(ver) = ec_binary::read_ec_version(data, false) {
12991302
ec_binary::print_ec_version(&ver, false);
13001303
} else {
1301-
println!("Failed to read version")
1304+
println!("Failed to read EC version")
13021305
}
13031306
}
13041307

framework_lib/src/commandline/uefi.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub fn parse(args: &[String]) -> Cli {
7878
flash_rw_ec: None,
7979
capsule: None,
8080
dump: None,
81-
ho2_capsule: None,
81+
h2o_capsule: None,
8282
intrusion: false,
8383
inputmodules: false,
8484
input_deck_mode: None,
@@ -374,11 +374,11 @@ pub fn parse(args: &[String]) -> Cli {
374374
None
375375
};
376376
found_an_option = true;
377-
} else if arg == "--ho2-capsule" {
378-
cli.ho2_capsule = if args.len() > i + 1 {
377+
} else if arg == "--h2o-capsule" {
378+
cli.h2o_capsule = if args.len() > i + 1 {
379379
Some(args[i + 1].clone())
380380
} else {
381-
println!("--ho2-capsule requires extra argument to denote input file");
381+
println!("--h2o-capsule requires extra argument to denote input file");
382382
None
383383
};
384384
found_an_option = true;

0 commit comments

Comments
 (0)