This topic describes how to use Legato's software update feature and provides some backgaround info.
The Legato application framework is designed to solve difficult problems surrounding updating software on devices operating in the field:
The software Update Process updates the target including the Legato framework.
While a system is being installed, it's kept in an unpack directory (/legato/systems/unpack).
The process handles everything needed to update the system including managing try counts and ensuring the system stays running for a probation period before the Update Daemon marks it as good (or a request marks it as good).
Functions are also provided that protect against updates during critical operation periods (e.g., performing an emergency call in response to a vehicle collision).
Security is handled by Update Daemon hooks. Legato start-up code also supports using a full golden system found in a read-only file system mounted at /mnt/legato. See Update Process for details.
Update packs are created and then fed to the Update Daemon through either the Software Update API or the target update tool.
It's best to use Legato's software update to build your own system (i.e., don't change the default system or there will be maintenance problems when new Legato versions are released).
You need to copy system.sdef
to your own directory. You can rename it, but keep the .sdef extension (e.g., pumpMonitor.sdef).
Then customize the .sdef to your needs (see System Definition .sdef).
Here's a sample .sdef file using numerous platform services:
To preserve an app between systems, ensure the app is included in the apps section of the .sdef file.
This is how to maintain system config settings outside of the /apps and /users branches of the config tree:
See Import/Export Config Trees for info on how to create a script for this.
When an app is installed, removed, or updated individually, it essentially creates a new modified system that's the same as the old system, but now with the change to the app applied.
Because changing an individual app doesn't touch the framework, changing an individual app doesn't require the whole system to be restarted. Instead, a snapshot of the running system is taken before it's modified to ensure fall back in case the modifications fail. Then, the modifications are applied to the running system.
Changing an individual app in a running good system flows like this:
status
file is set to tried 1.Modifiying an already modified good system flows like this:
status
file is set to tried 1.Modifying a tried (probation) system flows like this:
status
file is set to tried 1.See detailed topics
Update Process process
Update Pack Format
Software Update API
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.