Skip to content

Commit 8935ba2

Browse files
committed
compare-version: Add example in README
Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 2b93a9b commit 8935ba2

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,38 @@ own EC firmware and flash it.
272272
- [x] Basic unit tests
273273
- [x] Test parsing real binaries
274274

275+
## Version Check
276+
277+
Check if the firmware version is what you expect, returns exit code 0 on
278+
succcess, 1 on failure.
279+
280+
```
281+
# Check which devices it's available for
282+
> ./framework_system --device
283+
[possible values: bios, ec, pd0, pd1, rtm01, rtm23]
284+
285+
For more information try '--help'
286+
287+
# Successful compare
288+
> ./framework_system --device bios --compare-version 03.01
289+
Target Version "03.01"
290+
Comparing BIOS version "03.01"
291+
Compared version: 0
292+
> echo $?
293+
0
294+
295+
# Failed compare
296+
> ./framework_system --device bios --compare-version 03.00
297+
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
298+
Target Version "03.00"
299+
Comparing BIOS version "03.01"
300+
Compared version: 1
301+
Error: "Fail"
302+
303+
> echo $?
304+
1
305+
```
306+
275307
## Debugging
276308

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

0 commit comments

Comments
 (0)