Strip board revision so keymap file use only board name #1015
+10
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Zephyr upstream has native board revision support.
https://docs.zephyrproject.org/latest/guides/porting/board_porting.html#multiple-board-revisions
At present, ZMK does not make use of this feature and relies on creating different boards for different revisions.
This may not not be optimal if a keyboard has many revisions.
Made a quick try at zephyr's revision for cyber60 keyboard,
https://github.com/megamind4089/zmk-config-4pplet/tree/unify_rev_with_buzzer/config/boards/arm/cyber60
With this change, we can compile different revisions using
But the only issue I faced was, ZMK was not able to find the keymap file properly.
Had to workaround this by specifying the keymap file in build command like this:
https://github.com/megamind4089/zmk-config-4pplet/blob/unify_rev_with_buzzer/.github/workflows/build.yaml#L63
The changes in this PR is to make ZMK aware of board revisions (partially) and choose the appropriate keymap file.
Also, this changes does not impact the existing boards/shields since none of them uses revisions yet