@@ -193,6 +193,7 @@ function(dfu_app_zip_package)
193
193
# Network core
194
194
get_property (image_name GLOBAL PROPERTY DOMAIN_APP_CPUNET)
195
195
set (net_update_name "${image_name} .bin" )
196
+ set (secondary_net_update_name "${image_name} _secondary_app.bin" )
196
197
sysbuild_get(net_core_board IMAGE ${image_name} VAR BOARD CACHE )
197
198
198
199
if (SB_CONFIG_SECURE_BOOT_NETCORE)
@@ -204,42 +205,76 @@ function(dfu_app_zip_package)
204
205
mcuboot_image_number_to_slot(net_update_slot_primary ${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} n)
205
206
mcuboot_image_number_to_slot(net_update_slot_secondary ${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} y)
206
207
207
- if (SB_CONFIG_PARTITION_MANAGER)
208
- set (net_load_address "$<TARGET_PROPERTY:partition_manager,CPUNET_PM_APP_ADDRESS>" )
209
- else ()
210
- get_address_from_dt_partition_nodelabel("slot${net_update_slot_primary} _partition"
211
- net_load_address
212
- )
213
- endif ()
208
+ if (NOT SB_CONFIG_MCUBOOT_BUILD_DIRECT_XIP_VARIANT)
209
+ if (SB_CONFIG_PARTITION_MANAGER)
210
+ set (net_load_address "$<TARGET_PROPERTY:partition_manager,CPUNET_PM_APP_ADDRESS>" )
211
+ else ()
212
+ get_address_from_dt_partition_nodelabel("slot${net_update_slot_primary} _partition"
213
+ net_load_address
214
+ )
215
+ endif ()
214
216
215
- math (EXPR net_update_slot_primary "${net_update_slot_primary} + 1" )
216
- math (EXPR net_update_slot_secondary "${net_update_slot_secondary} + 1" )
217
+ math (EXPR net_update_slot_primary "${net_update_slot_primary} + 1" )
218
+ math (EXPR net_update_slot_secondary "${net_update_slot_secondary} + 1" )
219
+
220
+ set (generate_script_app_params
221
+ ${generate_script_app_params}
222
+ "${net_update_name} image_index=${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} "
223
+ "${net_update_name} slot_index_primary=${net_update_slot_primary} "
224
+ "${net_update_name} slot_index_secondary=${net_update_slot_secondary} "
225
+ "${net_update_name} load_address=${net_load_address} "
226
+ "${net_update_name} version=${net_update_version} "
227
+ "${net_update_name} board=${net_core_board} "
228
+ "${net_update_name} soc=${SB_CONFIG_SOC} "
229
+ )
230
+
231
+ if (SB_CONFIG_SECURE_BOOT_NETCORE)
232
+ list (APPEND bin_files "${CMAKE_BINARY_DIR} /signed_by_mcuboot_and_b0_${image_name} .bin" )
233
+ list (APPEND signed_targets ${image_name} _signed_packaged_target)
234
+ else ()
235
+ sysbuild_get(net_CONFIG_KERNEL_BIN_NAME IMAGE ${image_name} VAR CONFIG_KERNEL_BIN_NAME KCONFIG)
236
+ if (SB_CONFIG_BOOT_ENCRYPTION)
237
+ list (APPEND bin_files "${CMAKE_BINARY_DIR} /${image_name} /zephyr/${net_CONFIG_KERNEL_BIN_NAME} .signed.encrypted.bin" )
238
+ else ()
239
+ list (APPEND bin_files "${CMAKE_BINARY_DIR} /${image_name} /zephyr/${net_CONFIG_KERNEL_BIN_NAME} .signed.bin" )
240
+ endif ()
241
+ endif ()
242
+
243
+ list (APPEND zip_names "${net_update_name} " )
244
+ list (APPEND signed_targets ${image_name} _extra_byproducts)
245
+ elseif (NOT SB_CONFIG_PARTITION_MANAGER)
246
+ get_address_from_dt_partition_nodelabel("slot${net_update_slot_primary} _partition" primary_net_load_address)
247
+ get_address_from_dt_partition_nodelabel("slot${net_update_slot_secondary} _partition" secondary_net_load_address)
217
248
218
- set (generate_script_app_params
249
+ # Radio in DirectXIP mode
250
+ set (generate_script_app_params
219
251
${generate_script_app_params}
220
- "${net_update_name} image_index=${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} "
221
- "${net_update_name} slot_index_primary=${net_update_slot_primary} "
222
- "${net_update_name} slot_index_secondary=${net_update_slot_secondary} "
223
- "${net_update_name} load_address=${net_load_address} "
224
- "${net_update_name} version=${net_update_version} "
225
- "${net_update_name} board=${net_core_board} "
226
- "${net_update_name} soc=${SB_CONFIG_SOC} "
227
- )
252
+ "${net_update_name} load_address=${primary_net_load_address} "
253
+ "${net_update_name} version_MCUBOOT+XIP=${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} "
254
+ "${net_update_name} image_index=${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} "
255
+ "${net_update_name} slot=${net_update_slot_primary} "
256
+ "${secondary_net_update_name} load_address=${secondary_net_load_address} "
257
+ "${secondary_net_update_name} image_index=${SB_CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER} "
258
+ "${secondary_net_update_name} slot=${net_update_slot_secondary} "
259
+ "${secondary_net_update_name} version_MCUBOOT+XIP=${CONFIG_MCUBOOT_IMGTOOL_SIGN_VERSION} "
260
+ )
261
+ list (APPEND bin_files
262
+ "${CMAKE_BINARY_DIR} /${image_name} /zephyr/${CONFIG_KERNEL_BIN_NAME} .signed.bin"
263
+ "${CMAKE_BINARY_DIR} /${image_name} _secondary_app/zephyr/${CONFIG_KERNEL_BIN_NAME} .signed.bin"
264
+ )
265
+ set (exclude_files EXCLUDE
266
+ ${CMAKE_BINARY_DIR} /${image_name} /zephyr/${CONFIG_KERNEL_BIN_NAME} .signed.bin
267
+ ${CMAKE_BINARY_DIR} /${image_name} _secondary_app/zephyr/${CONFIG_KERNEL_BIN_NAME} .signed.bin
268
+ )
269
+ set (include_files INCLUDE
270
+ ${CMAKE_BINARY_DIR} /${image_name} /zephyr/${CONFIG_KERNEL_BIN_NAME} .bin
271
+ ${CMAKE_BINARY_DIR} /${image_name} _secondary_app/zephyr/${CONFIG_KERNEL_BIN_NAME} .bin
272
+ )
228
273
229
- if (SB_CONFIG_SECURE_BOOT_NETCORE)
230
- list (APPEND bin_files "${CMAKE_BINARY_DIR} /signed_by_mcuboot_and_b0_${image_name} .bin" )
231
- list (APPEND signed_targets ${image_name} _signed_packaged_target)
232
- else ()
233
- sysbuild_get(net_CONFIG_KERNEL_BIN_NAME IMAGE ${image_name} VAR CONFIG_KERNEL_BIN_NAME KCONFIG)
234
- if (SB_CONFIG_BOOT_ENCRYPTION)
235
- list (APPEND bin_files "${CMAKE_BINARY_DIR} /${image_name} /zephyr/${net_CONFIG_KERNEL_BIN_NAME} .signed.encrypted.bin" )
236
- else ()
237
- list (APPEND bin_files "${CMAKE_BINARY_DIR} /${image_name} /zephyr/${net_CONFIG_KERNEL_BIN_NAME} .signed.bin" )
238
- endif ()
274
+ list (APPEND zip_names "${net_update_name} ;${secondary_net_update_name} " )
275
+ list (APPEND signed_targets ${image_name} _extra_byproducts)
276
+ list (APPEND signed_targets ${image_name} _secondary_app_extra_byproducts)
239
277
endif ()
240
-
241
- list (APPEND zip_names "${net_update_name} " )
242
- list (APPEND signed_targets ${image_name} _extra_byproducts)
243
278
endif ()
244
279
245
280
if (SB_CONFIG_DFU_ZIP_WIFI_FW_PATCH)
0 commit comments