Software Packages Management
Introduction
In this article, you will learn how to manage software packages for Applications, Torizon OS images and Bootloader with the Torizon Cloud.
Sofware Packages
It is important to know that Torizon Cloud is capable of updating different components, managing specific types of packages for each one:
- OS Packages: Torizon OS with all the pieces needed to host and run your Torizon Application Packages - kernel, filesystem, drivers, hardware configurations, your customizations, utilities, and services, such as update client, device monitoring client, container daemon, and more.
- Application Packages: every software that is needed by your application, including libraries and other services, packaged in one or multiple containers.
- Bootloader Packages: whenever needed to perform a major upgrade in the Torizon OS version, Toradex provides fully-validated bootloader packages in the Torizon Cloud so you can securely update your device's bootloader.
- Custom component Packages: when you want to update Subsystems connected to a Torizon OS Device.
Prerequisites
- A registered account in the Torizon Cloud
- Optional: A host machine with TorizonCore Builder installed if you plan to create a customized Torizon OS image.
Application Updates: Containers Packages
You can update your application using the Container Update of Torizon Cloud.
To create a package for containers update on the Torizon Cloud, you can either:
- Use our Visual Studio Code Extension for Torizon to upload a package.
- Use a CLI tool onto Sign and Upload a Container.
- Manually create an Application package uploading a Docker Compose file (
.yml
).
Learn how to create an application package by checking the images bellow (click and slide or use the arrows):
Docker Compose is a tool for defining and running multi-container Docker applications. Learn more about it and how to generate one in:
- Visual Studio Code Extension for Torizon if you are developing with VS Code. Note that, while VS Code allows you to export a Docker Compose file, it also allows you to transparently upload it to the Torizon Cloud, which is easier.
- Using Multiple Containers with Torizon OS for a conceptual overview, or if you are using the command-line.
OS Updates: Vanilla Torizon OS Packages
Toradex maintains its BSPs with updated software for bootloader and Linux kernel. The developers can follow the Torizon OS Issue Tracker and the BSP Layers and Reference Images for Yocto Project Issue Tracker pages to get updated information about known issues, scheduled bug fixes, and feature improvements for every Torizon OS and BSP release. Remember that Torizon OS is built on top of the Toradex BSP.
With the Torizon Cloud, you can update the Torizon OS version of the boards remotely with the latest periodical releases. To do that, when adding a new package, select the option "Custom Package" and then select the desired release type (LTS, quarterly, monthly or nightly) for the same base image that is currently installed.
Custom OS Updates: Custom Torizon OS Packages
In some cases, when you need to customize the base Torizon OS image, the Torizon Cloud can receive your custom image and send its updates to your fleet of devices. Some examples where image customization is required include, but are not limited to:
- Adding new Hardware by customizing the system's device tree
- Changing the System's Splash Screen
- Capturing Changes in the Configuration of a Board In this situation, a developer will use TorizonCore Builder Tool to generate a custom image.
Also, in some corner cases, the image re-building and customization are inevitable. Torizon OS is open-source, and Toradex provides instructions to build Torizon OS with Yocto.
After generating a custom image, the developer will need to sign and upload it to the Torizon Cloud to be available as a package. Learn how to do that, in the Signing and Pushing Torizon OS Images to the Torizon Cloud article.
Subsystem Update - Custom Component Package
You are able to update any subsystem connected to your Torizon Device using the Torizon Subsystem Updates Feature.
Part of setting up a subsystem update with Torizon is to create a component to represent your target subsystem in the Torizon Cloud. This is needed so you can reference the subsystem when creating or searching custom packages for it. If your device configured for Subsystem Updates already connected to Torizon Cloud, your target-subsystem will appear in the list. Otherwise you will need to create a custom component to it.
To learn how to enable and deploy subsystem updates using custom component packages, follow the First Steps with Subsystem Updates article. Learn how to create a custom component package by checking the images bellow (click and slide or use the arrows):
OS and Application: Synchronous Updates
In the context of Torizon Cloud and offline updates, the simultaneous update of the OS and application packages on a Torizon OS device is called "synchronous update". It is more than just updating 2 components at once. It’s truly synchronous, in the sense that both OS and application must update successfully or they will fail together as if they were a single component.
The main motivation behind synchronous updates is for cases where the OS and application are intertwined. For example, when you have a new application that relies on a new driver, and it is only available in a new version of the OS. Given the dependency, it would be ideal to update both OS and application at the same time.
Due to the design of synchronous updates, it’s guaranteed that you’ll end up with a system that either failed to update or successfully updated both components. This way the system prevents awkward scenarios, where only one component is updated successfully leaving you with a halfway updated system with mismatched components.
The above example is not the only situation that would warrant synchronous updates. Whenever you need to tie the failure and success states of both an OS and application updates, use synchronous updates. Otherwise, if it is acceptable for the OS and application update to fail or succeed independently, then two non-synchronous updates are sufficient.
The update procedure in this case has additional checks to ensure integrity of the process. Learn more at the Torizon Updates Technical Overview.
Bootloader Packages
In some cases, Toradex explicitly recomends you to update your bootloader. Toradex maintains and publishes the correct bootloader package for your devices. Learn more in the Bootloader Updates Documentation article.