daniel-p-carvalho opened a new pull request, #3894:
URL: https://github.com/apache/nuttx-apps/pull/3894

   ## Summary
   
   Update `CONFIG_MCUBOOT_VERSION` to 
`d6267bdb7f60a00f068b750f9efa2b6cb36bf47e`, which includes 
mcu-tools/mcuboot#2908.
   
   The NuttX port of `flash_area_get_sector()` looked the flash device up by 
`fa_off + off`, which only succeeds for `off == 0`. For any other offset it 
returned `-errno` (0) without filling the sector, and MCUboot used 
uninitialized stack values as the erase offset and size. With 
`MCUBOOT_SWAP_USING_MOVE` the loader then erased pages in a loop and left the 
primary slot corrupted, with no error and no reset. The fix looks the device up 
by flash area id and returns an offset relative to the area.
   
   ## Impact
   
   Users of `boot/mcuboot` get the MCUboot revision with the fixed 
`flash_area_get_sector()`. Without it, `MCUBOOT_SWAP_USING_MOVE` does not work 
on the NuttX port. No change to Kconfig symbols or the build process; only the 
default of the version string changes. Users who pin their own 
`MCUBOOT_VERSION` are not affected.
   
   ## Testing
   
   Host: Linux x86_64, `arm-none-eabi-gcc` 15.2.1.
   Target: custom STM32G474RE board (out-of-tree, `CONFIG_ARCH_BOARD_CUSTOM`), 
MCUboot loader with `MCUBOOT_SWAP_USING_MOVE`, 2 x 192 KB slots, based on nuttx 
`7e652be44d` and apps `2d68f38f7`.
   
   Before: the loader erased pages in a loop and the primary slot was corrupted 
(`flash_area_erase: ID:1 offset:134271849 length:536870996` in the MCUboot log).
   
   After, without any local patch:
   - Loader builds (50488 B) and boots the confirmed v1 image.
   - v2 written to the secondary slot: swap completes and v2 runs.
   - Reset without confirming: rollback to v1.
   - v2 again, then `mcuboot_confirm` and reset: v2 stays, no new swap.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to