Skip to content

Commit 96a7ed9

Browse files
Merge pull request #67 from FrameworkComputer/prep-v0.2.0
Release v0.2.0
2 parents 93c628f + 6f33a24 commit 96a7ed9

File tree

7 files changed

+40
-13
lines changed

7 files changed

+40
-13
lines changed

Cargo.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,21 @@ succcess, 1 on failure.
279279

280280
```
281281
# Check which devices it's available for
282-
> ./framework_system --device
283-
[possible values: bios, ec, pd0, pd1, rtm01, rtm23]
282+
> ./framework_tool --device
283+
[possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right]
284284
285285
For more information try '--help'
286286
287287
# Successful compare
288-
> ./framework_system --device bios --compare-version 03.01
288+
> ./framework_tool --device bios --compare-version 03.01
289289
Target Version "03.01"
290290
Comparing BIOS version "03.01"
291291
Compared version: 0
292292
> echo $?
293293
0
294294
295295
# Failed compare
296-
> ./framework_system --device bios --compare-version 03.00
296+
> ./framework_tool --device bios --compare-version 03.00
297297
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
298298
Target Version "03.00"
299299
Comparing BIOS version "03.01"
@@ -304,6 +304,29 @@ Error: "Fail"
304304
1
305305
```
306306

307+
On UEFI Shell:
308+
309+
```
310+
# Check if AC is attached on left side
311+
Shell> fs0:framework_tool.efi --device ac-left --compare-version 1
312+
Target Version "1"
313+
Comparing AcLeft "1"
314+
Comparison Result: 0
315+
# It is
316+
Shell> echo %lasterror%
317+
0x0
318+
319+
# Check if AC is attached on right side
320+
Shell> fs0:framework_tool.efi --device ac-right --compare-version 1
321+
Target Version "1"
322+
Comparing AcLeft "0"
323+
Comparison Result: 1
324+
325+
# It is not
326+
Shell> echo %lasterror%
327+
0x1
328+
```
329+
307330
## Debugging
308331

309332
To debug, increase the verbosity from the commandline with `-v`.

framework_lib/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "framework_lib"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
# Minimum Supported Rust Version
66
# Ubuntu 24.04 LTS ships 1.75

framework_lib/src/ccgx/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl fmt::Display for BaseVersion {
121121
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
122122
write!(
123123
f,
124-
"{}.{}.{}.{:0>3}",
124+
"{:X}.{:X}.{:X}.{:03X}",
125125
self.major, self.minor, self.patch, self.build_number
126126
)
127127
}
@@ -163,7 +163,7 @@ pub struct AppVersion {
163163

164164
impl fmt::Display for AppVersion {
165165
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
166-
write!(f, "{}.{}.{:0>2}", self.major, self.minor, self.circuit)
166+
write!(f, "{:X}.{:X}.{:02X}", self.major, self.minor, self.circuit)
167167
}
168168
}
169169

framework_lib/src/commandline/uefi.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,16 @@ pub fn parse(args: &[String]) -> Cli {
440440
Some(HardwareDeviceType::RTM01)
441441
} else if console_arg == "rtm23" {
442442
Some(HardwareDeviceType::RTM23)
443+
} else if console_arg == "ac-left" {
444+
Some(HardwareDeviceType::AcLeft)
445+
} else if console_arg == "ac-right" {
446+
Some(HardwareDeviceType::AcRight)
443447
} else {
444448
println!("Invalid value for --device: {}", console_arg);
445449
None
446450
}
447451
} else {
448-
println!("Need to provide a value for --console. Either `follow` or `recent`");
452+
println!("Need to provide a value for --console. Possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right");
449453
None
450454
};
451455
}

framework_tool/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "framework_tool"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55

66
[features]

framework_uefi/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "framework_uefi"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
edition = "2021"
55
# Minimum Supported Rust Version
66
rust-version = "1.74"

0 commit comments

Comments
 (0)