Skip to content

Commit 29d4747

Browse files
cmake: mcuboot: respect alignment size when signing for ramload mode
When signing for ramload mode, respect the write alignment size setting. This is required when creating a confirmed image, as the BOOT_MAGIC value changes based on the alignment size in use. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 28790dc commit 29d4747

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/mcuboot.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ function(zephyr_mcuboot_tasks)
130130
dt_nodelabel(slot1_partition NODELABEL "slot1_partition" REQUIRED)
131131
dt_reg_addr(slot1_partition_address PATH ${slot1_partition})
132132

133-
set(imgtool_args --align 1 --load-addr ${chosen_ram_address} ${imgtool_args})
133+
dt_prop(write_block_size PATH "${flash_node}" PROPERTY "write-block-size")
134+
set(imgtool_args --align ${write_block_size} --load-addr ${chosen_ram_address} ${imgtool_args})
134135
set(imgtool_args_alt_slot ${imgtool_args} --hex-addr ${slot1_partition_address})
135136
set(imgtool_args ${imgtool_args} --hex-addr ${slot0_partition_address})
136137
elseif(CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP_RAM_LOAD)

0 commit comments

Comments
 (0)