Skip to content

Commit

Permalink
compare-version: Add example in README
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Schaefer <dhs@frame.work>
  • Loading branch information
JohnAZoidberg committed Oct 21, 2024
1 parent 2b93a9b commit 8935ba2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,38 @@ own EC firmware and flash it.
- [x] Basic unit tests
- [x] Test parsing real binaries

## Version Check

Check if the firmware version is what you expect, returns exit code 0 on
succcess, 1 on failure.

```
# Check which devices it's available for
> ./framework_system --device
[possible values: bios, ec, pd0, pd1, rtm01, rtm23]
For more information try '--help'
# Successful compare
> ./framework_system --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
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
Target Version "03.00"
Comparing BIOS version "03.01"
Compared version: 1
Error: "Fail"
> echo $?
1
```

## Debugging

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

0 comments on commit 8935ba2

Please sign in to comment.