Create version check function
This will check if versions match and return 0 if match or 1 if not match.
This can run in UEFI shell etc.
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?
I rebased onto #51, rebased conflicts and force-pushed.
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.
@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"