framework-system icon indicating copy to clipboard operation
framework-system copied to clipboard

Create version check function

Open kiram9 opened this issue 1 year ago • 4 comments

This will check if versions match and return 0 if match or 1 if not match.

This can run in UEFI shell etc.

kiram9 avatar Apr 30 '24 05:04 kiram9

If you run --version for EC you get this:

EC Firmware
  Build version:  "marigold-3.0.1-3b77d21 2024-07-05 00:57:22 marigold1@ip-172-26-3-226"
  RO Version:     "marigold-3.0.1-3b77d21"
  RW Version:     "marigold-3.0.1-3b77d21"
  Current image:  RO

Currently the compare command uses the first one. But that's a bit verbose. How about the check just the marigold-3.0.1-3b77d21 part of the RO image?

JohnAZoidberg avatar Aug 07 '24 07:08 JohnAZoidberg

I rebased onto #51, rebased conflicts and force-pushed.

JohnAZoidberg avatar Aug 07 '24 07:08 JohnAZoidberg

I fixed it for TGL, didn't try it on TGL or in UEFI shell yet. But I tried #51 on TGL UEFI shell yesterday, so I'm rather confident it'll work.

JohnAZoidberg avatar Aug 07 '24 09:08 JohnAZoidberg

@kiram9 I implemented AC side checking like this. I've got AC connected on the right, not on the left.

> sudo ./framework_tool --device ac-right --compare-version 1
Target Version "1"
Comparing AcRight "1"
Compared version:   0
 
> sudo ./framework_tool --device ac-left --compare-version 1
Target Version "1"
Comparing AcLeft "0"
Compared version:   1
Error: "Fail"

JohnAZoidberg avatar Aug 09 '24 02:08 JohnAZoidberg