Skip to content

Installing Linux Images on Toradex Verdin Boards

In the post Setting Up Yocto Projects with kas, we built the Linux image for the Toradex Verdin iMX8M Plus. It’s time to flash the image on the board using the Toradex Easy Installer (TEZI). It’s a three-step procedure: wire up the board in a special way, install and run TEZI on the board, and flash our custom-built Linux image from a USB drive on the board.

Connecting Board and Host PC with Cables

Figure 1: Wiring up the Verdin iMX8M Plus board for flashing a Linux image

Figure 1 shows how to wire up the Toradex Verdin iMX8M Plus board for flashing a Linux image with the Toradex Easy Installer (TEZI).

  • We connect the power supply (12V, 2.5A) with the board (X58).
  • We hook up the board (X25) with the same network as the host computer so that the installer finds pre-built Linux images on Toradex and other servers.
  • We connect a mouse to the board (X53) so that we can interact with the installer GUI later.
  • We connect the port X34 with a USB-C cable directly to a USB-A port of the host computer. This connection is used to install TEZI from the host computer on the board and run TEZI on the board. Installing and running TEZI on the board does not work, if the connection goes through a USB hub.
  • We connect a display with an HDMI cable to the DSI-to-HDMI adapter of the board. The HDMI connection must be in place, before we power up the board. Hot-plugging an HDMI display during installation of a Linux image doesn’t work.

Running the Toradex Easy Installer

We download the latest release of the Toradex Easy Installer (TEZI) from this table on our host computer. We click on the link labelled Verdin iMX8M Plus. We unpack the downloaded zip archive into a directory of our choice and change to this directory. On my Linux computer, the steps look as follows:

$ cd /public/embedded-linux-distros
$ unzip ~/Downloads/Verdin-iMX8MP_ToradexEasyInstaller_5.7.1+build.13.zip
$ cd Verdin-iMX8MP_ToradexEasyInstaller_5.7.1+build.13

The TEZI directory contains a script recovery-linux.sh, which we will call a bit later.

The board must be powered off. We power up the board in recovery mode.

  • We press and hold down the Recovery button (SW3).
  • We press the On/Off button (SW2) while holding the Recovery button down.
  • We hold down the Recovery button for another 10 seconds, before we release it.

We download TEZI from the host computer to the board and start TEZI on the board by executing the script recovery-linux.sh.

$ ./recovery-linux.sh 
Downloading Toradex Easy Installer...
[sudo] password for burkhard: 
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.4.127-0-g08c58c9

Success 1    Failure 0                                                                                    
                                                                                                           
3:6      8/ 8 [Done   ] FB: done                                            

Successfully downloaded Toradex Easy Installer.

If something goes wrong, power down the board, power it up in recovery mode and run the script. It typically works the second time.

If things go right, the TEZI GUI appears on the HMI display attached to the board. It shows some pre-built Linux images available from the Toradex servers.

Figure 2: TEZI GUI with pre-built Linux images for installation on board

If we are happy with one of these Linux images, we select it and install it on the board. Installing a Linux image pre-built by Toradex is the recommended way to recover from a broken bootloader or Linux image. TEZI is our friend when we occasionally mess up.

Flashing the Linux Image to the Board

We don’t want to flash any reference image to the board but the one we built ourselves. On my Linux workstation, the Linux image in TEZI format can be found here:

$ cd /public/embedded-linux-distros/yocto-3.1-dunfell/verdin-imx8m-plus-gen2/build/tmp/deploy/images/verdin-imx8mp
$ ls *Tezi*
Verdin-iMX8MP_Reference-Multimedia-Image-Tezi_5.7.0-devel-20220624153314+build.0.tar

We unpack the TEZI tarball on a USB flash drive, which is mounted at /media/burkhard/716A-0926/ on my host computer. Note: It is not good enough to copy the tarball to the USB flash drive, as TEZI will not detect it as a new image.

$ tar xf Verdin-iMX8MP_Reference-Multimedia-Image-Tezi_5.7.0-devel-20220624153314+build.0.tar -C /media/burkhard/716A-0926/

We unplug the USB drive from the host computer. We plug it into the second USB-A port of X53, while TEZI is running on the board. TEZI will show our image from the flash drive as the first in the list.

Figure 3: Selected our Linux image in TEZI GUI for installation

We select our custom-built Linux image from the list (marked with a USB icon) and press the Install button. We press Yes in the confirmation dialog. Then, it takes a couple of minutes for TEZI to flash the bootloader and the root file system of our Linux image on the board. TEZI shows a progress bar while flashing the image. When finished, TEZI shows the following dialog.

Of course, we press the Reboot button in the middle to see whether our custom-built image works. TEZI power-cycles the board and boots into the new Linux image. We should see a Qt demo application for “buying” DVDs. I’ll show how to replace the demo application by our own application in a future post.

If the installation fails, we hook up a debug console (e.g. putty) over the the serial port so that we can see debug messages while installing and rebooting the new Linux image. These debug messages helped me to find out that I cannot install a Toradex Linux image version 5.2 or newer on a Verdin iMX8M Mini board of the first generation. First-generation boards only work with version 5.1 or older.

References

  • Toradex Easy Installer (TEZI): The entry page with an overview of TEZI; describes the usage of TEZI and provides links to other resources.
  • Loading Toradex Easy Installer: Instructions how to wire up the board, where to download TEZI and how to start it.
  • Mender Easy Installer: A secure upgrade of TEZI for updating a fleet of embedded devices using Mender’s OTA solution; currently supports only Toradex Colibri iMX7.

Leave a Reply

Your email address will not be published. Required fields are marked *