Run Toradex Easy Installer on Colibri iMX8X

Hello,

my procedure for flashing a Linux image was the following on an iMX7D on Viola Board:

  • Download Easy Installer and extract onto micro SD card
  • Insert Sd card in the Viola Board and run the mmc-bootcmd to boot the Easy installer
  • Then copy the desired image onto a USB stick, insert it and flash with the previously booted Easy installer

Now I basically want to do the same on an iMX8DX on the same Viola Board. When I first received the module there was no Easy Installer per default, but the procedure that I described above still worked and I was able to start the Easy Installer and to flash a Torizon-Image.

But now (with new U-Boot and Linux flashed) the Easy Installer can´t be started from Sd card anymore (no changes to the card).
The following error appears:

U-Boot 2020.04-5.1.0+git.0a26a04408ca (Jan 01 1970 - 00:00:00 +0000)

CPU:   NXP i.MX8QXP RevC A35 at 1200 MHz at 42C

DRAM:  1022 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex Colibri iMX8 DualX 1GB V1.0D, Serial# 06797313

 BuildInfo:
  - SCFW 732e719a, SECO-FW 376e3c15, IMX-MKIMAGE 6745ccdc, ATF
  - U-Boot 2020.04-5.1.0+git.0a26a04408ca

flash target is MMC:0
Net:   eth0: ethernet@5b040000 [PRIME]
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0
Colibri iMX8X # run bootcmd_mmc1
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
2246 bytes read in 14 ms (156.3 KiB/s)
## Executing script at 83200000
This script is only meant for Apalis iMX8 / Apalis iMX8X / Colibri iMX8X
and Verdin iMX8MM
SCRIPT FAILED: continuing...
Found U-Boot script /boot.scr
2246 bytes read in 13 ms (168 KiB/s)
## Executing script at 83200000
This script is only meant for Apalis iMX8 / Apalis iMX8X / Colibri iMX8X
and Verdin iMX8MM
SCRIPT FAILED: continuing...

So it seems that a wrong board name is used, because the board name that was set in u-boot is “colibri-imx8x” but that does not get checked in the script. If I just change the name to “colibri-imx8qxp” then I get the following error:

Colibri iMX8X # setenv board colibri-imx8qxp
Colibri iMX8X # run bootcmd_mmc1
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
2246 bytes read in 13 ms (168 KiB/s)
## Executing script at 83200000
** Reading file would overwrite reserved memory **
SCRIPT FAILED: continuing...
Found U-Boot script /boot.scr
2246 bytes read in 14 ms (156.3 KiB/s)
## Executing script at 83200000
** Reading file would overwrite reserved memory **
SCRIPT FAILED: continuing...

So there seems to be an incompatibility with u-boot and the Easy installer… Does someone have an idea how i can start the Easy installer again?

Additional info:

Booting from the internal Flash or using a Yocto-build on Sd-card still works as expected.

When I change the address so that the itb file can be loaded (to avoid the restricted memory) then I get:

Colibri iMX8X # env set bootcmd_tezi 'load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${tezi_image}'
Colibri iMX8X # env set bootcmd_run 'bootm ${kernel_addr_r}#config@freescale_${fdtfile}'
Colibri iMX8X # run bootcmd
37580496 bytes read in 1629 ms (22 MiB/s)
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Colibri iMX8X #

Could you please specify Toradex Easy Installer version?

I use the version 2.0b6 of the Easy installer.

If it helps here is the output for the image header:

Colibri iMX8X # bootm $loadaddr
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Colibri iMX8X # md $loadaddr
89000000: edfe0dd0 d06e3d02 38000000 5c6b3d02    .....=n....8.=k\
89000010: 28000000 11000000 10000000 00000000    ...(............
89000020: 74000000 246b3d02 00000000 00000000    ...t.=k$........
89000030: 00000000 00000000 01000000 00000000    ................
89000040: 03000000 04000000 64000000 4de39f5f    ...........d_..M
89000050: 03000000 5a000000 00000000 6f422d55    .......Z....U-Bo
89000060: 6620746f 6d497469 20656761 20726f66    ot fitImage for
89000070: 61726f54 20786564 79736145 736e4920    Toradex Easy Ins
89000080: 6c6c6174 342f7265 2d34312e 2e332e32    taller/4.14-2.3.
89000090: 69672b78 54554174 434e494f 3565622b    x+gitAUTOINC+be5
890000a0: 35373463 2f616462 696c6f63 2d697262    c475bda/colibri-
890000b0: 38786d69 00000078 03000000 04000000    imx8x...........
890000c0: 0c000000 01000000 01000000 67616d69    ............imag
890000d0: 00007365 01000000 6e72656b 31406c65    es......kernel@1
890000e0: 00000000 03000000 0d000000 00000000    ................
890000f0: 756e694c 656b2078 6c656e72 00000000    Linux kernel....

I was able to extract the Kernel, squashfs and device tree from the .itb file and load them manually to different addresses. The kernel image seems to be accepted with booti-command, but then the the squashfs seems to be in the wrong format. (Or isn´t it a squashfs at all?) Here is the error:

Colibri iMX8X # booti $kernel_addr_r $loadaddr $fdt_addr_r                                                                                                   Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid

Any idea how I can get the correct ramdisk format?

I was finally able to start the Easy Installer by extracting the kernel image, device tree and squashfs from the .itb-file, placing the latter on a seperate partition of a sd card and running the following commands in uboot:

setenv board colibri-imx8qxp

run bootcmd_mmc1

load mmc 1:1 $kernel_addr_r Image

load mmc 1:1 $fdt_addr_r imx8qxp-colibri-eval-v3.dtb

setenv bootargs "bootargs=video=DPI-1:640x480-16@60D initcall_blacklist=vpu_driver_init root=/dev/mmcblk1p2 autoinstall clk_ignore_unused pci=nomsi"

booti $kernel_addr_r - $fdt_addr_r

Nevertheless it would be interesting to know what the exact problem was, so:

  1. Why did bootm not work?
  2. Why is the default board name not accepted?
  3. Why is the squashfs not accepted as ramdisk?

Hi @msx23,

The correct way to load Easy Installer is through Recovery Mode using USB OTG.

We don’t provide support for loading Easy Installer from SD Card or USB Stick.

See here how to put Colibri iMX8QXP in Recovery Mode.

And here is about how to Load Easy Installer.

Best regards,
André Curvello

But if I understand correctly, the Recovery Mode is not available on Viola Board, or is it?

Hi @msx23,

In case of using the Viola, you need to follow the steps for “Other Carrier Boards” in the Recovery Mode section of your module.

The most important thing is to be sure to be using the USB OTG cable between the carrier board and your computer. Please connect this cable to a direct USB port on your computer, without using a USB HUB.

Best regards,
André Curvello