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 in USB debug mode

Requirements

  • Linux host computer.

  • Root/administrator permissions on your host computer.

For the ConnectCore 95 Development Kit:

  • A USB type-C cable for the console.

  • A USB type-C cable for recovery.

Instructions

  1. Download the U-Boot bootloader binary image file from https://ftp1.digi.com/support/digiembeddedyocto/5.0/r3/images/ccimx95-dvk/xwayland/

    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.201 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 a USB type-C cable to your host computer and the other end to the target CONSOLE connector.

  6. Connect a USB type-C cable to your host computer and the other end to the target USB recovery connector (USB_C on the ConnectCore 95 Development Kit).

  7. Change the boot mode configuration to boot from USB. To do so, set the boot mode micro-switches as follows:

    ON
    1 2 3 4
  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 -b spl </path/to/u-boot-file>

    The serial terminal shows the device starting U-Boot.

    When booting in USB recovery mode, U-Boot runs the command in variable bootcmd_mfg, which runs fastboot command by default, to await commands from the USB port. Press Ctrl+C to get the U-Boot prompt.
  11. Once you have booted U-Boot, you can proceed to re-program U-Boot into the eMMC. See Re-program U-Boot in the eMMC.

Boot from microSD card

  1. Create a bootable microSD card. See Boot from microSD card for instructions.

  2. Power off the device.

  3. Insert the microSD card into the microSD card holder.

  4. Change the boot source configuration to boot from the microSD card. To do so, set the boot mode micro-switches as follows:

    ON
    1 2 3 4
  5. Power on the device.

  6. Once you have booted U-Boot, you can proceed to re-program U-Boot into the eMMC. See Re-program U-Boot in the eMMC.

Re-program U-Boot in the eMMC

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

  1. Reset the environment to default values:

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

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

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

Re-program bootloader from USB using Fastboot

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

  1. Connect a USB type-C cable to your host computer and the other end to the target USB recovery connector (USB_C on the ConnectCore 95 Development Kit).

  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 uuu to update U-Boot into the eMMC:

    $ uuu FB: flash bootloader <file>
  4. Change the boot source configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:

    ON
    1 2 3 4
  5. Power-cycle the board. The target now boots from the eMMC.

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 eMMC:

    => update uboot tftp <u-boot-filename>.bin
  5. Change the boot source configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:

    ON
    1 2 3 4
  6. Power-cycle the board. The target now boots from the eMMC.

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 eMMC:

    => update uboot mmc 1 fat <u-boot-filename>.bin
  4. Change the boot source configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:

    ON
    1 2 3 4
  5. Power-cycle the board. The target now boots from the eMMC.