Skip to content

Unable to make full use of app rollback feature #6936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
nomis opened this issue Jul 3, 2022 · 1 comment · Fixed by espressif/esp32-arduino-lib-builder#73
Closed
1 task done

Unable to make full use of app rollback feature #6936

nomis opened this issue Jul 3, 2022 · 1 comment · Fixed by espressif/esp32-arduino-lib-builder#73
Labels
Status: Awaiting triage Issue is waiting for triage

Comments

@nomis
Copy link

nomis commented Jul 3, 2022

Board

ESP32-S2

Device Description

N/A

Hardware Configuration

No

Version

v2.0.3

IDE Name

PlatformIO

Operating System

Linux

Flash frequency

N/A

PSRAM enabled

yes

Upload speed

N/A

Description

I'd like to be able to use https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/ota.html#app-rollback and mark the new image as valid/invalid.

There are two barriers to doing this:

  • It is not enabled in the sdkconfig.
  • When it is enabled, the code at the start of initArduino() insists on marking the image as valid/invalid immediately on boot. This is far too early to decide that the image is valid.

If the application crashes in setup() then the image will already have been marked as valid and a reboot loop will occur.

To fix this:

  • CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE needs to be enabled in the sdkconfig.
  • It needs to be possible to disable the code for this in initArduino() or add a return value to initArduino() that avoids making a valid/invalid decision at that time.

Sketch

N/A

Debug Message

N/A

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@nomis nomis added the Status: Awaiting triage Issue is waiting for triage label Jul 3, 2022
nomis added a commit to nomis/esp32-arduino-lib-builder that referenced this issue Jul 3, 2022
@nomis
Copy link
Author

nomis commented Jul 3, 2022

The unreleased PR #6779 partially fixes this by making it possible to defer marking the partition as valid/invalid until later.

PR #73 will enable app rollback in the configuration.

me-no-dev pushed a commit to espressif/esp32-arduino-lib-builder that referenced this issue Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting triage Issue is waiting for triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant