Update Factory for i.MX platforms
Published on November 13, 2017
Our partner Kynetics released an OTA update solution for IoT platforms named Update Factory.
This solution leverages SWUpdate, which we talked about in a previous post, using its Suricatta feature to connect to a nice and easy-to-use web interface to manage all your devices.
//
.syntaxhighlighter { overflow-y: auto !important; overflow-x: auto !important; padding-bottom: 0.5rem !important;}
For the impatient
If you want to test a pre-built image for our Nitrogen platforms, you simply need to register to the following website:
You will then receive a Yocto-based image file as well as some credentials to login to the management website.
The only setting required is to update /etc/swupdate/swupdate.cfg
to match your website tenant ID.
Update Factory architecture
For those interested in details about the architecture, we invite you to watch Diego Rondini's presentation during last Embedded Linux Conference Europe:
[embed]https://www.youtube.com/watch?v=Za21QFJGvJ0[/embed]
Note that the slides associated to this presentation are also freely accessible:
Although the video includes a nice demo towards the end, the next section will cover a simple update use-case.
Update Factory demo
This section will show the different steps required to apply an update on your platform using the pre-built image provided by Kynetics.
First, when you log in the Update Factory website, you will see a list of devices that are up and running.
You can see above that each platform is distinguished based on its MAC address since it is a unique number.
Also, in the Distributions tab, there is one Test distro update package which was uploaded beforehand.
If you drag & drop that package onto the device listed, a pop-up will appear which allows you to assign that update to the device (notice the Forced parameter).
Once the assignment is done, the package is uploaded to the platform and the update process starts.
Note that the pre-built image is based on Yocto and is using a Single-Copy scheme but the same mechanism can also apply to a Double-Copy scheme.
Also, in order for Forced updates to be automatically applied, you need to export a variable in /etc/swupdate/update.env
as it isn't the default setting:
export UPDATE_FORCED=true
Just like the rest of the update process, it is all explained in the documentation.
At this point, the website is waiting for the platform to be done with the update process, whether it worked or failed, to show its final status.
In the above, you can see that the device was properly updated and is now running the Test distro v1.0.
For those who prefer to see that same mechanism in video, Kynetics also prepared one for you:
[embed]https://www.youtube.com/watch?v=74kdepHRBxI[/embed]
The above is the simplest example provided by this solution, but the tool offers:
- Target filtering, to separate platforms from different countries for instance
- Planned updates, to have updates happen during the night or week-end for instance
- Rollout groups, to have updates happening in a known order
The next section will give pointers for you to explore those different features.
Going Further
We recommend reading the nicely written documentation:
It includes, for instance, a section on how to create an update manually.
Also, a set of videos are available to help understanding and mastering the web interface:
If you want to dig into the source code, Kynetics shares their Yocto layer on Github:
Finally, the above article is oriented towards Yocto, but Update Factory can also be used with Android and can surely be adapted to other OSes.
As usual, feel free to share your experience/remarks in the comment section below.