You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/21 03:01:08 UTC

[GitHub] [incubator-nuttx] liuguo09 opened a new pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

liuguo09 opened a new pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191


   ## Summary
   board/ctrl: add BOARDCTL_SWITCH_BOOT support
   
   Add switch boot system suppport once the Boot A/B system updated or specified.
   Also correct BOARDIOC_USER cmd value.
   
   ## Impact
   
   ## Testing
   Once Boot A/B system updated by OTA, use boardctl to switch boot system.
   


-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#discussion_r673820126



##########
File path: boards/Kconfig
##########
@@ -3389,6 +3389,13 @@ config BOARDCTL_UNIQUEKEY_SIZE
 		Provides the size of the memory buffer that must be provided by the
 		caller of board_uniquekey() in which to receive the board unique KEY.
 
+config BOARDCTL_SWITCH_BOOT
+	bool "Switch Boot A/B System"
+	default n
+	---help---
+		Enables support for the BOARDIOC_SWITCH_BOOT boardctl() command.
+		Switch to the updated or the specified Boot A/B system.
+

Review comment:
       @xiaoxiang781216 The salient points from [comment](https://github.com/apache/incubator-nuttx/pull/4191#issuecomment-883941665) should be added to either the Kconfig.

##########
File path: boards/Kconfig
##########
@@ -3389,6 +3389,13 @@ config BOARDCTL_UNIQUEKEY_SIZE
 		Provides the size of the memory buffer that must be provided by the
 		caller of board_uniquekey() in which to receive the board unique KEY.
 
+config BOARDCTL_SWITCH_BOOT
+	bool "Switch Boot A/B System"
+	default n
+	---help---
+		Enables support for the BOARDIOC_SWITCH_BOOT boardctl() command.
+		Switch to the updated or the specified Boot A/B system.
+

Review comment:
       @xiaoxiang781216 The salient points from [comment](https://github.com/apache/incubator-nuttx/pull/4191#issuecomment-883941665) should be added to the Kconfig.




-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch boot system

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#issuecomment-884742140


   @patacongo do you think this PR general enough to merge now?


-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] liuguo09 commented on a change in pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

Posted by GitBox <gi...@apache.org>.
liuguo09 commented on a change in pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#discussion_r673912361



##########
File path: boards/Kconfig
##########
@@ -3389,6 +3389,13 @@ config BOARDCTL_UNIQUEKEY_SIZE
 		Provides the size of the memory buffer that must be provided by the
 		caller of board_uniquekey() in which to receive the board unique KEY.
 
+config BOARDCTL_SWITCH_BOOT
+	bool "Switch Boot A/B System"
+	default n
+	---help---
+		Enables support for the BOARDIOC_SWITCH_BOOT boardctl() command.
+		Switch to the updated or the specified Boot A/B system.
+

Review comment:
       @davids5 @xiaoxiang781216 I have updated the patch accordingly. Pls help review, thanks.




-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] davids5 commented on a change in pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

Posted by GitBox <gi...@apache.org>.
davids5 commented on a change in pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#discussion_r673817496



##########
File path: boards/Kconfig
##########
@@ -3389,6 +3389,13 @@ config BOARDCTL_UNIQUEKEY_SIZE
 		Provides the size of the memory buffer that must be provided by the
 		caller of board_uniquekey() in which to receive the board unique KEY.
 
+config BOARDCTL_SWITCH_BOOT
+	bool "Switch Boot A/B System"
+	default n
+	---help---
+		Enables support for the BOARDIOC_SWITCH_BOOT boardctl() command.
+		Switch to the updated or the specified Boot A/B system.
+

Review comment:
       This is to vague. Please add more information:
   
   This API can be used to change the system boot behavior.  For instance, once a firmware updated has completed successfully this boardctl can be used modify FLASH bank selection.




-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 edited a comment on pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#issuecomment-883941665


   > Seems rather application-specific.  Have you considered the generic BOARDIOC_IOCTL instead?Sent from my Galaxy
   
   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.


-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] xiaoxiang781216 edited a comment on pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#issuecomment-883941665


   > Seems rather application-specific.  Have you considered the generic BOARDIOC_IOCTL instead?Sent from my Galaxy
   
   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.


-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] patacongo commented on pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch Boot A/B system

Posted by GitBox <gi...@apache.org>.
patacongo commented on pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191#issuecomment-883857910


   Seems rather application-specific.  Have you considered the generic BOARDIOC_IOCTL instead?Sent from my Galaxy
   


-- 
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: commits-unsubscribe@nuttx.apache.org

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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #4191: Add BOARDCTL_SWITCH_BOOT to support switch boot system

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #4191:
URL: https://github.com/apache/incubator-nuttx/pull/4191


   


-- 
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: commits-unsubscribe@nuttx.apache.org

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