Recover your device

USB debug mode boot

If the bootloader has been erased from the storage media (or written with an invalid image) and the target does not boot, you can boot the target from the USB device port.

Note If you install the Digi Embedded Yocto SDK in a location other than the default location, you must use the -c parameter to specify the directory containing the configuration files.

Use the following syntax, replacing $SDK_FOLDER with the name of the non-standard folder where the SDK was installed:

imx_usb -c ${SDK_FOLDER}/sysroots/x86_64-deysdk-linux/usr/bin/imx_usb -c ${SDK_FOLDER}/sysroots/x86_64-deysdk-linux/etc/imx-loader.d/

To boot in USB debug mode and restore the bootloader, follow these steps:

Requirements:

Boot U-Boot in USB debug mode

  1. Install the SDK toolchain. See Application development.
  2. Connect the USB serial cable to the CONSOLE connector on the board and to your host computer.
  3. Connect the micro USB cable to the USB device port of the board (bottom layer, under the USB host connectors).

  4. Close the BOOT jumper near the CONSOLE connector.

  1. Power up the board.
  2. Open a serial terminal at 115200/8/n/1.
  3. On the host computer, as root, run the imx_usb tool installed with the SDK toolchain with the U-Boot file to boot as parameter. For example:
sudo /opt/dey/2.2-r3/sysroots/x86_64-deysdk-linux/usr/bin/imx_usb /mypath/u-boot-ccimx6ulsbc.imx

The serial terminal shows the device starting U-Boot.

Boot via USB on a closed device

With TrustFence enabled, signed U-Boot images are created. In order to boot signed U-Boot images on a closed device, you must configure the imx_usb application provided with Digi Embedded Yocto as follows:

/path/to/u-boot.imx:dcd
/path/to/u-boot-usb-signed.imx:no_clear_boot_data,jump header

Replace /path/to/u-boot.imx with the path to the unsigned u-boot image and /path/to/u-boot-signed-usb.imx with the path to the signed USB bootable image.

sudo /opt/dey/2.2-r3/sysroots/x86_64-deysdk-linux/usr/bin/imx_usb

Update U-Boot in the NAND flash

Once U-Boot is running, you can use it to update the bootloader in the NAND flash:

Update bootloader from Ethernet (TFTP)

  1. Place the U-Boot binary inside your host computer TFTP exported folder.
  2. On the target, configure your network settings (IP of the device, IP of the host/server):
setenv ipaddr <your-ip>
setenv serverip <server-ip>
  1. Connect an Ethernet cable to ENET1 Ethernet port (beside the USB connector).
  2. Run the following command to update U-Boot into the NAND flash:
=> update uboot tftp <u-boot-filename>
  1. Remove BOOT jumper and power-cycle the device. The target now boots from the NAND flash.

Update bootloader from microSD card

  1. Place the U-Boot binary inside a FAT-formatted microSD card.
  2. Insert the microSD card in the board.
  3. Run the following command to update U-Boot into the NAND flash:
=> update uboot mmc 0 fat <u-boot-filename>
  1. Remove BOOT jumper and power-cycle the device. The target now boots from the NAND flash.