|
12 | 12 | #include "target.h" |
13 | 13 |
|
14 | 14 | #include <flash_map_backend/flash_map_backend.h> |
| 15 | +#include <zephyr/devicetree/partitions.h> |
15 | 16 | #include <sysflash/sysflash.h> |
16 | 17 |
|
17 | 18 | #include "bootutil/boot_hooks.h" |
@@ -136,26 +137,26 @@ int flash_area_id_from_direct_image(int image_id) |
136 | 137 | switch (image_id) { |
137 | 138 | case 0: |
138 | 139 | case 1: |
139 | | - return FIXED_PARTITION_ID(slot0_partition); |
140 | | -#if FIXED_PARTITION_EXISTS(slot1_partition) |
| 140 | + return PARTITION_ID(slot0_partition); |
| 141 | +#if PARTITION_EXISTS(slot1_partition) |
141 | 142 | case 2: |
142 | | - return FIXED_PARTITION_ID(slot1_partition); |
| 143 | + return PARTITION_ID(slot1_partition); |
143 | 144 | #endif |
144 | | -#if FIXED_PARTITION_EXISTS(slot2_partition) |
| 145 | +#if PARTITION_EXISTS(slot2_partition) |
145 | 146 | case 3: |
146 | | - return FIXED_PARTITION_ID(slot2_partition); |
| 147 | + return PARTITION_ID(slot2_partition); |
147 | 148 | #endif |
148 | | -#if FIXED_PARTITION_EXISTS(slot3_partition) |
| 149 | +#if PARTITION_EXISTS(slot3_partition) |
149 | 150 | case 4: |
150 | | - return FIXED_PARTITION_ID(slot3_partition); |
| 151 | + return PARTITION_ID(slot3_partition); |
151 | 152 | #endif |
152 | | -#if FIXED_PARTITION_EXISTS(slot4_partition) |
| 153 | +#if PARTITION_EXISTS(slot4_partition) |
153 | 154 | case 5: |
154 | | - return FIXED_PARTITION_ID(slot4_partition); |
| 155 | + return PARTITION_ID(slot4_partition); |
155 | 156 | #endif |
156 | | -#if FIXED_PARTITION_EXISTS(slot5_partition) |
| 157 | +#if PARTITION_EXISTS(slot5_partition) |
157 | 158 | case 6: |
158 | | - return FIXED_PARTITION_ID(slot5_partition); |
| 159 | + return PARTITION_ID(slot5_partition); |
159 | 160 | #endif |
160 | 161 | } |
161 | 162 | return -EINVAL; |
|
0 commit comments