Skip to content

Commit

Permalink
[nrf toup] partition_manager: add partition alignment
Browse files Browse the repository at this point in the history
All partitions used by mcuboot must be page size aligned.
Leverage newly added alignment feature to enforce this.

Signed-off-by: Håkon Øye Amundsen <[email protected]>
  • Loading branch information
hakonfam authored and nvlsianpu committed Sep 10, 2019
1 parent 57a219e commit d65666f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions boot/zephyr/pm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <autoconf.h>
#include <generated_dts_board_unfixed.h>

mcuboot:
size: CONFIG_PM_PARTITION_SIZE_MCUBOOT
Expand All @@ -16,18 +17,20 @@ mcuboot_primary:
mcuboot_secondary:
share_size: [mcuboot_primary]
placement:
after:
[mcuboot_primary]
align: {start: DT_FLASH_ERASE_BLOCK_SIZE}
after: mcuboot_primary

mcuboot_scratch:
size: CONFIG_PM_PARTITION_SIZE_MCUBOOT_SCRATCH
placement:
after: [app]
after: app
align: {start: DT_FLASH_ERASE_BLOCK_SIZE}

mcuboot_storage:
size: CONFIG_PM_PARTITION_SIZE_MCUBOOT_STORAGE
placement:
after: [mcuboot_scratch]
align: {start: DT_FLASH_ERASE_BLOCK_SIZE}

# Padding placed before image to boot
mcuboot_pad:
Expand All @@ -36,3 +39,4 @@ mcuboot_pad:
size: CONFIG_PM_PARTITION_SIZE_MCUBOOT_PAD
placement:
before: [mcuboot_primary_app]
align: {start: DT_FLASH_ERASE_BLOCK_SIZE}

0 comments on commit d65666f

Please sign in to comment.