IMX7 Automatic recovery / easy installer flash via USB only

We’re considering a worst case scenario, where the bootloader is broken somehow.

Currently this is the best we can do (and it requires USB and ethernet):

  • Connect the USB, and ethernet
  • Configure dnsmasq to configure DNS for to the host
  • Set up a web server serving a json image file, and the image file itself (with autoinstall set inside the image file’s json)
    toggle a GPIO high, which is connected to the recovery pin.
    power cycle the IMX7
  • Run ./
  • The IMX7 will boot into recovery, attempt to connect to, get an image list, grab the autoinstall image and install it.

We’d love if this were possible over the RNDIS connection alone as that would reduce the # of connections required (ie. USB only) between the IMX7 and the driver for our recovery mechanism. Unfortunately it appears that the RDNIS connection won’t make any attempt to connect to the host at all.

Any thoughts?
Perhaps modifying (from GitHub - toradex/imx_loader at imx_usb_batch_mode_refactored ) or is there some other way to do this?

Ref Ticket#2020072910000029

You can download Easy Installer compatible OS image and unpack it on USB stick or SD card. When you load Easy Installer to Colibri it also search for images on SD card or USB drive. So you don’t need an Ethernet to flash a Colibri.

The only loads Easy Installer. RNDIS than activated by Easy Installer. It has a debug console over debug UART so you can try to debug your issue.

The scenario I’m talking about is unattended, and triggered by a second board co-located with the IMX7, when it can’t detect that the IMX7 has booted successfully…

As such USB / SD card is not suitable (as no one is there to plug/unplug it)
We also can’t have someone manually using the debug UART (as no one is there to type)

RNDIS than activated by Easy Installer.
Does it also attempt to find any images over the RNDIS connection? It does attempt to find them over ethernet and SDcard/USB as you mentioned, but neither is ideal in our circumstance.

You can keep USB stick with a recovery image always inserted. It will neither affect normal boot nor reovery boot. But when Easy Installer starts it will use it for re-flashing.

I’ll double check about possibility to use RNDIS. It should work by default.
However you need to setup a local webserver as described here.