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 2021/02/18 12:26:48 UTC

[GitHub] [mynewt-mcumgr] de-nordic opened a new pull request #114: img_mgmt: Use IMG_MGMT_BOOT_CURR_SLOT as current running slot ID

de-nordic opened a new pull request #114:
URL: https://github.com/apache/mynewt-mcumgr/pull/114


   The commit changes function img_mgmt_state_flasg functions to use
   IMG_MGMT_BOOT_CURR_SLOT in comparisons as a currently running slot
   number instead of previously hard-coded 0.
   The change allows to correctly identify active partition when
   application is running from different slot than 0.
   
   Signed-off-by: Dominik Ermel <do...@nordicsemi.no>


----------------------------------------------------------------
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] de-nordic commented on pull request #114: img_mgmt: Use IMG_MGMT_BOOT_CURR_SLOT as current running slot ID

Posted by GitBox <gi...@apache.org>.
de-nordic commented on pull request #114:
URL: https://github.com/apache/mynewt-mcumgr/pull/114#issuecomment-781913103


   > 
   > 
   > Lines 39, 96, 303 and 315 also reference slot 0. I think one of the reasons being it is always the current slot. Maybe that needs to change as well ? Also, if current running slot is slot 0, why doesn’t slot 1 have a macro of its own.
   
   OK, so I have missed the 303 and 315, I will fix them
   The lines 39 and 96 are ok as they are.
   The macro is not for naming the slot, but used as variable/constant holding current slot.
   The mynewt code sets it to variable `boot_current_slot` in img_mgmt_config.h; and Zephyr sets it to literal 0.
   The example of previous usage of this is in funciton `img_mgmt_my_version` which calls  img_mgmt_read_info with this macro to get version for current slot.
   
   Zephyr has been always hard-coding it, at compilation, to 0; now it is possible to start Zephyr app from other slot then 0, which means that the `IMG_MGMT_BOOT_CURR_SLOT ` needs to get updated, problem is that all comparisons would still hard-code slot number 0 as the "current slot", which means that Zephyr application running from slot 1 would report application at slot 0 as active.
   The issue of generating proper `IMG_MGMT_BOOT_CURR_SLOT` for Zephyr, at compile time, is addressed here:
   https://github.com/apache/mynewt-mcumgr/pull/115


----------------------------------------------------------------
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] de-nordic commented on pull request #114: img_mgmt: Use IMG_MGMT_BOOT_CURR_SLOT as current running slot ID

Posted by GitBox <gi...@apache.org>.
de-nordic commented on pull request #114:
URL: https://github.com/apache/mynewt-mcumgr/pull/114#issuecomment-784908915


   @utzig Can you look at this and merge it?


----------------------------------------------------------------
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 #114: img_mgmt: Use IMG_MGMT_BOOT_CURR_SLOT as current running slot ID

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


   


----------------------------------------------------------------
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] de-nordic commented on pull request #114: img_mgmt: Use IMG_MGMT_BOOT_CURR_SLOT as current running slot ID

Posted by GitBox <gi...@apache.org>.
de-nordic commented on pull request #114:
URL: https://github.com/apache/mynewt-mcumgr/pull/114#issuecomment-781355406


   @mlaz , @nvlsianpu , @utzig Can you take a look?


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