From d65666f6608222e27c724bbbf934877101bde43b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20=C3=98ye=20Amundsen?= Date: Mon, 2 Sep 2019 19:41:59 +0000 Subject: [PATCH] [nrf toup] partition_manager: add partition alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- boot/zephyr/pm.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/boot/zephyr/pm.yml b/boot/zephyr/pm.yml index 8788652bf..f5a112a50 100644 --- a/boot/zephyr/pm.yml +++ b/boot/zephyr/pm.yml @@ -1,4 +1,5 @@ #include +#include mcuboot: size: CONFIG_PM_PARTITION_SIZE_MCUBOOT @@ -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: @@ -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}