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

Configuration HAS_DTS has no function, preventing compile for vendors without device tree #34416

Closed
mtpr-ot opened this issue Apr 20, 2021 · 1 comment · Fixed by #34449
Closed
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug

Comments

@mtpr-ot
Copy link
Collaborator

mtpr-ot commented Apr 20, 2021

DTS has been made mandatory, however certain vendors do not want to go down that road.
Where an empty device tree in certain configurations is sufficient, in others, the number of hacks needed to compile is unreasonable.

Expected behavior
It should be possible to use- and unset the existing CONFIG_HAS_DTS to compile zephyr on vendor platforms.

Impact
Currently a local hack is used to compile without DTS. This can quickly be made into a PR if accepted (the "if/endif" added to CMakeLists.txt):

if(CONFIG_HAS_DTS)
  # dev_handles.c is generated from ${ZEPHYR_PREBUILT_EXECUTABLE} by
  # gen_handles.py
  add_custom_command(
    OUTPUT dev_handles.c
    COMMAND
    ${PYTHON_EXECUTABLE}
    ${ZEPHYR_BASE}/scripts/gen_handles.py
    --output-source dev_handles.c
    --kernel $<TARGET_FILE:${ZEPHYR_PREBUILT_EXECUTABLE}>
    --zephyr-base ${ZEPHYR_BASE}
    DEPENDS ${ZEPHYR_PREBUILT_EXECUTABLE}
    )
  set_property(GLOBAL APPEND PROPERTY GENERATED_KERNEL_SOURCE_FILES dev_handles.c)
endif()
@mtpr-ot mtpr-ot added the bug The issue is a bug, or the PR is fixing a bug label Apr 20, 2021
@galak galak added the priority: low Low impact/importance bug label Apr 20, 2021
@galak
Copy link
Collaborator

galak commented Apr 20, 2021

Can you post this as a PR. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants