ports/zephyr-cp: keep board overlays and Kconfig fragments in the board folder - #11235
Merged
tannewt merged 2 commits intoAug 27, 2026
Merged
Conversation
tannewt
requested changes
Aug 24, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
Ah! This would be awesome if we could do them in the board's folder instead of the top level. I think this is what we'd need for that. Want to move the existing ones too? Thanks!
Author
|
Moved them all. Every board keeps its board.overlay / board.conf in its own folder now. To check nothing got lost I ran west build |
tannewt
requested changes
Aug 25, 2026
tannewt
left a comment
Member
There was a problem hiding this comment.
One question about a deletion. Excited for this cleanup otherwise. Thanks!
…ards Zephyr looks up boards/<name>.overlay and boards/<name>.conf by the resolved board name, so a board declared through cp_board_alias() never picks up files named after itself. The build succeeds and silently produces a firmware without the board's devicetree and Kconfig fragments. Pass the files as zephyr-cp_EXTRA_DTC_OVERLAY_FILE / _EXTRA_CONF_FILE when they exist. DEBUG=1 appends its fragment to the same list instead of replacing it. Verified with a board aliased to rpi_pico/rp2040 with both files present: zephyr.dts now cites the overlay and .config carries the board's options. Boards without such files are unaffected.
…rd folder Each board now keeps board.overlay and board.conf next to its circuitpython.toml in boards/<vendor>/<board>/, rather than at the top level where files named after Zephyr boards and files named after CircuitPython boards shared one directory. Now that these files reliably reach the board they belong to, the replace-vs-add distinction starts to matter: the overlay goes through DTC_OVERLAY_FILE rather than EXTRA_DTC_OVERLAY_FILE, because a board overlay replaces app.overlay. That is why the overlays here include app.overlay themselves, and why the nRF54L15 DK, which has no USB, deliberately does not. The Kconfig fragment stays additive, so DEBUG=1 still appends its own. boards/frdm_rw612_rw612_cpu0.overlay is dropped: no build string matches that name, so it was never applied, and its devicetree does not parse. Verified by configuring all 29 boards before and after the move - the generated .config and devicetree are identical for every one.
lynt-smitka
force-pushed
the
zephyr-cp-aliased-board-files
branch
from
August 26, 2026 18:01
d733f05 to
d0f27bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 looks up boards/.overlay and boards/.conf by the resolved board name, so a board declared through cp_board_alias() never picks up files named after itself. The build succeeds and silently produces a firmware without the board's devicetree and Kconfig fragments.
Pass the files as zephyr-cp_EXTRA_DTC_OVERLAY_FILE / _EXTRA_CONF_FILE when they exist. The DEBUG=1 fragment goes through the same EXTRA_CONF_FILE variable, so it is appended to the list rather than letting one overwrite the other.
Verified with a board aliased to rpi_pico/rp2040 with both files present: zephyr.dts now cites the overlay and .config carries the board's options. Boards without such files are unaffected.