xiaoxiang781216 edited a comment on pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#issuecomment-883941665


   > Seems rather application-specific.
   
   Yes, but it isn't too specific. If the board support A/B boot, something 
like BOARDIOC_SWITCH_BOOT is required to commuicate the boot partition from 
userspace(OTA subsystem) to board, so it's a common requirement for A/B boot:
   
   1. Download the new image from the sever
   2. Write the new image to the alternative partition
   3. Call BOARDCTL_SWITCH_BOOT to the alternative system
   
   This is even useful in the single boot partition case, if we want to 
implement the reliable update:
   
   1. Download the new image from the sever
   2. Call BOARDCTL_SWITCH_BOOT and reboot to a small system
   3. Write the new image to the main partition in the small system
   4. Call BOARDCTL_SWITCH_BOOT again to the main system
   
   You can see that it's key point to allow updater switch the boot partition 
in either case.
   
   > Have you considered the generic BOARDIOC_IOCTL instead?Sent from my Galaxy
   
   Your meaning the system argument for board_switch_boot isn't generic?
   ```
   int board_switch_boot(FAR const char *system);
   ```
    It will be good if you have better suggestion.


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