-
Notifications
You must be signed in to change notification settings - Fork 1.4k
single_slot: Remove default overlay #26153
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
base: main
Are you sure you want to change the base?
single_slot: Remove default overlay #26153
Conversation
The default overlay for FW loader sets code-partition to slot1_partition, which stays with direct conflict with the merged slot approach: - slot1_partition must point to the merged partition to allow SMP logic to parse the FW loader magic & version - if FW loader indeed uses slot1_partition with ROM_START_OFFSET, than it is impossible to correctly boot the radio core FW, since it cannot use the same value of the ROM_START_OFFSET (2kB NVM waste) and there is no way to tell the FW loader code in soc.c to boot the radio with a different value of ROM_START_OFFSET. - the size of the code-partition must be different from the size of the partition parsed by the SMP, so there is a protection against potential code partition overflow and the flash area API can reach past the code partition area. One solution would be to change the contents of the FIRMWARE_LOADER_image_default.overlay, but since it would force every user of the FW loader within Zephyr to add a new partition alias, it is far less intrusive to remove this overlay from sysbuild.cmake script in those samples, that use merged slot approach. Ref: NCSDK-36779 Signed-off-by: Tomasz Chyrowicz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses conflicts between the default firmware loader overlay and the merged slot approach used in the single_slot DFU sample. The main issue is that the default overlay sets code-partition to slot1_partition, which conflicts with the merged slot approach where slot1_partition must point to the merged partition for SMP logic to work correctly.
Key Changes:
- Removes the default overlay for firmware loader images when using merged binary signing
- Updates overlay files to directly set
zephyr,code-partitioninstead of manipulatingslot1_partition
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| samples/dfu/single_slot/sysbuild.cmake | Adds logic to remove default overlay when SB_CONFIG_MCUBOOT_SIGN_MERGED_BINARY is enabled |
| samples/dfu/single_slot/sysbuild/fw_loader_ipc_radio.overlay | Replaces node deletion/redefinition with direct zephyr,code-partition assignment |
| samples/dfu/single_slot/sysbuild/ble_mcumgr/boards/nrf54h20dk_nrf54h20_cpuapp.overlay | Replaces node deletion/redefinition with direct zephyr,code-partition assignment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| FirmwareUpdaterImage_Get(fw_loader_images) | ||
| foreach(image IN LISTS fw_loader_images) | ||
| # Remove the default overlay file. | ||
| set(${image}_EXTRA_DTC_OVERLAY_FILE "" CACHE INTERNAL "Application extra DTC overlay file" |
Copilot
AI
Dec 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment 'Application extra DTC overlay file' should be 'Image extra DTC overlay file' since this is setting the overlay for firmware loader images, not the application.
| set(${image}_EXTRA_DTC_OVERLAY_FILE "" CACHE INTERNAL "Application extra DTC overlay file" | |
| set(${image}_EXTRA_DTC_OVERLAY_FILE "" CACHE INTERNAL "Image extra DTC overlay file" |
d17065a to
5ddb364
Compare
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 5ddb3640f5addef216034ef67e4fb876429a5edd more detailssdk-nrf:
Github labels
List of changed files detected by CI (3)Outputs:ToolchainVersion: 43683a87ea Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
The default overlay for FW loader sets code-partition to slot1_partition, which stays with direct conflict with the merged slot approach:
One solution would be to change the contents of the FIRMWARE_LOADER_image_default.overlay, but since it would force every user of the FW loader within Zephyr to add a new partition alias, it is far less intrusive to remove this overlay from sysbuild.cmake script in those samples, that use merged slot approach.
Ref: NCSDK-36779