Skip to content

What is the correct way to update esp_init_data_default.bin OTA? #71

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

Open
kriegste opened this issue Dec 8, 2017 · 3 comments
Open

Comments

@kriegste
Copy link

kriegste commented Dec 8, 2017

There is a new version of esp_init_data_default.bin

Now, there are hundreds of ESP modules in the field. How to update them? The normal user?.bin files are being updated over the air. I remember you once wrote that these are the only parts that should be updated OTA.

Well, what is the correct way to handle the new version of esp_init_data_default.bin?

@FayeY
Copy link
Collaborator

FayeY commented Dec 18, 2017

Hi,
yes, OTA can only upgrade userX.bin, sorry that there is no official way to upgrade esp_init_data_default.bin.
To upgrade esp_init_data_default.bin, you need to re-write the flash area where stores the esp_init_data_default.bin by yourself.
Sorry for the inconvenience.
Thanks.

@kriegste
Copy link
Author

kriegste commented Oct 1, 2018

Suggestion:

Put the esp init data into an array which has to be included directly into the source of every project.
This would remove the need of an extra sector/partition and thus save us 4096-128 = 3968 bytes or 4096-128-128 = 3840 bytes in OTA update mode.

It also enables every project to conveniently update this data. Some projects rely on e.g. byte 107 being 0xFF and so on.

It would also prevent the SDK from crashing because of corrupted/missing init data. The bootloader can simply jump to the other image which has its own working init data.

@kriegste
Copy link
Author

This would also solve all issues that are caused by the init partition being mandatory like
#168
and
#179
and
#182

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

No branches or pull requests

2 participants