Skip to content

Commit 284e7a5

Browse files
committed
sysbuild: Migrate from sysbuild_dt_*
The `sysbuild_dt_*` CMake API came from upstream Zephyr PR #: 73903. This had been in review for almost a year, and in the end, the proposed API ended up being replaced. This merits an entry in the migration guide. Note that since the API was cherry-picked from PR, there's no deprecation process. Signed-off-by: Grzegorz Swiderski <[email protected]>
1 parent 328d8bd commit 284e7a5

File tree

6 files changed

+60
-18
lines changed

6 files changed

+60
-18
lines changed

cmake/sysbuild/fast_pair/hex.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ function(fast_pair_hex_dts)
8686

8787
set(fp_partition_name bt_fast_pair_partition)
8888

89-
sysbuild_dt_nodelabel(
89+
dt_nodelabel(
9090
bt_fast_pair_partition_node_full_path
91-
IMAGE
91+
TARGET
9292
${DEFAULT_IMAGE}
9393
NODELABEL
9494
"${fp_partition_name}"
@@ -101,9 +101,9 @@ function(fast_pair_hex_dts)
101101
"data generation with the SB_CONFIG_BT_FAST_PAIR_PROV_DATA Kconfig.")
102102
endif()
103103

104-
sysbuild_dt_reg_addr(
104+
dt_reg_addr(
105105
bt_fast_pair_partition_relative_address
106-
IMAGE
106+
TARGET
107107
${DEFAULT_IMAGE}
108108
PATH
109109
"${bt_fast_pair_partition_node_full_path}"
@@ -120,9 +120,9 @@ function(fast_pair_hex_dts)
120120
nvm_node_full_path
121121
"${bt_fast_pair_partition_node_parent_full_path}"
122122
)
123-
sysbuild_dt_reg_addr(
123+
dt_reg_addr(
124124
nvm_base_address
125-
IMAGE
125+
TARGET
126126
${DEFAULT_IMAGE}
127127
PATH
128128
"${nvm_node_full_path}"

cmake/sysbuild/image_signing_nrf700x.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ function(nrf7x_signing_tasks input output_hex output_bin dependencies)
2626
endif()
2727

2828
# Fetch devicetree details for flash and slot information
29-
sysbuild_dt_chosen(flash_node IMAGE ${DEFAULT_IMAGE} PROPERTY "zephyr,flash")
30-
sysbuild_dt_nodelabel(slot0_flash IMAGE ${DEFAULT_IMAGE} NODELABEL "slot0_partition" REQUIRED)
31-
sysbuild_dt_prop(slot_size IMAGE ${DEFAULT_IMAGE} PATH "${slot0_flash}" PROPERTY "reg" INDEX 1 REQUIRED)
32-
sysbuild_dt_prop(write_block_size IMAGE ${DEFAULT_IMAGE} PATH "${flash_node}" PROPERTY "write-block-size")
29+
dt_chosen(flash_node TARGET ${DEFAULT_IMAGE} PROPERTY "zephyr,flash")
30+
dt_nodelabel(slot0_flash TARGET ${DEFAULT_IMAGE} NODELABEL "slot0_partition" REQUIRED)
31+
dt_prop(slot_size TARGET ${DEFAULT_IMAGE} PATH "${slot0_flash}" PROPERTY "reg" INDEX 1 REQUIRED)
32+
dt_prop(write_block_size TARGET ${DEFAULT_IMAGE} PATH "${flash_node}" PROPERTY "write-block-size")
3333

3434
if(NOT write_block_size)
3535
set(write_block_size 4)

cmake/sysbuild/nrf700x.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66

77
function(setup_nrf700x_xip_data)
8-
sysbuild_dt_nodelabel(qspi_nodelabel IMAGE ${DEFAULT_IMAGE} NODELABEL "qspi")
9-
sysbuild_dt_reg_addr(qspi_xip_address IMAGE ${DEFAULT_IMAGE} PATH "${qspi_nodelabel}" NAME "qspi_mm")
8+
dt_nodelabel(qspi_nodelabel TARGET ${DEFAULT_IMAGE} NODELABEL "qspi")
9+
dt_reg_addr(qspi_xip_address TARGET ${DEFAULT_IMAGE} PATH "${qspi_nodelabel}" NAME "qspi_mm")
1010

1111
set(NRF70_FW_BINS ${ZEPHYR_NRFXLIB_MODULE_DIR}/nrf_wifi/bin/ncs)
1212

cmake/sysbuild/suit_provisioning.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ set(MPI_BINARY_DIR ${DEFAULT_BINARY_DIR}/zephyr)
1414
# Store the absolute address of the SUIT storage inside CMake cache.
1515
#
1616
function(configure_storage_address_cache)
17-
sysbuild_dt_nodelabel(
17+
dt_nodelabel(
1818
suit_storage_dev
19-
IMAGE
19+
TARGET
2020
${DEFAULT_IMAGE}
2121
NODELABEL
2222
"suit_storage_partition"
@@ -28,9 +28,9 @@ function(configure_storage_address_cache)
2828
endif()
2929

3030
# Calculate SUIT storage address, based on the DTS
31-
sysbuild_dt_reg_addr(
31+
dt_reg_addr(
3232
suit_storage_address
33-
IMAGE
33+
TARGET
3434
${DEFAULT_IMAGE}
3535
PATH
3636
"${suit_storage_dev}"

doc/nrf/releases_and_maturity/migration/migration_guide_3.1.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,48 @@ This section describes the changes related to libraries.
4040

4141
.. _migration_3.1_recommended:
4242

43+
Build system
44+
============
45+
46+
.. toggle::
47+
48+
* In sysbuild, the following CMake extensions have been removed:
49+
50+
* ``sysbuild_dt_nodelabel``
51+
* ``sysbuild_dt_alias``
52+
* ``sysbuild_dt_node_exists``
53+
* ``sysbuild_dt_node_has_status``
54+
* ``sysbuild_dt_prop``
55+
* ``sysbuild_dt_comp_path``
56+
* ``sysbuild_dt_num_regs``
57+
* ``sysbuild_dt_reg_addr``
58+
* ``sysbuild_dt_reg_size``
59+
* ``sysbuild_dt_has_chosen``
60+
* ``sysbuild_dt_chosen``
61+
62+
You must now use pre-existing devicetree extensions, such as ``dt_nodelabel``, without the ``sysbuild_`` prefix.
63+
To specify the sysbuild image, use the ``TARGET`` argument in place of ``IMAGE``.
64+
65+
The following example shows one of the removed functions:
66+
67+
.. code-block:: none
68+
69+
sysbuild_dt_chosen(
70+
flash_node
71+
IMAGE ${DEFAULT_IMAGE}
72+
PROPERTY "zephyr,flash"
73+
)
74+
75+
It should now be modified as follows:
76+
77+
.. code-block:: none
78+
79+
dt_chosen(
80+
flash_node
81+
TARGET ${DEFAULT_IMAGE}
82+
PROPERTY "zephyr,flash"
83+
)
84+
4385
Recommended changes
4486
*******************
4587

west.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ manifest:
6565
# https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html
6666
- name: zephyr
6767
repo-path: sdk-zephyr
68-
revision: ad267ac6302f390e3387d5e7d79974f36214c6a5
68+
revision: f1626faca7b6ff5a2a7f45ee2b085599999c08ed
6969
import:
7070
# In addition to the zephyr repository itself, NCS also
7171
# imports the contents of zephyr/west.yml at the above
@@ -156,7 +156,7 @@ manifest:
156156
- name: matter
157157
repo-path: sdk-connectedhomeip
158158
path: modules/lib/matter
159-
revision: 4ec4f3bcbcabd69969a628f9bb328501566a8cd7
159+
revision: ab711a4c10ce17f498c9f804444e12546855cb37
160160
west-commands: scripts/west/west-commands.yml
161161
submodules:
162162
- name: nlio

0 commit comments

Comments
 (0)