You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2020/09/26 18:29:05 UTC

[GitHub] [mynewt-mcumgr] nwsetec opened a new pull request #98: Fix image erase command for partial slot-1 erase

nwsetec opened a new pull request #98:
URL: https://github.com/apache/mynewt-mcumgr/pull/98


   This is a fix for devices in the field using mcuboot versions v1.6.0 or less.
   
   If a firmware update is attempted with a corrupt image and a power outage or
   reset occurs while the bootloader* is erasing the corrupt image then the
   secondary (slot-1) can be left in a state where the bootloader has not
   properly released slot-1 and a DFU transfer can no longer happen. Attempts
   to execute the image erase command will fail with 6 (MGMT_ERR_EBADSTATE).
   
   This commit fixes this issue by adding an additional requirement to determine
   if a slot is 'in use': the image must also be valid. If this additional
   requirement is not also met then the slot is considered not in use.
   
   * The issue was originally discovered with Zephyr v1.14 LTS and mcuboot release
   v3.1 and a fix for mcuboot has been applied here:
   https://github.com/JuulLabs-OSS/mcuboot/pull/765
   mcuboot commit: 42335be22bc8fb576845f41e6174f1921fcff5d9
   
   A fix for mcumgr library in Zephyr v1.14 LTS is in progress here:
   https://github.com/zephyrproject-rtos/zephyr/pull/26738
   
   Note that previously this issue also affected the image upload command but
   that has not been fixed in the code restructure in commit
   8914f8755983bf5e08ce30a56e0c0660341978e5
   
   Signed-off-by: Nick Ward <ni...@setec.com.au>


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] utzig commented on pull request #98: Fix image erase command for partial slot-1 erase

Posted by GitBox <gi...@apache.org>.
utzig commented on pull request #98:
URL: https://github.com/apache/mynewt-mcumgr/pull/98#issuecomment-700918949


   > Can you please have a look at this @utzig
   
   Yes, makes sense to check for a valid image before checking slot in use; I will do a little bit of testing and merge if I find no issues.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] nwsetec commented on pull request #98: Fix image erase command for partial slot-1 erase

Posted by GitBox <gi...@apache.org>.
nwsetec commented on pull request #98:
URL: https://github.com/apache/mynewt-mcumgr/pull/98#issuecomment-700874706


   Can you please have a look at this @utzig


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-mcumgr] utzig merged pull request #98: Fix image erase command for partial slot-1 erase

Posted by GitBox <gi...@apache.org>.
utzig merged pull request #98:
URL: https://github.com/apache/mynewt-mcumgr/pull/98


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org