File tree Expand file tree Collapse file tree 4 files changed +19
-19
lines changed Expand file tree Collapse file tree 4 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,11 @@ add_subdirectory_ifdef(CONFIG_SMP_CLIENT smp_client)
17
17
18
18
zephyr_library_link_libraries (mgmt_mcumgr )
19
19
20
- if (CONFIG_BOOT_IMAGE_ACCESS_HOOKS )
21
- zephyr_include_directories (
22
- ${ZEPHYR_MCUBOOT_MODULE_DIR} /boot/bootutil/include
23
- ${ZEPHYR_MCUBOOT_MODULE_DIR} /boot/zephyr/include
24
- )
25
- zephyr_library_sources (bootutil_hooks/nrf53_hooks.c )
20
+ if (CONFIG_MCUMGR_GRP_IMG_NRF5340_BOOTUTIL_HOOK )
21
+ zephyr_include_directories (
22
+ ${ZEPHYR_MCUBOOT_MODULE_DIR} /boot/bootutil/include
23
+ ${ZEPHYR_MCUBOOT_MODULE_DIR} /boot/zephyr/include
24
+ )
25
+
26
+ zephyr_library_sources (bootutil_hooks/nrf53_hooks.c )
26
27
endif ()
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ menuconfig MCUMGR
6
6
bool "mcumgr Support"
7
7
depends on NET_BUF
8
8
depends on ZCBOR
9
- imply BOOT_IMAGE_ACCESS_HOOKS if (SOC_NRF5340_CPUAPP_QKAA && MCUMGR_GRP_IMG)
9
+ imply BOOT_IMAGE_ACCESS_HOOKS if SOC_NRF5340_CPUAPP && MCUMGR_GRP_IMG && MCUBOOT_NETWORK_CORE_IMAGE_NUMBER > -1
10
10
help
11
11
This option enables the mcumgr management library.
12
12
Original file line number Diff line number Diff line change 8
8
#include <zephyr/device.h>
9
9
#include "bootutil/bootutil_public.h"
10
10
11
- #if CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER != -1
12
- /* Sysbuild */
13
- #define NET_CORE_IMAGE CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER
14
- #else
15
- /* Legacy child/parent */
16
- #define NET_CORE_IMAGE 1
17
- #endif
18
-
19
- int boot_read_swap_state_primary_slot_hook (int image_index ,
20
- struct boot_swap_state * state )
11
+ int boot_read_swap_state_primary_slot_hook (int image_index , struct boot_swap_state * state )
21
12
{
22
- if (image_index == NET_CORE_IMAGE ) {
23
- /* Pretend that primary slot of image 1 unpopulated */
13
+ if (image_index == CONFIG_MCUBOOT_NETWORK_CORE_IMAGE_NUMBER ) {
14
+ /* Pretend that primary slot of the network core update image is unpopulated */
24
15
state -> magic = BOOT_MAGIC_UNSET ;
25
16
state -> swap_type = BOOT_SWAP_TYPE_NONE ;
26
17
state -> image_num = image_index ;
Original file line number Diff line number Diff line change @@ -227,6 +227,14 @@ config MCUMGR_GRP_IMG_QSPI_XIP_SPLIT_IMAGE
227
227
sysbuild if needed. This enables selecting the correct slot when running a QSPI XIP
228
228
split image application in DirectXIP mode.
229
229
230
+ config MCUMGR_GRP_IMG_NRF5340_BOOTUTIL_HOOK
231
+ bool "nRF5340 network core bootutil hook"
232
+ depends on SOC_NRF5340_CPUAPP && BOOT_IMAGE_ACCESS_HOOKS && MCUBOOT_NETWORK_CORE_IMAGE_NUMBER > -1
233
+ default y
234
+ help
235
+ This option will enable a bootutil hook that populates the network core update image
236
+ slot with dummy data to allow for uploading a firmware update to the network core.
237
+
230
238
module = MCUMGR_GRP_IMG
231
239
module-str = mcumgr_grp_img
232
240
source "subsys/logging/Kconfig.template.log_config"
You can’t perform that action at this time.
0 commit comments