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

Copy the existing flash mode over the one set in an OTA update image. #4877

Merged
merged 7 commits into from
Jul 11, 2018

Conversation

teejaydub
Copy link
Contributor

Suggest fix for #4876: tolerate different flash modes in OTA update images and convert them to match what the module is currently using.

Allows the flash mode to be ignored during OTA, so the same binary image can be used for both modules that support QIO and those that require DIO.

Copy link
Collaborator

@d-a-v d-a-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems very good !
(it could be simplified a bit)

@d-a-v d-a-v requested a review from igrr July 2, 2018 21:18
@devyte
Copy link
Collaborator

devyte commented Jul 3, 2018

I'm ok with this.
@igrr any thoughts on this one?

@devyte devyte self-assigned this Jul 4, 2018
@devyte devyte added this to the 2.4.2 milestone Jul 4, 2018
@devyte
Copy link
Collaborator

devyte commented Jul 11, 2018

Merging in the interest of moving forward.

@devyte devyte merged commit 60b21ef into esp8266:master Jul 11, 2018
@teejaydub
Copy link
Contributor Author

Thanks, guys, I appreciate it!

@teejaydub teejaydub deleted the tweak-ota-flash-mode branch July 11, 2018 17:46
@robertpoll
Copy link

Hi. This change has caused some issues for us so just wanted to discuss. We buy modules from AI-Thinker with a simple loader firmware that we've written loaded by them when they manufacture the modules. Once they are assembled into our product the loader firmware gets a certificate, stores in SPIFFS and then does an OTA update to load the real firmware. The problem is that AI-Thinker is insisting that the firmware they load is DOUT, but our final firmware is QIO. Obviously this change means our final firmware runs DOUT.

I think the change is a good one but was wondering whether an override option would be a sensible addition for people in our position (which I would assume would affect quite a few people)?

@teejaydub
Copy link
Contributor Author

Good to know - two clearly valuable use cases that need opposite behavior. So, it could be on a compile-time switch.

Although it seems like the underlying bug might be that AI-Thinker is incorrectly labeling your firmware as DOUT when it's QIO, right? But you still need a stopgap solution for any existing modules in inventory.

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.

4 participants