
Chapter 10
OTA implementation
NXP's LS1021-IoT, LS1012ARDB, LS1043ARDB, LS1046ARDB, and LS1028ARDB platforms support OTA (Over-the-air)
requirements. This section provides an introduction to OTA use cases, scripts, configuration settings for implementation and
server preparation, and a test case. It also lists the OTA features supported by each hardware platform.
Notice: OTA is not enabled in OpenIL v1.8 release.
10.1 Introduction
OTA refers to a method of updating U-Boot, kernel, file system, and even the full firmware to devices through the network. If the
updated firmware does not work, the device can rollback the firmware to the latest version automatically.
While updating U-Boot, there is no hardware method to rollback the device automatically, hence the device might
not be rolled back, once the U-Boot is not working.
NOTE
• version.json: This is a JSON file which saves the board name and version of each firmware. Below is an example of
version.json.
{
"updatePart":"kernel", /* Name of firmware image which has been updated. */
"updateVersion":"1.0", /* Version of firmware image which has been updated. */
"all":"1.0", /* version of the full firmware image which has been used now */
"u-boot":"1.0", /* version of the u-boot image which has been used now */
"kernel":"1.0", /* version of the kernel image which has been used now */
"filesystem":"1.0", /* version of the filesystem image which has been used now */
"boardname":"ls1021aiot" /* used to get the corresponding firmware from server*/
"URL":"https://www.nxp.com/lgfiles/iiot" /* used to get the corresponding firmware from server*/
}
• update.json: This file is stored in server, it saves the name and version of firmware image which will be updated. Below is
a sample update.json file:
{
"updateStatus":"yes", /* set yes or no to tell devices is it need to update. */
"updatePart":"kernel", /* name of update firmware. */
"updateVersion":"1.0", /* version of update firmware */
}
• ota-update: This script can get a JSON file named update.json from server, then parse the file and get the new firmware
version to confirm whether to download it from server or not. It finally writes the firmware into the SD card instead of the
old one. After that, save the "updatePart" and "updateVersion" into version.json, and mark the update status on 4080
block of SD card to let U-Boot know it.
• ota-versioncheck: This script checks if the firmware has been updated, then updates the version of the update part in
version.json, and cleans the flag of update status on 4080 block of SD card. This script runs automatically each time the
system restarts.
• ota-rollback: This script runs on the ramdisk filesystem after the filesystem update fails. It gets the old firmware version
from the version.json file and then updates it from the server.
10.2 Platform support for OTA demo
The OTA demo is supported by four NXP hardware platforms. Following is the list of features supported by each platform:
NXP Semiconductors
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
142 / 199