-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
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.
Are we still looking at merging in the power-cycle-protection? #6538 |
Yes, we're merging for v3 these days. We'll get there. |
It's a two pronged query (though I hadn't realised it had an assigned
milestone).
Partly as this was one of the changes. that had been discussed to go into
#6538, and partly because I'm keen to get that PR merged, but it's going to
involve a bunch of changes from where it stands as the changes the PR
included when submitted now conflict with a small collection of more recent
changes (such as this PR would likely make).
Which probably boils down to looking for clarity on the order of things to
avoid having too many conflicts to resolve before #6538 can actually be
merged cleanly at all.
…On Wed, Sep 2, 2020 at 1:21 AM Develo ***@***.***> wrote:
Yes, we're merging for v3 these days. We'll get there.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7547 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABX6A2INQR6GRFBNYADC4TSDTYL5ANCNFSM4QJAM4PQ>
.
|
@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. |
@davisonja @earlephilhower #6538 needs to be fixed anyways, so I'll merge this now in the interest of moving forward. |
core 2.7.4.2 includes some backports from arduino / master esp8266/Arduino#7547 esp8266/Arduino#7586 esp8266/Arduino#7585 esp8266/Arduino#7595
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.