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 API

API: Update API

The Update API is used to push an update to the service and provides functions for getting information about the current and previously installed system.

Update Control API

API: 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.

Install Status API

API: Install Status API

The API Install Status can be used by an application to watch for other applications being installed or uninstalled from a system.

App Remove API

API: c_le_appRemove

The App Remove API is used to remove applications from the running system.

Update Clients

Within the application framework there are multiple clients that use the update service:

  • a command line client update tool, used to transfer update packs from your dev machine to the target for installation.
  • AirVantage Connector uses the update service to receive and install software updates from the AirVantage server.

You are also able to create your own app to handle updates. If you have your own method or protocol for delivering updates, you can build a service to download and control the updates.

API Overview

Service Description multi-app safe
Update API Apply app and firmware updates
green_dot.png
Update Control API Control app and firmware updates
green_dot.png
Install Status API App install/uninstall notification
green_dot.png
Firmware Update API Firmware image updates
Flash API Flash management
green_dot.png
Dual Systems Update API Dual systems partition definition