Skip to content

Commit

Permalink
Attempt to improve layout of Safeboot.md
Browse files Browse the repository at this point in the history
Probably not the most elegant way.
  • Loading branch information
Staars authored Jul 11, 2024
1 parent 199c1b1 commit a3b2637
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions docs/Safeboot.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,41 @@ Tasmota used a standard partition layout consisting of 2 firmware partitions of

This scheme is standard in ESP32 Arduino. Its main advantage is that it is very safe. If a power failure occurs during the OTA update, the device is not bricked and reboots on the untouched version. The main drawback is that it consumes a lot of flash space, enough to contains twice the firmware size.

![Flash_layout_original](https://user-images.githubusercontent.com/49731213/174431015-a38d5365-54bc-473c-b632-1e84c9ea708c.svg){ width="270" align=left }
Example, standard Tasmota layout for 4MB flash:

- a fixed size 64KB system area
- 2x partitions of 1856KB each to receive Tasmota code
- a filesystem of 320KB

![Flash_layout_original](https://user-images.githubusercontent.com/49731213/174431015-a38d5365-54bc-473c-b632-1e84c9ea708c.svg){ width="270" align="left" }


<br><br><br><br><br><br>
## Introducing Safeboot

We introduced a new variant of Tasmota called "Safeboot". It contains a minimal version of Tasmota used only for OTA, and a normal firmware. The main advantage is that it provides 1024KB of additional storage for firmware and/or filesystem.


We introduced a new variant of Tasmota called "Safeboot". It contains a minimal version of Tasmota used only for OTA, and a normal firmware. The main advantage is that it provides 1024KB of additional storage for firmware and/or filesystem.

![Flash_layout_safeboot](https://user-images.githubusercontent.com/49731213/174431178-d26062a7-9c33-4d4b-a415-eea974cefb8e.svg){ width="270" align=left }
Example of new partition layout since v12:

- a fixed size 64KB system area
- a Safeboot partition of 832KB
- 1x partition of 2880KB to receive Tasmota code
- a filesystem of 320KB

![Flash_layout_safeboot](https://user-images.githubusercontent.com/49731213/174431178-d26062a7-9c33-4d4b-a415-eea974cefb8e.svg){ width="270" align="left" }

<br><br><br><br><br><br>
![Flash_layout_safeboot_alt](https://user-images.githubusercontent.com/49731213/174431192-351b4226-7b84-420a-9f9f-0e27855a53e4.svg){ width="270" align=left }

An alternate partition scheme is used in Sonoff Zigbee Bridge Pro:

- a fixed size 64KB system area
- a Safeboot partition of 832KB
- 1x partition of 1856KB to receive Tasmota code
- a filesystem of 1344KB

![Flash_layout_safeboot_alt](https://user-images.githubusercontent.com/49731213/174431192-351b4226-7b84-420a-9f9f-0e27855a53e4.svg){ width="270" align="left" }
<br><br><br><br><br><br>

Note: the Safeboot firmware is a reduced version of Tasmota containing only what's required for OTA updates (Web UI, MQTT, TLS...). However it does not save settings nor support initial Wi-Fi configuration.

!!! tip

If even Safeboot is not enough for your self compiled large firmware (e.g. with webcam, LVGL, Tensorflow, Bluetooth, ...) it is possible to override the partition scheme in your build environemnt in `platformio_tasmota_cenv.ini` with `board_build.partitions = partitions/esp32_partition_app3904k_fs3392k.csv # this is already part of Tasmota`.
If even Safeboot is not enough for your self compiled large firmware (e.g. with webcam, LVGL, Tensorflow, Bluetooth, ...) it is possible to override the partition scheme in your build environemnt in `platformio_tasmota_cenv.ini` with:
`board_build.partitions = partitions/esp32_partition_app3904k_fs3392k.csv # this is already part of Tasmota`.

0 comments on commit a3b2637

Please sign in to comment.