Skip to content
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

Rollback with Arduino as ESP-IDF Component #5871

Closed
GKFernandes opened this issue Nov 10, 2021 · 7 comments · Fixed by #6779
Closed

Rollback with Arduino as ESP-IDF Component #5871

GKFernandes opened this issue Nov 10, 2021 · 7 comments · Fixed by #6779
Assignees
Labels
Resolution: Awaiting response Waiting for response of author
Milestone

Comments

@GKFernandes
Copy link

Hello everyone,

I ran into the same issue as stated in: #3318 and also in #3749

I think this issue about the weakly defined verify0ta() should be fixed and made in such a way that the user can perform the verification later in the code instead of inside the initArduino() function.

@VojtechBartoska VojtechBartoska added Status: Awaiting triage Issue is waiting for triage Status: Test needed Issue needs testing labels Nov 12, 2021
@VojtechBartoska VojtechBartoska added this to To-Do (Seeking Contributors) in (Archived) Arduino Core ESP32 RoadMap Nov 16, 2021
@VojtechBartoska VojtechBartoska removed this from To-Do (Seeking Contributors) in (Archived) Arduino Core ESP32 RoadMap Feb 2, 2022
@stale stale bot added the wontfix label Apr 17, 2022
@espressif espressif deleted a comment from stale bot Apr 20, 2022
@me-no-dev me-no-dev self-assigned this May 13, 2022
@me-no-dev
Copy link
Member

How about we add a new weak function bool verifyRollbackLater() to allow you to skip verification in initArduino and do it yourself later?

@me-no-dev me-no-dev added Status: Pending Resolution: Awaiting response Waiting for response of author and removed Status: Test needed Issue needs testing Status: Awaiting triage Issue is waiting for triage labels May 13, 2022
@me-no-dev me-no-dev added this to the 2.0.4 milestone May 13, 2022
@GKFernandes
Copy link
Author

Hello @me-no-dev , I think this could be a solution, but can the function verifyOta() just be removed?

What do you think @atanisoft @marcovannoord?

@marcovannoord
Copy link

Yeah that would be a perfect solution i think, and it would just skip the verifyOTA() function.
In that case, if users want to use the verifyOTA to immediately verify rollback, then they can still use that function if they override the weak function.

@me-no-dev
Copy link
Member

if you overwrite verifyRollbackLater, then verifyOTA will not be called at all. This whole block will not execute: https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-misc.c#L215-L226

@marcovannoord
Copy link

Yeah i think that's the perfect solution. That way, users can add this feature, while keeping legacy things intact.

@me-no-dev
Copy link
Member

Done :)

Jason2866 added a commit to tasmota/arduino-esp32 that referenced this issue May 20, 2022
Fixes: espressif#5871

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
@zekageri
Copy link

zekageri commented Nov 1, 2022

Any example for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Awaiting response Waiting for response of author
Projects
Development

Successfully merging a pull request may close this issue.

5 participants