Skip to content

Commit

Permalink
[nrf noup] partition_manager: add app_variant partition
Browse files Browse the repository at this point in the history
This partition is used when DIRECT_XIP is in use. It will hold
the variant app build.

Ref: NCSDK-6211

Signed-off-by: Håkon Øye Amundsen <[email protected]>
  • Loading branch information
hakonfam authored and nvlsianpu committed May 12, 2022
1 parent 8e98f3a commit e7db825
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions boot/zephyr/pm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mcuboot_primary:

# Partition for secondary slot is not created if building in single application
# slot configuration.
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT)
#if !defined(CONFIG_SINGLE_APPLICATION_SLOT) && !defined(CONFIG_BOOT_DIRECT_XIP)
mcuboot_secondary:
share_size: [mcuboot_primary]
#if defined(CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY)
Expand All @@ -28,7 +28,30 @@ mcuboot_secondary:
align_next: CONFIG_FPROTECT_BLOCK_SIZE # Ensure that the next partition does not interfere with this image
after: mcuboot_primary
#endif /* CONFIG_PM_EXTERNAL_FLASH_MCUBOOT_SECONDARY */
#endif /* !defined(CONFIG_SINGLE_APPLICATION_SLOT) */

#endif /* !defined(CONFIG_SINGLE_APPLICATION_SLOT) && !defined(CONFIG_BOOT_DIRECT_XIP) */

#if CONFIG_BOOT_DIRECT_XIP

# Direct XIP is enabled, reserve area for metadata (padding) and name the
# partition so that its clear that it is not the secondary slot, but the direct
# XIP alternative.

mcuboot_secondary_pad:
share_size: mcuboot_pad
placement:
after: mcuboot_primary
align: {start: CONFIG_FPROTECT_BLOCK_SIZE}

mcuboot_secondary_app:
share_size: mcuboot_primary_app
placement:
after: mcuboot_secondary_pad

mcuboot_secondary:
span: [mcuboot_secondary_pad, mcuboot_secondary_app]

#endif /* CONFIG_BOOT_DIRECT_XIP */

#if CONFIG_BOOT_SWAP_USING_SCRATCH
mcuboot_scratch:
Expand Down

0 comments on commit e7db825

Please sign in to comment.