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

Create version check function #32

Merged
merged 5 commits into from
Oct 21, 2024
Merged

Create version check function #32

merged 5 commits into from
Oct 21, 2024

Conversation

kiram9
Copy link
Member

@kiram9 kiram9 commented Apr 30, 2024

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

This can run in UEFI shell etc.

@kiram9 kiram9 requested a review from JohnAZoidberg April 30, 2024 05:00
@JohnAZoidberg JohnAZoidberg changed the title create version check function Create version check function Apr 30, 2024
@JohnAZoidberg
Copy link
Member

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 JohnAZoidberg changed the base branch from main to tgl-pd-version August 7, 2024 07:58
@JohnAZoidberg
Copy link
Member

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

@JohnAZoidberg
Copy link
Member

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.

Base automatically changed from tgl-pd-version to main August 9, 2024 02:14
@JohnAZoidberg
Copy link
Member

@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"

kiram9 and others added 4 commits October 21, 2024 13:50
This will check if versions match and return 0 if match or 1 if not
match.

This can run in UEFI shell etc.

Signed-off-by: Kieran Levin <[email protected]>
Make sure it's the active one, and use base version on TGL.

Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Copy link
Member

@JohnAZoidberg JohnAZoidberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit messy but let's get it in now, so we don't have to deal with more conflicts later.

@JohnAZoidberg JohnAZoidberg merged commit 6fd13f2 into main Oct 21, 2024
6 checks passed
@JohnAZoidberg JohnAZoidberg deleted the version_check branch October 21, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants