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

For a closed device, the recommended method is Program images with install_android_fw_uuu script.

Program images with install_android_fw_uuu script

Requirements

  • Root/administrator permissions on your development computer.

  • Serial console cable.

  • A micro USB cable.

Instructions

  1. Download resources.

    1. Download the firmware images from https://ftp1.digi.com/support/android/11.0/r2/images/ccimx8mmdvk-installer.zip.

      Decompress ccimx8mmdvk-installer.zip in a directory of your choice.

      For a closed device, use your custom release images and the signed bootloader images:

      • u-boot-ccimx8mmdvk-signed.imx

      • u-boot-ccimx8mmdvk-trusty-signed.imx

    2. Download NXP UUU (Universal Update Utility) tool:

      1. Download the latest Universal Update Utility (UUU), a software tool from NXP.

      2. Place the uuu executable in a directory in your PATH, such as /usr/bin.

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

        $ sudo sh -c "uuu -udev >> /etc/udev/rules.d/99-uuu.rules"
        $ sudo udevadm control --reload-rules
  2. Connect the micro USB cable to the USB recovery of the board (top side, next to the USB host connectors) and the other end to the development computer.

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

    • S1.1: ON

    • S1.2: ON

    • S1.3: N/A

    • S1:4: N/A

  4. Reset the device by pressing the Reset button on the board.

  5. Program images:

    1. On your development PC, change to the directory where the images are uncompressed:

      $ cd <zip-folder>
    2. Execute the install_android_fw_uuu.sh script.

      Find the script inside /usr/local/dea-11.0-r2/device/digi/common/tools.

      $ /usr/local/dea-11.0-r2/device/digi/common/tools/install_android_fw_uuu.sh first-deploy \
        -u u-boot-ccimx8mmdvk.imx

      For a closed device, use the signed bootloader images. See 5. Sign the bootloader images.

      $ /usr/local/dea-11.0-r2/device/digi/common/tools/install_android_fw_uuu.sh tf-deploy
        -lu u-boot-ccimx8mmdvk-signed.imx \
        -u u-boot-ccimx8mmdvk-trusty-signed.imx
  6. Boot from the internal eMMC.

    1. Change the boot mode configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:

      • S1.1: OFF

      • S1.2: OFF

      • S1.3: OFF

      • S1:4: OFF

  7. Remove the micro USB cable from the target USB recovery connector.

  8. Reset the device by pressing the Reset button on the board.

The first Android boot takes several minutes due to system deployment.

Perform a rescue boot

You can perform one of the following rescue boots:

Boot U-Boot in USB debug mode

Requirements

  • Root/administrator permissions on your development computer.

  • Serial console cable.

  • A micro USB cable.

Instructions

  1. Download resources.

    1. Download the U-Boot bootloader binary image file from https://ftp1.digi.com/support/android/11.0/r2/images/ccimx8mmdvk/

      See U-Boot files by variant to verify which U-Boot binary you need.
    2. Download NXP UUU (Universal Update Utility) tool:

      1. Download the latest Universal Update Utility (UUU), a software tool from NXP.

      2. Place the uuu executable in a directory in your PATH, such as /usr/bin.

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

        $ sudo sh -c "uuu -udev >> /etc/udev/rules.d/99-uuu.rules"
        $ sudo udevadm control --reload-rules
  2. Boot from the USB.

    1. Connect the micro USB cable to the USB recovery of the board (top side, next to the USB host connectors) and the other end to the development computer.

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

      • S1.1: ON

      • S1.2: ON

      • S1.3: N/A

      • S1:4: N/A

    3. Open a serial terminal at 115200/8/n/1.

    4. Power up the board.

    5. 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>

      For a closed device, use a signed bootloader file without Trusty u-boot-ccimx8mmdvk-signed.imx to recover from USB.

      The serial terminal shows the device starting U-Boot.

  3. 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 U-Boot from the microSD card

Requirements

  • Root/administrator permissions in your development computer

  • A microSD card with a minimum capacity of 2 GB

The following procedure will destroy existing data in the microSD card.

Instructions

  1. Create a bootable microSD card.

    1. Download the U-Boot bootloader binary image file from https://ftp1.digi.com/support/android/11.0/r2/images/ccimx8mmdvk/

      See U-Boot files by variant to verify which U-Boot binary you need.
    2. Copy the U-Boot file into a folder of your choice.

    3. Insert the microSD card into your computer and check the node Linux assigns to it (/dev/<sdcard>) using dmesg:

      $ dmesg
      [1413652.901270] sd 41:0:0:0: [sdc] 7744512 512-byte logical blocks: (3.96 GB/3.69 GiB)
      [1413652.903140] sd 41:0:0:0: [sdc] No Caching mode page present
      [1413652.903144] sd 41:0:0:0: [sdc] Assuming drive cache: write through
      [1413652.905638] sd 41:0:0:0: [sdc] No Caching mode page present
      [1413652.905642] sd 41:0:0:0: [sdc] Assuming drive cache: write through
      [1413652.915154] sdc: sdc1

      Do not mount any partitions the card might contain (or unmount any partition if automatically mounted), as you will be writing to the entire block device.

      Using an incorrect device node in the next step might destroy all data on your computer hard drive.
    4. Raw write the image file to the microSD card with this command:

      $ sudo dd if=<path/filename.imx> of=/dev/<sdcard> bs=1k seek=33 oflag=sync
      • <path/filename.imx> must be substituted with the path and filename to the U-Boot image.

      • <sdcard> must be substituted with the device node that Linux assigns to your microSD card.

      The microSD card is now ready.

  2. Boot from the microSD card.

    1. Power off the device.

    2. Insert the microSD card into the microSD card holder.

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

      • S1.1: OFF

      • S1.2: ON

      • S1.3: ON

      • S1:4: N/A

    4. Power on the device.

  3. 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 using one of these methods:

Re-program bootloader from USB (fastboot)

  1. Update the U-Boot image:

    1. Enter U-Boot fastboot mode:

      1. Unlock fastboot:

        => env set skip-fblock-check yes
      2. Start the fastboot mode in U-Boot:

        => fastboot 0
    2. On your development computer, execute the following command to update the U-Boot image:

      $ fastboot flash bootloader u-boot-ccimx8mmdvk.imx
    3. Configure the partition of the eMMC to hold Android images by executing the following command on your development computer:

      $ fastboot flash gpt <partition-table.img>
    4. Change the boot mode configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:

      • S1.1: OFF

      • S1.2: OFF

      • S1.3: OFF

      • S1:4: OFF

    5. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

    6. Reset the U-Boot environment to default values. (This will not reset protected variables like the MAC address). To do so, issue this command:

      => env default -a
    7. Save the U-Boot environment to apply the default configuration.

      => env save
  2. Power-cycle the board. The target now boots from the eMMC.

Re-program bootloader from Ethernet (TFTP)

  1. Place the U-Boot binary inside your host computer TFTP exported folder.

  2. Connect an Ethernet cable to the Ethernet port.

  3. On the target, configure the network settings of the device by doing one of the following:

    • Get a dynamic IP address from a DHCP server by running the following commands:

      => setenv autoload no
      => dhcp
    • Configure a static IP address, where a.b.c.d is the IP address of your device:

      => setenv ipaddr a.b.c.d
  4. Configure the IP address of the machine where the TFTP server is running and save the configuration as follows, where w.x.y.z is your machine IP address where the TFTP server is running:

    => setenv serverip w.x.y.z
    => env save
  5. Update the U-Boot image:

    1. Execute the following command to update the U-Boot image into the eMMC:

      => update uboot tftp u-boot-ccimx8mmdvk.imx
    2. Change the boot mode configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:

      • S1.1: OFF

      • S1.2: OFF

      • S1.3: OFF

      • S1:4: OFF

    3. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

    4. Reset the U-Boot environment to default values (this will not reset protected variables like the MAC address). To do so, issue this command:

      => env default -a
    5. Save the U-Boot environment to apply the default configuration.

      => env save
  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. Update the U-Boot image:

    1. Run the following command to update U-Boot into the eMMC:

      => update uboot mmc 1 u-boot-ccimx8mmdvk.imx
    2. Change the boot mode configuration to boot from the internal eMMC. To do so, set the boot mode micro-switches as follows:

      • S1.1: OFF

      • S1.2: OFF

      • S1.3: OFF

      • S1:4: OFF

    3. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

    4. Reset the U-Boot environment to default values (this will not reset protected variables like the MAC address). To do so, issue this command:

      => env default -a
    5. Save the U-Boot environment to apply the default configuration.

      => env save
  3. Power-cycle the board. The target now boots from the eMMC.