boards: nxp: mimxrt10xx: fix non-optimal sector distribution

- Optimize slot sizes for MCUBoot swap move algorithm
  for mimxrt1010/15/20/24/40/50/60/64 boards.
- Save up to 64 wasted sectors.
- Use DT_SIZE_K/M macros for slot sizes.
- Fix partition size errors.
- Limit mcuboot max size to 128KB (was 256KB).

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
This commit is contained in:
Andrej Butok 2024-05-29 15:26:54 +02:00 committed by Henrik Brix Andersen
commit 03d1eabc32
11 changed files with 102 additions and 98 deletions

View file

@ -202,22 +202,22 @@ arduino_i2c: &lpi2c1 {};
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
boot_partition: partition@0 {
label = "mcuboot";
reg = <0x00000000 DT_SIZE_K(64)>;
reg = <0x00000000 DT_SIZE_K(128)>;
};
/* Note slot 0 has one additional sector,
* this is intended for use with the swap move algorithm
/* The MCUBoot swap-move algorithm uses the last 2 sectors
* of the primary slot0 for swap status and move.
*/
slot0_partition: partition@10000 {
slot0_partition: partition@20000 {
label = "image-0";
reg = <0x00010000 DT_SIZE_K(2016)>;
reg = <0x00020000 (DT_SIZE_K(1980) + DT_SIZE_K(8))>;
};
slot1_partition: partition@208000 {
slot1_partition: partition@211000 {
label = "image-1";
reg = <0x00208000 DT_SIZE_K(2012)>;
reg = <0x00211000 DT_SIZE_K(1980)>;
};
/* The storage partition is located in is25wp064 */
};
};