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

Don't overwrite boot sector unless OTA changes it #7547

Merged
merged 2 commits into from
Sep 2, 2020

Conversation

earlephilhower
Copy link
Collaborator

There is a window where the eboot sector is erased and
unwritten/partially written. If there's a power cycle at this time, the
chip will brick due to eboot being corrupted.

Avoid this by checking if the new eboot 4K sector is identical to the
one already in flash, and if so don't rewrite it.

There is a window where the eboot sector is erased and
unwritten/partially written.  If there's a power cycle at this time, the
chip will brick due to eboot being corrupted.

Avoid this by checking if the new eboot 4K sector is identical to the
one already in flash, and if so don't rewrite it.
@davisonja
Copy link

Are we still looking at merging in the power-cycle-protection? #6538

@devyte
Copy link
Collaborator

devyte commented Sep 1, 2020

Yes, we're merging for v3 these days. We'll get there.

@davisonja
Copy link

davisonja commented Sep 1, 2020 via email

@devyte devyte added this to the 3.0.0 milestone Sep 2, 2020
@earlephilhower
Copy link
Collaborator Author

@davisonja, sorry, I actually thought #6538 was abandoned. If you want to integrate this boot-block check there, I'm happy to axe this PR. It should be orthogonal to your changes, though.

Can you spend a few mins to make #6538 mergeable? It also has some issues w/the branch pulling in old versions of multiple libraries, so it's in kind of a weird state beyond just the code merge issues.

@devyte
Copy link
Collaborator

devyte commented Sep 2, 2020

@davisonja @earlephilhower #6538 needs to be fixed anyways, so I'll merge this now in the interest of moving forward.
About #6538, once it gets updated, the one thing we need is testing to make sure nothing was broken. Also, I'm not clear about forward/backwards compatibility, but let's discuss all that over there after the PR is updated.

@devyte devyte merged commit d02bc02 into esp8266:master Sep 2, 2020
@earlephilhower earlephilhower deleted the noboom branch September 2, 2020 23:15
Jason2866 added a commit to Jason2866/Arduino that referenced this pull request Sep 17, 2020
Jason2866 added a commit to Jason2866/Arduino that referenced this pull request Sep 17, 2020
Jason2866 added a commit to Jason2866/Tasmota that referenced this pull request Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants