Fastboot is a protocol for communication between your device and a computer. It allows you to modify file system images over a USB connection, which is a quick way to update firmware during development. Fastboot requires the USB interface to work as 'device'.

Once you have generated the images, you can use them to update your Android system from U-Boot. This process is recommended to:

If your device is not booting U-Boot see Recover your device.

Follow these steps to update eMMC partitions:

1. Set up your computer

To use fastboot on your development computer, install the fastboot tool and add the udev rules in your system.

  1. Install the fastboot tool.

    The fastboot tool is generated at out/host/linux-x86/bin/fastboot in the development machine when building the Android images (see Build your development images). To avoid building full images to get this tool, you can:

  2. Add a udev rule for the USB.

    User must be part of the plugdev group to use fastboot. Create a new /etc/udev/rules.d/51-android.rules file with the following contents:

    /etc/udev/rules.d/51-android.rules
    SUBSYSTEM=="usb", ATTR{idVendor}=="0525", ATTRS{idProduct}=="a4a5", MODE="0666", GROUP="plugdev"
  3. Reload and trigger the udev rules.

    Reboot your system or well reload the udev rules without rebooting your PC with the following commands:

    $ sudo udevadm control --reload
    $ sudo udevadm trigger

2. Obtain the firmware image files

The list of files built by Digi Embedded for Android is:

  • u-boot-ccimx8mmdvk.imx. See U-Boot files by variant to select the appropriate file for your hardware variant.

  • partition-table.img

  • dtbo-imx8mm.img

  • boot.img

  • vendor_boot.img

  • vbmeta-imx8mm.img

  • super.img

These image files can be:

3. Establish a serial connection with your device

  1. Connect a microAB USB cable (not included) to the USB CONSOLE connector on the board and to your host computer.

  2. Connect a micro USB cable to your development PC and the other end to the target USB recovery connector. See Step 2 - Set up the hardware for instructions.

  3. Open a serial connection with the device. You can use any serial terminal program such as Tera Term, Minicom, CoolTerm, or HyperTerminal.

    PuTTY terminal program is not recommended due to an incompatibility with the USB/serial driver.

    Open a serial connection with the following settings:

    Parameter Value

    Port

    Serial port where the device is connected

    Baud rate

    115200

    Data bits

    8

    Parity

    None

    Stop bits

    1

    Flow control

    None

4. Update firmware with fastboot

You can program the Android system of your device with fastboot. It updates all device partitions and then reboots the device.

  1. Reset the device (press the Reset button on the board) and immediately press a key in the serial terminal to stop the auto-boot process. You will be stopped at the U-Boot bootloader prompt:

    U-Boot SPL dub-2020.04-r3.1-git-00114-g909871f6fff7-dirty (Feb 11 2021 - 16:54:47 +0100)
    DDRINFO: start DRAM init
    DDRINFO: DRAM rate 3000MTS
    DDRINFO:ddrphy calibration done
    DDRINFO: ddrmix config done
    Normal Boot
    Trying to boot from MMC2
    
    
    U-Boot dub-2020.04-r3.1-git-00114-g909871f6fff7-dirty (Feb 11 2021 - 16:54:47 +0100)
    
    CPU:   i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
    CPU:   Industrial temperature grade (-40C to 105C) at 32C
    Reset cause: POR
    DRAM:  2 GiB
    MCA:   HW_VER=1  FW_VER=1.00
    MMC:   FSL_SDHC: 1, FSL_SDHC: 0
    In:    serial
    Out:   serial
    Err:   serial
    Model: Digi ConnectCore 8M Mini Development Kit
    ConnectCore 8M Mini SOM variant 0x03: 2 GiB LPDDR4, Wi-Fi, Bluetooth, MCA, Crypto-auth
      Board version 3, ID undefined
    Boot:  MMC2
    
     BuildInfo:
      - ATF a7f57f3
      - U-Boot dub-2020.04-r3.1-git-00114-g909871f6fff7-dirty
    
    flash target is MMC:0
    Net:   eth0: ethernet@30be0000
    Fastboot: Normal
    Normal Boot
    Hit any key to stop autoboot:  0
    => 
  2. Update the U-Boot image (optional):

    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. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

    5. 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
    6. Save the U-Boot environment to apply the default configuration.

      => env save
  3. Enter U-Boot fastboot mode:

    1. Unlock fastboot:

      => env set skip-fblock-check yes
      => env save
      Digi recommends to remove skip-fblock-check U-Boot variable once the program process finishes.
    2. Start the fastboot mode in U-Boot:

      => fastboot 0
  4. Update the Android firmware images.

    While developing, new images are in your out/target/product/ccimx8mmdvk directory after a build. You can program them in the device by issuing fastboot in your development computer:

    $ fastboot --slot all flashall

    The -w option wipes userdata.

    $ fastboot -w --slot all flashall
    1. Program individual partitions one by one with the command:

      $ fastboot flash <partition_name> <path_to_pre-built-image>
      $ fastboot flash dtbo_a dtbo-imx8mm.img
      $ fastboot flash dtbo_b dtbo-imx8mm.img
      $ fastboot flash boot_a boot.img
      $ fastboot flash boot_b boot.img
      $ fastboot flash vendor_boot_a vendor_boot.img
      $ fastboot flash vendor_boot_b vendor_boot.img
      $ fastboot flash vbmeta_a vbmeta-imx8mm.img
      $ fastboot flash vbmeta_b vbmeta-imx8mm.img
      $ fastboot flash super super.img
    2. You can wipe userdata with:

      $ fastboot -w

    If you already have signed images (see Generate release custom images), you can load them with the following command:

    $ fastboot update signed-img.zip
  5. After flashing boot, dtbo, vbmeta, and vendor_boot partitions, the target is rebooted into fastboot. While fastboot is waiting in your host computer, remove the micro USB cable from the target USB recovery connector, and connect it to the USB Host connector (next to the microSD socket) of the board.

  6. If required, reboot the device using fastboot.

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