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: DTS post-processing of ELF file depends on CONFIG_HAS_DTS #34449

Merged
merged 2 commits into from
Apr 26, 2021

Conversation

mtpr-ot
Copy link
Collaborator

@mtpr-ot mtpr-ot commented Apr 21, 2021

Only run gen_handles.py if CONFIG_HAS_DTS is set. This enables vendors
without device tree implementations to compile without the generated
dependencies.

Fixes #34416.

Signed-off-by: Morten Priess mtpr@oticon.com

Only run gen_handles.py if CONFIG_HAS_DTS is set. This enables vendors
without device tree implementations to compile without the generated
dependencies.

Signed-off-by: Morten Priess <mtpr@oticon.com>
@mtpr-ot mtpr-ot requested review from nashif and tejlmand as code owners April 21, 2021 07:14
@mtpr-ot
Copy link
Collaborator Author

mtpr-ot commented Apr 21, 2021

Closed/reopened to rerun CI

@mtpr-ot mtpr-ot closed this Apr 21, 2021
@mtpr-ot mtpr-ot reopened this Apr 21, 2021
@mtpr-ot
Copy link
Collaborator Author

mtpr-ot commented Apr 21, 2021

Can anybody help with the CI errors? Is it because some configurations are using DTS, but somehow set CONFIG_HAS_DTS=n?

@tejlmand
Copy link
Collaborator

Can anybody help with the CI errors? Is it because some configurations are using DTS, but somehow set CONFIG_HAS_DTS=n?

@pabigot can you assist ?

@tejlmand tejlmand requested a review from pabigot April 21, 2021 11:57
@pabigot
Copy link
Collaborator

pabigot commented Apr 21, 2021

Can anybody help with the CI errors? Is it because some configurations are using DTS, but somehow set CONFIG_HAS_DTS=n?

@pabigot can you assist ?

In arch/Kconfig the SPARC architecture doesn't have select HAS_DTS. Adding a commit that "fixes" that would probably make it work. Not sure why it isn't there @martin-aberg

I suspect platforms that don't have devicetree aren't going to make it very far in the Zephyr of the future. @galak @mbolivar-nordic FYI in case this is something to consider from an architectural level.

@mtpr-ot
Copy link
Collaborator Author

mtpr-ot commented Apr 21, 2021

In arch/Kconfig the SPARC architecture doesn't have select HAS_DTS. Adding a commit that "fixes" that would probably make it work. Not sure why it isn't there @martin-aberg

Thanks! I will add a commit with that selected.

@mtpr-ot
Copy link
Collaborator Author

mtpr-ot commented Apr 21, 2021

I suspect platforms that don't have devicetree aren't going to make it very far in the Zephyr of the future

I can understand that from a Zephyr architectural perspective. I will inform my colleagues of the deprecation, and hopefully we can go the DTS-way in the next generation.

With PR#34449, architectures that use DTS must select the HAS_DTS
configuration.

Signed-off-by: Morten Priess <mtpr@oticon.com>
@mbolivar-nordic
Copy link
Contributor

I suspect platforms that don't have devicetree aren't going to make it very far in the Zephyr of the future. @galak @mbolivar-nordic FYI in case this is something to consider from an architectural level.

That is my general impression as well, as documented in https://docs.zephyrproject.org/latest/guides/dts/design.html#single-source-for-all-hardware-information though this is ongoing work.

Basic things like "be able to create a struct device that isn't from devicetree" will continue to work "forever", though, as far as I know. I never use platforms without DTS though, not sure if we've got project level decisions made on the future of CONFIG_HAS_DTS=n.

@ghost
Copy link

ghost commented Apr 22, 2021

@pabigot Thank you for the heads-up regarding the missing HAS_DTS.

@mtpr-ot Thank you for the fix.

@mtpr-ot
Copy link
Collaborator Author

mtpr-ot commented Apr 26, 2021

@pabigot, so is this acceptable for the time being?

Copy link
Collaborator

@pabigot pabigot left a comment

Choose a reason for hiding this comment

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

@pabigot, so is this acceptable for the time being?

I don't like it, because it seems clear DTS is not an optional part of Zephyr, but until that's written into policy this seems the only way to make progress. Presumably some day somebody will get rid of CONFIG_HAS_DTS entirely and the hack will be removed at that point.

@carlescufi carlescufi merged commit a0dd44c into zephyrproject-rtos:master Apr 26, 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.

Configuration HAS_DTS has no function, preventing compile for vendors without device tree
6 participants