Hi I'm new and just managed to compile a tweaked firmware for the ESP8266.
I want to add certain files into the filesystem by default and have this flashed at the same time as the firmware.
Is there a way to add such a filesystem so that it is flashed with the firmware, or what is the best way to do this without having to have a second step of uploading files? Thanks.
Flashing firmware with filesystem
Re: Flashing firmware with filesystem
I think the easiest, even though a bit hacky, way is to simply flash your firmware, upload the files you need, and then dump the whole flash back with esptool.py.
-
- Posts: 463
- Joined: Wed Apr 08, 2015 5:19 am
Re: Flashing firmware with filesystem
The contents of the files that are created when the filesystem is initialized are directly included in the source as char arrays. I did a PR once for stmhal to create those arrays from actual files in the source tree, but there were some doubts about merging it and I never persued the issue.
https://github.com/micropython/micropython/pull/1891
Maybe you can use that as a starting point.
https://github.com/micropython/micropython/pull/1891
Maybe you can use that as a starting point.
Re: Flashing firmware with filesystem
It would be nice if there was a /flash folder in /esp8266 which, on make, would append each file to the flash filesystem.
Then we would have 3 methods for deploying scripts, /scripts, /modules and /flash.
Then we would have 3 methods for deploying scripts, /scripts, /modules and /flash.