From 3c808831e23dee3f31c5bb17c6fcdd04dabad0c2 Mon Sep 17 00:00:00 2001 From: Nordic Builder Date: Tue, 8 Apr 2025 09:18:20 +0000 Subject: [PATCH 1/4] manifest: Update sdk-zephyr revision (auto-manifest PR) Automatically created by Github Action Signed-off-by: Nordic Builder --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index 7fa9a612ac84..a8fc4ffc2afd 100644 --- a/west.yml +++ b/west.yml @@ -65,7 +65,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: 7af92582ecab16df529fbb4d77aad92ccf105352 + revision: 8dbca43a6a9d332c62457789780c569e907aa7f7 import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above From ff9a2d0c3e3b9ebc2ee37069dc880a11c96e3c8c Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 10 Apr 2025 08:23:26 +0100 Subject: [PATCH 2/4] Revert "samples: lwm2m_client: Add missing kconfig to overlay" This reverts commit 477c4134653619915ef5f4dc0ae9ac51cd469f3d. Signed-off-by: Jamie McCrae --- samples/cellular/lwm2m_client/overlay-mcumgr_client.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/samples/cellular/lwm2m_client/overlay-mcumgr_client.conf b/samples/cellular/lwm2m_client/overlay-mcumgr_client.conf index e9d9d2d92078..8b64ecf172ab 100644 --- a/samples/cellular/lwm2m_client/overlay-mcumgr_client.conf +++ b/samples/cellular/lwm2m_client/overlay-mcumgr_client.conf @@ -24,6 +24,3 @@ CONFIG_UART_MCUMGR_RX_BUF_COUNT=4 CONFIG_LWM2M_RW_SENML_CBOR_RECORDS=55 # Extend System Workqueue stack size CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2304 - -# Enable MCUboot hooks -CONFIG_BOOT_IMAGE_ACCESS_HOOKS=y From f5f73815f959af697f1cbf2480aae288b65aa0e8 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 10 Apr 2025 10:48:24 +0100 Subject: [PATCH 3/4] samples: cellular: lwm2m_client: Only include FOTA file if enabled Only includes a file needed for FOTA if the actual feature is enabled, otherwise don't Signed-off-by: Jamie McCrae --- samples/cellular/lwm2m_client/src/main.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/samples/cellular/lwm2m_client/src/main.c b/samples/cellular/lwm2m_client/src/main.c index fe1c00010187..da7d8630496f 100644 --- a/samples/cellular/lwm2m_client/src/main.c +++ b/samples/cellular/lwm2m_client/src/main.c @@ -29,7 +29,10 @@ LOG_MODULE_REGISTER(app_lwm2m_client, CONFIG_APP_LOG_LEVEL); #include #include + +#if defined(CONFIG_APP_SMP_CLIENT_FOTA_EXTERNAL) #include "fota_app_external.h" +#endif #if defined(CONFIG_LWM2M_CLIENT_UTILS_LOCATION_ASSISTANCE) #include "ui_input.h" @@ -571,13 +574,13 @@ int main(void) return 0; } - if (IS_ENABLED(CONFIG_APP_SMP_CLIENT_FOTA_EXTERNAL)) { - ret = fota_external_init(); - if (ret < 0) { - LOG_ERR("Unable to init Fota external client (%d)", ret); - return 0; - } +#if defined(CONFIG_APP_SMP_CLIENT_FOTA_EXTERNAL) + ret = fota_external_init(); + if (ret < 0) { + LOG_ERR("Unable to init Fota external client (%d)", ret); + return 0; } +#endif ret = app_event_manager_init(); if (ret) { From 4c432889333e5d0b0226a1288a8b752e169e56fe Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 10 Apr 2025 08:23:48 +0100 Subject: [PATCH 4/4] samples: Fix abuse of not including bootutil library Fixes abuse of code where it wrongly assumed a library would just be available due to wrong code added to another repo that did always wrongly include a library when it should not have done Signed-off-by: Jamie McCrae --- .../lwm2m_client/src/fota_external/CMakeLists.txt | 9 +++++---- subsys/dfu/dfu_target/CMakeLists.txt | 10 ++++++++-- subsys/net/lib/fota_download/CMakeLists.txt | 4 ++++ subsys/net/lib/mcumgr_smp_client/CMakeLists.txt | 3 ++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/samples/cellular/lwm2m_client/src/fota_external/CMakeLists.txt b/samples/cellular/lwm2m_client/src/fota_external/CMakeLists.txt index 81956b3d1a63..0e0a4f56e306 100644 --- a/samples/cellular/lwm2m_client/src/fota_external/CMakeLists.txt +++ b/samples/cellular/lwm2m_client/src/fota_external/CMakeLists.txt @@ -4,7 +4,8 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -zephyr_include_directories(include) - -target_sources_ifdef(CONFIG_APP_SMP_CLIENT_FOTA_EXTERNAL - app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/client.c) +if(CONFIG_APP_SMP_CLIENT_FOTA_EXTERNAL) + zephyr_sources(${CMAKE_CURRENT_SOURCE_DIR}/client.c) + zephyr_include_directories(include) + zephyr_library_link_libraries(MCUBOOT_BOOTUTIL) +endif() diff --git a/subsys/dfu/dfu_target/CMakeLists.txt b/subsys/dfu/dfu_target/CMakeLists.txt index 588f4470fa1f..0e32ba3cc79f 100644 --- a/subsys/dfu/dfu_target/CMakeLists.txt +++ b/subsys/dfu/dfu_target/CMakeLists.txt @@ -27,12 +27,18 @@ zephyr_library_sources_ifdef(CONFIG_DFU_TARGET_SMP src/dfu_target_smp.c ) zephyr_library_sources(src/dfu_stream_flatten.c) -if (CONFIG_DFU_TARGET_SUIT) + +if(CONFIG_DFU_TARGET_SMP OR CONFIG_DFU_TARGET_MCUBOOT) + zephyr_library_link_libraries(MCUBOOT_BOOTUTIL) +endif() + +if(CONFIG_DFU_TARGET_SUIT) zephyr_library_sources(src/dfu_target_suit.c) zephyr_library_link_libraries(suit_memory_layout_interface) zephyr_library_link_libraries(suit_envelope_info) zephyr_library_link_libraries_ifdef(CONFIG_SUIT_CACHE_RW suit_cache_interface) - if (CONFIG_SSF_SUIT_SERVICE_ENABLED) + + if(CONFIG_SSF_SUIT_SERVICE_ENABLED) zephyr_library_link_libraries(suit_utils) endif() endif() diff --git a/subsys/net/lib/fota_download/CMakeLists.txt b/subsys/net/lib/fota_download/CMakeLists.txt index eec5e8374d07..51930237a730 100644 --- a/subsys/net/lib/fota_download/CMakeLists.txt +++ b/subsys/net/lib/fota_download/CMakeLists.txt @@ -30,3 +30,7 @@ zephyr_include_directories_ifdef(CONFIG_SECURE_BOOT ${ZEPHYR_NRF_MODULE_DIR}/subsys/dfu/include) zephyr_include_directories_ifdef(CONFIG_DOWNLOADER ${ZEPHYR_NRF_MODULE_DIR}/subsys/net/lib/downloader/include) + +if(CONFIG_MCUBOOT_IMG_MANAGER) + zephyr_library_link_libraries(MCUBOOT_BOOTUTIL) +endif() diff --git a/subsys/net/lib/mcumgr_smp_client/CMakeLists.txt b/subsys/net/lib/mcumgr_smp_client/CMakeLists.txt index 84d14834eade..3e8c8bb9b2e5 100644 --- a/subsys/net/lib/mcumgr_smp_client/CMakeLists.txt +++ b/subsys/net/lib/mcumgr_smp_client/CMakeLists.txt @@ -12,4 +12,5 @@ zephyr_library_sources_ifdef(CONFIG_NRF_MCUMGR_SMP_CLIENT_SHELL src/mcumgr_smp_client_shell.c ) -zephyr_include_directories(./include) +zephyr_library_link_libraries(MCUBOOT_BOOTUTIL) +zephyr_include_directories(include)