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

cmake: board_check_revision() also accepts a list of valid revisions #32620

Conversation

tejlmand
Copy link
Collaborator

To remove the need of empty config files, the board_check_revision()
now accepts a list of valid revisions.

As example:

board_check_revision(
  FORMAT MAJOR.MINOR.PATCH
  VALID_REVISIONS 0.1.0 0.5.0 0.10.0
)

The code is still compatible with the <board>_<revision>.conf changes
so that if different revisions of a board has Kconfig differences, then
there is no need to also specify the list of valid revisions.

Signed-off-by: Torsten Rasmussen Torsten.Rasmussen@nordicsemi.no

doc/guides/porting/board_porting.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@mbolivar-nordic mbolivar-nordic left a comment

Choose a reason for hiding this comment

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

Looks good. Just to confirm, the point is to allow revisions that only have DT overlays, right?

That makes sense. In retrospect, hardware differences without software differences are probably more common. We probably should have looked for overlay files and made .conf fragments optional from the beginning instead.

Just a few documentation nits.

doc/guides/porting/board_porting.rst Outdated Show resolved Hide resolved
doc/guides/porting/board_porting.rst Outdated Show resolved Hide resolved
doc/guides/porting/board_porting.rst Outdated Show resolved Hide resolved
doc/guides/porting/board_porting.rst Outdated Show resolved Hide resolved
@tejlmand
Copy link
Collaborator Author

tejlmand commented Feb 24, 2021

Looks good. Just to confirm, the point is to allow revisions that only have DT overlays, right?

Correct. Reviewing #31624 made me realize the empty files are not so nice.
Or in general not make assumptions on what is required to detect a revision.

That makes sense. In retrospect, hardware differences without software differences are probably more common. We probably should have looked for overlay files and made .conf fragments optional from the beginning instead.

You're probably right.

To remove the need of empty config files, the `board_check_revision()`
now accepts a list of valid revisions.

As example:
```
board_check_revision(
  FORMAT MAJOR.MINOR.PATCH
  VALID_REVISIONS 0.1.0 0.5.0 0.10.0
)
```

The code is still compatible with the `<board>_<revision>.conf` changes
so that if different revisions of a board has Kconfig differences, then
there is no need to also specify the list of valid revisions.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
@tejlmand tejlmand force-pushed the board_check_revision_extension branch from ac05dde to 9e965f7 Compare February 24, 2021 20:17
@carlescufi carlescufi merged commit 3a58b45 into zephyrproject-rtos:master Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants