Dual Systems Update API

API Reference

Dual systems are systems composed with two set of partitions: one is said "ACTIVE", so currently in use, and the other said "UPDATE", so not used but ready-to-use.

On dual systems, when Legato updates an image through the le_fwupdate API, it works on the UPDATE system. And then an "install" command performs a switch from UPDATE to ACTIVE after a reboot: The new ACTIVE system is used. The UPDATE partition becomes ready for a new update or for roll-back if the new ACTIVE fails to start properly.

In each set, three sub-systems are defined:

  • The "modem" group for all binaries and filesystem related to modem core,
  • The "lk" group for the LK bootloader,
  • The "linux" group the kernel, rootfs and legato partitions.

IPC interfaces binding

All the functions of this API are provided by the le_dualsys service.

Here's a code sample binding to the le_dualsys service:

   clientExe.clientComponent.le_dualsys -> fwupdateService.le_dualsys
All of these APIs are only available for all dual systems platforms. Please refer to the Product Technical Specification document of your platform for further details. Please refer to platformConstraintsFwUpdate for details.

Disable the check of sync before updating

It is possible to force the update of any partition even if the systems are not synchronized. This is done by calling le_fwupdate_DisableSyncBeforeUpdate() with the value true. If the value is false, the synchronization will be mandatory before performing an update. Note that the synchronization is automatically done by calling the function le_fwupdate_InitDownload() when the synchronization check is enabled.

Defining a System

It is possible to define a system by calling le_dualsys_SetSystem(). This function takes three values, one for the modem sub-system, one for the lk sub-system and one for the linux sub-system. The values are one of 0 for system 1 or 1 for system 2. When set, the system will be usable after the next reset. If no error is encountered, this function will perform a reset.

It is possible the get the last defined system by calling the le_dualsys_GetSystem(). This function returns the values for the three sub-systems. This system is updated accordingly the last system set by le_dualsys_SetSystem().

It is possible to get the current active system by calling le_dualsys_GetCurrentSystem(). This function returns the values for the three sub-systems. If le_dualsys_SetSystem() is called before le_dualsys_GetCurrentSystem(), the returned values may differ as they represent the current system in use.