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

sysbuild: dts: Introduce sysbuild_dt_* API #73903

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

57300
Copy link
Contributor

@57300 57300 commented Jun 7, 2024

Add new functions to sysbuild_extensions.cmake, which will mirror the
familiar dt_* API from Zephyr extensions.cmake. For example:

dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
, only after its respective ExternalZephyrProject_Cmake() call.

This works by importing the generated dts.cmake files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the CMakeCache.txt and .config
are also imported to be used by the related sysbuild_get() function.

The dt_* API itself also has to be updated, in order to read properties
from a variable DEVICETREE_TARGET set in the parent scope.

@57300 57300 requested review from tejlmand and nordicjm June 7, 2024 10:03
@57300 57300 added this to the v4.0.0 milestone Jun 27, 2024
57300 added a commit to 57300/sdk-zephyr that referenced this pull request Jul 16, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
57300 added a commit to 57300/sdk-zephyr that referenced this pull request Jul 16, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
rlubos pushed a commit to nrfconnect/sdk-zephyr that referenced this pull request Jul 16, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
rlubos pushed a commit to nrfconnect/sdk-zephyr that referenced this pull request Jul 16, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
nordicjm
nordicjm previously approved these changes Jul 17, 2024
Copy link
Collaborator

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

Very useful addition!

bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 10, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 27, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Sep 30, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 1, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
bjarki-andreasen pushed a commit to bjarki-andreasen/sdk-zephyr that referenced this pull request Oct 4, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
(cherry picked from commit 6f728ca)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
(cherry picked from commit 46d86b4)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
(cherry picked from commit 6f728ca)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
(cherry picked from commit 46d86b4)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
(cherry picked from commit 6f728ca)
rlubos pushed a commit to rlubos/sdk-zephyr that referenced this pull request Oct 22, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
(cherry picked from commit 46d86b4)
@57300 57300 removed this from the v4.0.0 milestone Oct 24, 2024
jukkar pushed a commit to nrfconnect/sdk-zephyr that referenced this pull request Dec 5, 2024
…n dts.cmake

Upstream PR: zephyrproject-rtos/zephyr#73903

Instead of hardcoding the name `devicetree_target`, we can update the
generated `dts.cmake` to accept `DEVICETREE_TARGET` as input variable.
This will become useful in multi-image builds, where we would like to
process multiple devicetrees.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit cd187c719ae9162a2ab6bd6aeff511a4cc684bdc)
(cherry picked from commit 6f728ca)
(cherry picked from commit 48909b1)
jukkar pushed a commit to nrfconnect/sdk-zephyr that referenced this pull request Dec 5, 2024
Upstream PR: zephyrproject-rtos/zephyr#73903

Add new functions to `sysbuild_extensions.cmake`, which will mirror the
familiar dt_* API from Zephyr `extensions.cmake`. For example:

   dt_nodelabel(<var> NODELABEL <label>)

gets the following sysbuild counterpart, with one extra argument:

   sysbuild_dt_nodelabel(<var> IMAGE <image> NODELABEL <label>)

This API allows sysbuild to retrieve devicetree information for a given
<image>, only after its respective `ExternalZephyrProject_Cmake()` call.

This works by importing the generated `dts.cmake` files from each
image's build directory, and creating multiple CMake targets to hold the
generated properties - much like how the `CMakeCache.txt` and `.config`
are also imported to be used by the related `sysbuild_get()` function.

The dt_* API itself also has to be updated, in order to read properties
from a variable `DEVICETREE_TARGET` set in the parent scope.

Signed-off-by: Grzegorz Swiderski <[email protected]>
(cherry picked from commit 3bf9a41a20ae52adc3ccadc2ff79425160f8ad73)
(cherry picked from commit 46d86b4)
(cherry picked from commit c58279c)
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Dec 24, 2024
@decsny decsny removed the Stale label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: Devicetree area: Sysbuild DNM This PR should not be merged (Do Not Merge)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants