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

boards: board revision 0 (when default) does not include revision file #65548

Closed
thedjnK opened this issue Nov 21, 2023 · 0 comments · Fixed by #65562
Closed

boards: board revision 0 (when default) does not include revision file #65548

thedjnK opened this issue Nov 21, 2023 · 0 comments · Fixed by #65562
Assignees
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug

Comments

@thedjnK
Copy link
Collaborator

thedjnK commented Nov 21, 2023

Describe the bug
The documentation on https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#multiple-board-revisions states the following:

Currently, <revision> can be either a numeric MAJOR.MINOR.PATCH style revision like 1.5.0, an integer number like 1, or single letter like A, B, etc. Zephyr provides a CMake board extension function, board_check_revision(), to make it easy to match either style from revision.cmake.

Consider the example of having a board with 2 board revisions, let's call it plank and the two revisions being 0 and 1, then create 2 overlay files in the board directory plank_0.overlay and plank_1.overlay, with the following revision.cmake file:

board_check_revision(FORMAT NUMBER
                     DEFAULT_REVISION 0
                     HIGHEST_REVISION 1
                     VALID_REVISIONS 0 1
)

When configuring for board plank@1, the plank_1.overlay file is correctly included, however when configuring for plank, the build system correct output that it is using revision 0, but the plank_0.overlay file is completely ignored, this is best illistrated by just having a file full of garbage, one would expect cmake to error out, but no error occurs (this is using sysbuild):

-- Zephyr version: 3.5.99 (/tmp/net/zephyr)
-- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
-- Board: plank, Revision: 0
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.3 (/opt/zephyr-sdk-0.16.3)
...
-- Including signing script: /tmp/net/zephyr/cmake/mcuboot.cmake
-- Configuring done (4.4s)
-- Generating done (0.1s)
-- Build files have been written to: /tmp/net/net_loader/app/_AA/app
--

To Reproduce
Create a board with revision 0 (and another revision), create a revision 0 overlay, try configuring project, overlay is unused.

Expected behavior
Overlay to be used

Impact
Annoyance

Environment (please complete the following information):

  • OS: Arch linux x64
  • Commit SHA or Version used: 1dc6279
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System bug The issue is a bug, or the PR is fixing a bug
Projects
Status: Done in 3.4
Development

Successfully merging a pull request may close this issue.

3 participants