Skip to content

esp32: Add bootloader rollback support for all boards. - #12475

Merged
dpgeorge merged 1 commit into
micropython:masterfrom
glenn20:feature-enable-rollback
Sep 29, 2023
Merged

dpgeorge merged 1 commit into
micropython:masterfrom
glenn20:feature-enable-rollback

Conversation

@glenn20

@glenn20 glenn20 commented Sep 18, 2023

Copy link
Copy Markdown
Contributor

This PR adds support for OTA rollback to the bootloader for all ESP32 builds:

  • Add CONFIG_BOOTLOADER_ROLLBACK_ENABLE=y to ports/esp32/boards/sdkconfig.base so that all micropython esp32 images support OTA rollback in the bootloader.

With this change:

There appears to be no detrimental impact arising rom enabling this feature in all ESP32 builds (see Espressif's App Rollback documentation).

This can also eliminate the need to build OTA variants of all esp32 boards for distribution if desired.

@dpgeorge

Copy link
Copy Markdown
Member

Shouldn't this be CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y? (note the "APP" bit in the config name). How did you test this change?

If so, then would be good to remove this same config option from the three existing locations in board config files.

@glenn20

glenn20 commented Sep 29, 2023

Copy link
Copy Markdown
Contributor Author

Thanks for picking that up Damien. I must have merged the wrong commit from my dev branch. I'll fix, remove from the other OTA sdkconfig files, re-test with the right commits this time and push.

@glenn20
glenn20 force-pushed the feature-enable-rollback branch 2 times, most recently from d552a66 to b885741 Compare September 29, 2023 05:32
@glenn20

glenn20 commented Sep 29, 2023

Copy link
Copy Markdown
Contributor Author

Done. Let me know if there are any other issues. It's working for my tests....

Add "CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y" to
ports/esp32/boards/sdkconfig.base so that all micropython esp32 images
support OTA rollback in the bootloader.  These images can then be converted
to OTA-capable images as required by user tools.

Also remove CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y from board-specific
sdkconfig files as this is now the default.

Signed-off-by: Glenn Moloney <[email protected]>
@dpgeorge
dpgeorge force-pushed the feature-enable-rollback branch from b885741 to 6662d84 Compare September 29, 2023 06:02
@dpgeorge
dpgeorge merged commit 6662d84 into micropython:master Sep 29, 2023
@dpgeorge

Copy link
Copy Markdown
Member

Thanks for updating. Now merged.

@glenn20
glenn20 deleted the feature-enable-rollback branch September 29, 2023 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants