Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.2.0 #67

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,21 +279,21 @@ succcess, 1 on failure.

```
# Check which devices it's available for
> ./framework_system --device
[possible values: bios, ec, pd0, pd1, rtm01, rtm23]
> ./framework_tool --device
[possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right]

For more information try '--help'

# Successful compare
> ./framework_system --device bios --compare-version 03.01
> ./framework_tool --device bios --compare-version 03.01
Target Version "03.01"
Comparing BIOS version "03.01"
Compared version: 0
> echo $?
0

# Failed compare
> ./framework_system --device bios --compare-version 03.00
> ./framework_tool --device bios --compare-version 03.00
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Target Version "03.00"
Comparing BIOS version "03.01"
Expand All @@ -304,6 +304,29 @@ Error: "Fail"
1
```

On UEFI Shell:

```
# Check if AC is attached on left side
Shell> fs0:framework_tool.efi --device ac-left --compare-version 1
Target Version "1"
Comparing AcLeft "1"
Comparison Result: 0
# It is
Shell> echo %lasterror%
0x0

# Check if AC is attached on right side
Shell> fs0:framework_tool.efi --device ac-right --compare-version 1
Target Version "1"
Comparing AcLeft "0"
Comparison Result: 1

# It is not
Shell> echo %lasterror%
0x1
```

## Debugging

To debug, increase the verbosity from the commandline with `-v`.
Expand Down
2 changes: 1 addition & 1 deletion framework_lib/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "framework_lib"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
rust-version = "1.61"
build = "build.rs"
Expand Down
4 changes: 2 additions & 2 deletions framework_lib/src/ccgx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl fmt::Display for BaseVersion {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"{}.{}.{}.{:0>3}",
"{:X}.{:X}.{:X}.{:03X}",
self.major, self.minor, self.patch, self.build_number
)
}
Expand Down Expand Up @@ -163,7 +163,7 @@ pub struct AppVersion {

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

Expand Down
6 changes: 5 additions & 1 deletion framework_lib/src/commandline/uefi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,12 +436,16 @@ pub fn parse(args: &[String]) -> Cli {
Some(HardwareDeviceType::RTM01)
} else if console_arg == "rtm23" {
Some(HardwareDeviceType::RTM23)
} else if console_arg == "ac-left" {
Some(HardwareDeviceType::AcLeft)
} else if console_arg == "ac-right" {
Some(HardwareDeviceType::AcRight)
} else {
println!("Invalid value for --device: {}", console_arg);
None
}
} else {
println!("Need to provide a value for --console. Either `follow` or `recent`");
println!("Need to provide a value for --console. Possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right");
None
};
}
Expand Down
2 changes: 1 addition & 1 deletion framework_tool/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "framework_tool"
version = "0.1.0"
version = "0.2.0"
edition = "2021"

[features]
Expand Down
2 changes: 1 addition & 1 deletion framework_uefi/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "framework_uefi"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
rust-version = "1.68"

Expand Down
Loading