Perform a rescue 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.

Boot in USB debug mode

Requirements

  • Linux host computer.

  • Root/administrator permissions on your development computer

For the ConnectCore 6UL SBC Express:

  • One micro USB cable for the USB device port

  • Another micro USB cable for console/power

For the ConnectCore 6UL SBC Pro:

  • One micro USB cable

  • One USB serial console cable

Instructions

  1. Download the U-Boot bootloader binary image file from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccimx6ulstarter/fb/.

    See U-Boot files by variant to verify which U-Boot binary you need.
  2. Download the latest Universal Update Utility (UUU), a software tool from NXP.

    UUU version should be v1.5.11 or higher.
  3. Place the uuu executable in a directory in your PATH, such as /usr/bin.

  4. Install udev rules to allow any user to run uuu to access the USB port:

    $ sudo sh -c "uuu -udev >> /etc/udev/rules.d/70-uuu.rules"
    $ sudo udevadm control --reload
  5. Connect one micro USB cable to the USB device port of the board (bottom side, under the USB host connectors) and the other end to the development computer.

  6. Connect the other micro USB cable to the CONSOLE/POWER connector.

  7. Close the BOOT MODE jumper (J19) near the CONSOLE/POWER micro USB connector.

    USB mode jumper
  8. Open a serial terminal at 115200/8/n/1.

  9. Power up the board.

  10. On the host computer, run the uuu tool with the U-Boot file to boot as parameter. For example:

    $ uuu </path/to/u-boot-file>
When TrustFence support is enabled, Digi Embedded Yocto builds a special signed U-Boot file u-boot-dtb-usb-signed-ccimx6ulstarter.imx. Use this file to recover a closed device from USB.

The serial terminal shows the device starting U-Boot.

  1. Download the U-Boot bootloader binary image file from https://ftp1.digi.com/support/digiembeddedyocto/4.0/r7/images/ccimx6ulsbc/x11/.

    See U-Boot files by variant to verify which U-Boot binary you need.
  2. Download the latest Universal Update Utility (UUU), a software tool from NXP.

    UUU version should be v1.5.11 or higher.
  3. Place the uuu executable in a directory in your PATH, such as /usr/bin.

  4. Install udev rules to allow any user to run uuu to access the USB port:

    $ sudo sh -c "uuu -udev >> /etc/udev/rules.d/70-uuu.rules"
    $ sudo udevadm control --reload
  5. Connect the USB serial cable to the CONSOLE connector on the board and to your host computer.

  6. Connect the micro USB cable to the USB device port of the board (bottom side, under the USB host connectors).

  7. Close the BOOT jumper near the CONSOLE connector.

    USB mode location
  8. Open a serial terminal at 115200/8/n/1.

  9. Power up the board.

  10. On the host computer, run the uuu tool with the U-Boot file to boot as parameter. For example:

    $ uuu </path/to/u-boot-file>
    When TrustFence support is enabled, Digi Embedded Yocto builds a special signed U-Boot file u-boot-dtb-usb-signed-ccimx6ulsbc.imx. Use this file to recover a closed device from USB.

The serial terminal shows the device starting U-Boot.

Reprogram U-Boot in the NAND

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

  1. Reset the environment to default values:

    => env default -a
  2. Reset to the default partition table into the NAND:

    => run partition_nand_linux
  3. Save the environment with saveenv.

  4. Use one of the following methods to update the files to the NAND:

Re-program bootloader from USB using Fastboot

To update U-Boot via USB OTG using uuu and the Fastboot protocol:

  1. Connect a micro USB cable between target and host.

  2. Then, on the target, run the fastboot command from the U-Boot console, selecting the USB interface you want it to listen to:

    => fastboot 0
  3. On the host, run the following fastboot commands through the uuu tool (as root):

    $ uuu FB: ucmd setenv fastboot_buffer \${loadaddr}
    $ uuu FB: ucmd setenv forced_update 1
    $ uuu FB: download -f <file>
    $ uuu FB: ucmd update uboot ram \${fastboot_buffer} \${fastboot_bytes}
  4. Change the boot source configuration to boot from the internal NAND.

    To do so remove BOOT MODE jumper.

  5. Power-cycle the board. The target now boots from the NAND.

For additional commands and information, see the NXP UUU manual.

Re-program 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>
  3. Connect an Ethernet cable to the Ethernet port.

  4. Run the following command to update U-Boot into the NAND:

    => update uboot tftp <u-boot-filename>.imx
  5. Change the boot source configuration to boot from the internal NAND.

    To do so remove BOOT MODE jumper.

  6. Power-cycle the board. The target now boots from the NAND.

Re-program 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:

    => update uboot mmc 0 fat <u-boot-filename>.imx
  4. Change the boot source configuration to boot from the internal NAND.

    To do so remove BOOT MODE jumper.

  5. Power-cycle the board. The target now boots from the NAND.