/ Build Apps

Update

Overview

The process of updating software in a Legato based system split into multiple parts:

the updateDaemon service which accepts updates over it's API Update API.

separate update clients, provide the ability to initiate updates over various channels (command line, ssh, or even from the cloud using an appropriate cloud client).

parts of the Legato software stack assist the update service in providing its functionality.

the startup system also plays a roll in update and rollback.

For the specifics of what the update service does and the actions that it performs see Updates.

Note

Because the specifics of how platforms function can differ, the behavior of the of the update service can vary by platform. This document focuses on the update process for common Sierra Wireless modules.

Update Service

The updateDaemon process is part of Legato's core system services. It is run and controlled by the Supervisor and isn't a Legato app, so can't be started or stopped.

When the update receives a .update file it extracts update commands and files from the .update pack and applies them to the target.

The .update file commands understood by the service are:

Update System -- Install a Legato system. Updates the runtime environment but doesn't modify the OS or any support device firmware.

Update App -- Install an application. If an application of the same name is already installed it is replaced with the version found within the .update pack.

Remove App -- Removes the named application. This is the only update command that doesn't have any data files associated with it.

Update Firmware -- Update the firmware of an attached hardware device. For example the cellular modem found in wireless modules. On systems without a firmware portion, like the virtual platform, this command is unsupported.

Note

On Sierra Wireless modules, firmware level updates can include replacement copies of whole partition file systems. It is possible to replace the "Base" version of Legato this way. See legatoServicesUpdate_Base for more details on this. It is also possible to create a .cwe file that instructs the modem to erase and reformat the user data partition allowing the user to create an update that takes their module back to a factor default state.

On Sierra Wireless modules when firmware updates are installed a full reboot of the module will be triggered. For system updates only the runtime environment will be restarted.

Update APIs

The following APIs are provided by the update service to monitor and control the update process:

Update Control API

The update control API is used to control the update process. For example, applying an update can cause the system to restart itself, an application can use le_updateCtrl.api to choose to block updates from being applied, if it is running a critical process that can't be interrupted.