-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(boards): Support board revisions #2157
Conversation
6947016
to
44e6a21
Compare
@zhiayang Thoughts on allowing fuzzy revisions in the YAML metadata so you can drop unneeded portions? Would allow you to add Found this when working on #2195 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to update the powershell script for this support as well. See my other comment about fuzzy version matching, and maybe allowing specifying a partial revision in the metadata.
schema/hardware-metadata.schema.json
Outdated
@@ -133,6 +137,15 @@ | |||
"type": { | |||
"type": "string", | |||
"const": "interconnect" | |||
}, | |||
"revisions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do interconnect versions work? Not sure why this piece got added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think i was just autopiloting through this; don't think interconnects need revisions.
schema/hardware-metadata.schema.json
Outdated
@@ -255,6 +277,15 @@ | |||
}, | |||
"exposes": { | |||
"$ref": "#/$defs/interconnects" | |||
}, | |||
"revisions": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shield variants are sadly not nearly as structured as board revisions. See https://docs.zephyrproject.org/3.5.0/hardware/porting/shields.html#shield-variants
This probably needs to be handled differently, or just not handled at all in this PR, so we can focus on getting board revisions in first.
thanks pete, i'll look at this over the weekend hopefully |
e39be99
to
4fd3271
Compare
re: partial revisions, the schema already supports it, and I've tested it works with the rest of the infrastructure -- the zephyr cmake stuff already handles partial revisions. In #1946 I updated the It seems to work: https://github.com/zhiayang/zmk-test/actions/runs/8226802642/job/22493758007 (just ignore the mikoto_520 one, that one is broken for an unrelated reason) edit: will edit the powershell script |
powershell script updated, is there anything else? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable, thanks!
Split off from #1946; this is just the zmk infrastructure part to support board revisions.
Changes:
setup.sh
to prompt the user for revisions if the board yml defines revisions (and will also say which one is the default — if any)setup.sh
will append@revision
to the board name.The script doesn't support revisions for shields yet, but if the approach is sound I'll add that as well as fix up the powershell script.
I've set up a repo to test: https://github.com/zhiayang/zmk-test, but this depends on #1946.