Firmware updates in Mbed Linux OS
You can perform a firmware over the air (FOTA) update for:
- The MBL root file system.
- Any application running on the MBL device.
Note: Currently, MBL does not support updating both an application and a root file system in a single FOTA update.
How software is updated
MBL uses Pelion Device Management to manage firmware updates. Before you start, upload a new version of your firmware (for one or more components) to your Device Management account. This is your payload, and it is a
.tar file that can contain either:
- An application update: One or more OPKG packages (
rootfsupdate: A compressed
rootfs.tar.xzthat contains root file system content.
Start the process by initiating an update campaign; Device Management then sends the device an update request with a manifest detailing what needs to be updated. If the device accepts the request, Device Management sends your uploaded payload file to the device and monitors the update process.
Tip: Refer to the Pelion Device Management documentation for a full review of the update process.
After receiving a payload file containing application updates, for each application update, MBL:
- Installs the version of the application contained in the update payload.
- Stops the version of the application already running on the system.
- Runs the newly installed version of the application.
- Removes the previously installed version of the application.
The previously installed version of an application is removed only if the new version can be successfully installed and run. If the update payload contains multiple applications, the previously installed versions are removed only if all applications are successfully installed and run. If any application in the update payload fails to install or run, all newly installed application versions are removed, and the previously installed versions are restarted.
Root file system updates
rootfs updates, MBL devices have two root partitions:
- Active: a partition containing the root file system for the running system.
- Inactive: a partition available to receive a
After receiving a payload file containing a
rootfs update, MBL:
- Writes the contents of
rootfs.tar.xzto the inactive partition.
- Flips a flag indicating which root file system partition is active, so that after a reboot the previously inactive partition becomes the active one, and vice versa.
- Reboots the device.
- Mounts the root file system from the update payload.
The previously active (now inactive) root file system partition is now ready to receive the next
Note: MBL relies on Device Management to validate updates. For more information, see the Security in firmware update section of the Device Management documentation.