-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix esp8266 bootloader building and add diagnostic tools (#2734)
This PR focuses on an issue discovered in #2727 when attempting to update the esp8266 boot partition from code during a firmware update. It was discovered that doing this renders the device unbootable because the boot sector header information is incorrect. This is because the required `SPI_SIZE`, `SPI_MODE` and `SPI_FREQ` values were never passed to the rboot makefile when building. When flashing the boot partition normally, these parameters get passed to esptool, which modifies the provided boot image. I wasn't aware until now that it did this! **Build rboot as variant** The solution to the main problem is to build rboot as a variant - see https://sming.readthedocs.io/en/latest/_inc/Sming/building.html#library-variants. The location of the bootloader firmware (in `out/Esp8266/debug/firmware/rboot.bin`) is unchanged, but is overwritten by the appropriate variant after every build. This should ensure consistency with selected settings. **Remove RBOOT_INTEGRATION** As we've forked rboot some time ago this isn't necessary, so we can simplify the code a bit. **Update esptool to v4.6.2 (from v4.4)** Version 4.7 has issues with earlier python versions and breaks with IDF 4.4/4.3. **Add `bootinfo` build target** Adds `make bootinfo` for esp architectures which shows details of the boot partition, including header fields so we can check it's correct. **Add `esptool` build target** Makes for easier access to esptool.
- Loading branch information
Showing
6 changed files
with
51 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Submodule rboot
updated
5 files
+2 −27 | Makefile | |
+0 −10 | README.rst | |
+5 −4 | appcode/rboot-api.c | |
+0 −4 | rboot-stage2a.c | |
+0 −4 | rboot.h |