From 6eb8cf20943ed0daeaf568dc8dee05a47f2ad874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9za=20Husi?= Date: Thu, 12 Sep 2019 16:59:30 +0200 Subject: [PATCH] PYFW-375: Documentation for OTA update from 1.18 to 1.20 --- content/tutorials/all/ota.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/content/tutorials/all/ota.md b/content/tutorials/all/ota.md index 49aad5b..9f27999 100644 --- a/content/tutorials/all/ota.md +++ b/content/tutorials/all/ota.md @@ -230,4 +230,24 @@ In order to check your software version, do: ``` import os os.uname().release -``` \ No newline at end of file +``` + +## OTA update from version 1.18 to 1.20 +Between version 1.18 and 1.20 the partition table is changed, the OTA_0 partition, among several others, is relocated because the size of the firmware has been increased due to the extended functioanlity of the 1.20 version. Due to this reason when updating from version 1.18 to 1.20 via OTA, an update to an intermediate version, numbered as 1.18.3, must be performed. +The intermediate version makes sure that when OTA update to 1.20 is requested, the partition table contains correct entries and the new image will be flashed to the proper location. + +The intermediate version, 1.18.3, contains the following EXTRA steps when OTA update is requested: +* Updates bootloader +* Moves the content of the "ota data" partition to its new location +* Updates the partition table + +_Note_: Please note that if bootloader or partition table update fails (e.g.: due to a power-loss), the device will not boot and recover and a new image must be flashed via a cable. + +When the device is being updated to the 1.18.3 intermediate version it may be flashed onto "OTA_0" partition depending on the where current active image is loaded from. In this case on next boot it automatically copies itself from "OTA_0" to "Factory" partition as a preparation for being able to receive the 1.20 image in the future. Without this step when the 1.20 image is being flashed on the "Factory" partition due to its increased size it would overwrite the first segments of the curently running firmware (which is the 1.18.3 and located on "OTA_0" partition). + +Therefore the correct update chain from 1.18 to 1.20 via OTA looks like: 1.18.2 -> 1.18.3 -> 1.20 + +Downgarding from 1.20 back to 1.18 is possible, however the target version must be 1.18.3. The 1.18.3 image able to detect whether a downgrade happened and in this case it will not perform the steps explained above, it behaves as the 1.18.2r7 image just with updated partition table and bootloader. Updating back again to 1.20 is possible and allowed. + +_Note_: Because 1.18 version only supports FatFs it is not supported to update via OTA to an 1.20 variant where the file system is LittleFs and vica-versa. +_Note_: Updating devices with encrypted flash is not supported.