From 4182d31b1e8b02b4a8056d5b73fadaee8869deca Mon Sep 17 00:00:00 2001 From: Sigurd Hellesvik Date: Thu, 31 Oct 2024 13:28:44 +0100 Subject: [PATCH] partition_manager: Make tfm storage partions avoid partitioning conflict With the previous method, both tfm_storage partitions (its, ps, etc) were placed "before: mcuboot_primary". This could lead to a case where mcuboot was placed after the tfm_storage partitions. To avoid this, instead place "after" mcuboot or tfm_secure. Jira: NCSDK-30094 Signed-off-by: Sigurd Hellesvik --- subsys/partition_manager/pm.yml.tfm | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/subsys/partition_manager/pm.yml.tfm b/subsys/partition_manager/pm.yml.tfm index 16da64d82872..babbdc542c00 100644 --- a/subsys/partition_manager/pm.yml.tfm +++ b/subsys/partition_manager/pm.yml.tfm @@ -30,31 +30,19 @@ tfm_storage: tfm_ps: placement: -#ifdef CONFIG_BOOTLOADER_MCUBOOT - before: mcuboot_primary -#else - before: tfm_nonsecure -#endif + after: [mcuboot, tfm_secure] inside: tfm_storage size: CONFIG_PM_PARTITION_SIZE_TFM_PROTECTED_STORAGE tfm_its: placement: -#ifdef CONFIG_BOOTLOADER_MCUBOOT - before: mcuboot_primary -#else - before: tfm_nonsecure -#endif + after: [mcuboot, tfm_secure] inside: tfm_storage size: CONFIG_PM_PARTITION_SIZE_TFM_INTERNAL_TRUSTED_STORAGE tfm_otp_nv_counters: placement: -#ifdef CONFIG_BOOTLOADER_MCUBOOT - before: mcuboot_primary -#else - before: tfm_nonsecure -#endif + after: [mcuboot, tfm_secure] inside: tfm_storage size: CONFIG_PM_PARTITION_SIZE_TFM_OTP_NV_COUNTERS