Updating a Device through USB

I have been looking around your website for information and examples regarding updating a device once it has come out of production and has an installed customized TorizonCore Image installed and running with some preprovisioned contaiers.

For some reason i can’t seem to find the right example of how to update the image and/or application(s) through a USB without having to either do it online or reinstalling a clean Install.

I have found information about the secure offline update, but we dont nesecarily need it to be locked behind credentials to install the software.

So my question is this: Is it possible to put the device in Recovery Mode, insert a USB and then having the device auto update the OS and application containers, without having to create a lockbox? Given that it already has a Costumized TorizonCore image.

Hi @Morgensol ,

Assuming you are using torizoncore-builder to generate the custom TorizonCore image, you can generate a custom Easy Installer image containing the bundled containers.

If you are using a tcbuild.yaml file, this link should help.

If you are using the torizoncore-builder sub-commands directly, you need the combine sub-command.

Drew

Hi @drew.tx
You are indeed assuming correctly, right now we have downloaded the following Image and using it as input: “torizon-core-docker-verdin-imx8mm-Tezi_5.4.0+build.10.tar”.

In the tcbuild.yaml file I changed the output section to the following:

output:
  easy-installer: 
    local: image-dir/custom-image_5_4
    autoinstall: true
    accept-licence: true
    bundle:
      dir: bundle/

I tried building it and putting it on a USB and connecting it to the carrier board. I took the power, held the recovery button and turned the power on again. It did go into recovery mode, as is obvious since it did not boot up the LCD screen connected (which at the very least indicates its running something different than normally since we have a sample weston container that boots up on boot), however then nothing else happened, I read somewhere that it’s supposed to give me some feedback, but I’m getting nothing from it.

Am I missing something obvious here?

The output image created from TorizonCore Builder can only be installed using Toradex Easy Installer. After a device is put into recovery mode you need to first load Toradex Easy Installer onto the device, then you use that to install your final image: Loading Toradex Easy Installer | Toradex Developer Center

Best Regards,
Jeremias

So unless I’m misunderstanding here, that would mean that I have to connect a PC to it first, which is not what I want to do.
If possible I want to be able to just connect a USB and have it update the image offline without having to use any PC to preload another image on it or any other user interaction but putting into a recovery mode.

From your previous message I understood that as long as the image I have installed is based off the Easy Installer then I’m able to auto install/update the device with image and containers through USB, was that misunderstood by my part? Because if I did understand that correctly, then I should be able to just plug in the USB, since I currently have the Customized Image installed (albeit with other containers than what I want on it) right?

From your previous message I understood that as long as the image I have installed is based off the Easy Installer then I’m able to auto install/update the device with image and containers through USB, was that misunderstood by my part? Because if I did understand that correctly, then I should be able to just plug in the USB, since I currently have the Customized Image installed (albeit with other containers than what I want on it) right?

The custom image you produced using TorizonCore Builder can only be installed using Toradex Easy Installer, is what I’m saying.

So if you can’t use our Toradex Easy Installer or our secure offline updates mechanism, then we don’t really have a mechanism that fits your needs at the moment.

If you want to update your containers yourself then you can use docker save and docker load. This lets you create a tarball of your container images on your development PC, which you can stick on a USB drive and transfer to the device. Then this tarball can be loaded to get your container images on the device. Then you can easily transfer your docker-compose file via USB. In theory you’ve then “updated” your application.

If you want this process to be automatic you’ll need to probably script this yourself on the device side. That way on USB insertion the container images and files are automatically loaded from the USB.

If you want to update the OS you can use OSTree in a similar way with USB: OSTree | Toradex Developer Center

Again though if you want this automatic you’ll need to script the behavior yourself. Keep in mind these are just ideas and not a verified process that we have tested ourselves. The only method that we test and recommend ourselves for USB updates is our secure offline updates mechanism.

Best Regards,
Jeremias

Alright it makes sense, I’ll try something along those lines.
Thanks!

Glad I could help provide an alternative suggestion.