Use of Virtual Secondaries
Virtual secondaries can be used as a way to update a configuration file on the primary (where the primary is a standard OSTree image running an aktualizr). You can do this in two parts:
First you need a virtual secondary configured that can be used to update a configuration file.
Afterwards you can integrate it into your Yocto build.
You can create a virtual secondary to run locally by following the steps on how to simulate a device without building a disk image.
You can use the provided
.debreleases mentioned and the
virtualsec.jsonfile, which you can edit to suit your needs: such as removing one of the two entries and setting the paths and names to whatever you prefer.
Afterwards, you will be able to download the arbitrary files to the location specified in the
Next, you can upload the files for the virtual secondary. To do so, go to the Software versions tab in the OTA Connect Portal and click Add Software. You should make sure the ECU Types field matches the value specified in the
ecu_hardware_idvariable of the
ecu_hardware_idmust be unique per each file type that you’ll like to deliver, otherwise an update of one of them will rewrite the others.
To issue the update perform the following steps:
Go to your Devices tab and find your primary. (You can run
aktualizr-infolocally to get the name of the primary if you don’t know it.)
Afterwards, select your virtual secondary and the file you uploaded to the Software versions tab.
After your selection, the primary will begin to download the file.
For future reference, you can use the Campaigns tab to send updates to multiple devices simultaneously.
You can use the files in the repository here as an example to get the virtual secondaries to work in Yocto. You can use the files directly or you can copy them to one of your layers and modify them according to your needs.