Commit 7b4d2ba
committed
sysbuild: image_signing: set ih_load_addr from slot0 partition
The MCUboot CHECK_HEADER_LOAD_ADDRESS feature
(CONFIG_MCUBOOT_CHECK_HEADER_LOAD_ADDRESS) verifies that an
image in the secondary slot is intended for the primary slot
by comparing the ih_load_addr field in the image header
against the primary slot boundaries. The NCS sysbuild signing
script did not pass --load-addr or --rom-fixed to imgtool for
the OVERWRITE_ONLY and default swap branches, leaving
ih_load_addr at zero in the signed application image. This
caused MCUboot to reject every legitimate application update
because zero falls outside the primary slot's address range.
Updated nrf/cmake/sysbuild/image_signing.cmake to read the
absolute slot0_partition address with dt_partition_addr
ABSOLUTE and pass it as --rom-fixed to imgtool for both the
OVERWRITE_ONLY and default swap branches. The ROM_FIXED flag
follows the pattern already used by the cpunet image signing
in nrf/cmake/sysbuild/b0_mcuboot_signing.cmake.
Added SB_CONFIG_SOC_SERIES_NRF53 to the list of platforms in
nrf/sysbuild/CMakeLists.txt that route through the NCS
sysbuild signing script instead of the upstream
zephyr/cmake/mcuboot.cmake. This makes non-PM nRF53 builds
(such as the Fast Pair Locator Tag sample migrated to DTS)
pick up the ih_load_addr fix. The change mirrors the existing
treatment of SB_CONFIG_SOC_SERIES_NRF54L and
SB_CONFIG_SOC_SERIES_NRF54H.
Verified on the nRF5340 DK Fast Pair Locator Tag sample
(nrf5340dk/nrf5340/cpuapp): the signed application image now
reports ih_load_addr = 0xc000 and flags = ROM_FIXED, matching
the slot0_partition definition in DTS. The cpunet image
signing remains unchanged (ih_load_addr = 0x01002800,
flags = ROM_FIXED).
The equivalent fix is needed in upstream Zephyr
(zephyr/cmake/mcuboot.cmake) for users that do not route
through the NCS sysbuild signing script.
Ref: NCSDK-38010
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>1 parent e795138 commit 7b4d2ba
2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | | - | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
127 | | - | |
| 131 | + | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
475 | 476 | | |
476 | 477 | | |
477 | 478 | | |
| |||
0 commit comments