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.

To flash the Android firmware from U-Boot, you must program a kernel (boot.img), a recovery boot image (recovery.img), a vendor image (vendor.img), and a root file system image (system.img) in the device’s eMMC. You can program the firmware from either TFTP or microSD.

Update firmware from TFTP

U-Boot bootloader allows you to update the firmware of your device over Ethernet. U-Boot uses the TFTP protocol to get the firmware images from a TFTP server running in your computer and program them into the eMMC of the device.

This update process requires a TFTP server running in your computer with a configured exposed folder. The devices look for the firmware files in this folder when performing the update. These instructions do not include setting up a TFTP server in your computer. We assume you have already installed and configured a TFTP server.

Once you have the TFTP server running in your computer, you can start the update process:

  1. Get the firmware images:

    • <u-boot-filename>.imx for your hardware variant. See Hardware variants.

    • boot.img

    • recovery.img

    • vendor.img

    • system.img

    1. After building the development firmware, you can find the image files inside the out/target/product/ccimx8xsbcpro directory. See Build development firmware for more information about building the Android system.

    2. Already signed images with your release keys. See Generate release custom images.

    3. You can download Digi-provided pre-built images from:

  2. Copy the Android images (previously downloaded or compiled) in your TFTP server’s exposed folder (typically /tftpboot).

  3. Connect the board to your host computer. See Step 2 - Set up the hardware for instructions.

  4. Open a serial connection to the serial port to which the device is connected. Use the following settings:

    • Port: Serial port to which your device is attached

    • Baud rate: 115200

    • Data Bits: 8

    • Parity: None

    • Stop Bits: 1

    • Flow control: None

  5. 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 dub-2018.03-r1.3 (May 06 2019 - 00:13:13 +0200)
    
    CPU:   Freescale i.MX8QXP revB A35 at 1200 MHz at 49C
    DRAM:  2 GiB
    MCA:   HW_VER=1  FW_VER=0.12
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    In:    serial
    Out:   serial
    Err:   serial
    Model: Digi International ConnectCore 8X SBC Pro Board.
    ConnectCore 8X SOM variant 0x02: Automotive QuadXPlus 1.2GHz, 16GB eMMC, 2GB LPDDR4, -40/+85C, Wireless, Bluetooth
    Board: ConnectCore 8X SBC Pro, version 2, ID 135
    Boot:  MMC0
    
     BuildInfo:
      - SCFW 65afe5f6, SECO-FW 9d71fd5b, IMX-MKIMAGE 19b9d9b6, ATF d6451cc
      - U-Boot dub-2018.03-r1.3
    
    flash target is MMC:0
    Net:   eth0: ethernet@5b040000 [PRIME], eth1: ethernet@5b050000
    Fastboot: Normal
    Hit any key to stop autoboot:  0
    =>
  6. 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
  7. 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
  8. Update the U-Boot image (optional):

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

      => update uboot tftp <u-boot-filename>.imx
    2. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

    3. 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
    4. Configure the network and TFTP settings on your device again and save the configuration.

      => setenv ipaddr a.b.c.d
      => setenv serverip w.x.y.z
      => env save
  9. Configure the partition of the eMMC for holding Android images by running these commands:

    => setenv mmcdev 0
    => run partition_mmc_android
  10. Update the boot image by executing this command:

    => update boot tftp boot.img
  11. Update the vendor image by issuing this command:

    => update vendor tftp vendor.img
  12. Update the Android file system image by issuing this command:

    => update system tftp system.img
  13. Update the recovery image by executing this command:

    => update recovery tftp recovery.img
  14. You can format the data and cache partitions or directly boot the new firmware:

    • To clean the data and cache partitions, enter these commands in U-Boot:

      => setenv boot_recovery yes
      => setenv recovery_command recovery --wipe_data
      => saveenv
      => reset

      The above process will boot your device into recovery mode, will format the cache and data partitions and will reboot your device.

    • If data and cache partitions are already formatted or you want to preserve their contents, boot the device with the firmware you have just programmed:

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

Update firmware from microSD

If you do not have a TFTP server, you can still program Android in your device using a microSD card. The microSD card must be FAT formatted.

Your microSD card must have at least 2 GB of capacity.

To program Android from the microSD card:

  1. Get the firmware images:

    • <u-boot-filename>.imx for your hardware variant. See Hardware variants.

    • boot.img

    • recovery.img

    • vendor.img

    • system.img

    1. After building the development firmware, you can find the image files inside the out/target/product/ccimx8xsbcpro directory. See Build development firmware for more information about building the Android system.

    2. Already signed images with your release keys. See Generate release custom images.

    3. You can download Digi-provided pre-built images from:

  2. Place the images in the root of the FAT formatted microSD card.

  3. Power off the device.

  4. Insert the microSD card in the microSD socket of the device.

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

    • BOOT.1 OFF

    • BOOT.2 OFF

      eMMC boot
  6. Connect the board to your host computer. See Step 2 - Set up the hardware for instructions.

  7. Open a serial connection to the serial port to which the device is connected. Use the following settings:

    • Port: Serial port to which your device is attached

    • Baud rate: 115200

    • Data Bits: 8

    • Parity: None

    • Stop Bits: 1

    • Flow control: None

  8. 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 dub-2018.03-r1.3 (May 06 2019 - 00:13:13 +0200)
    
    CPU:   Freescale i.MX8QXP revB A35 at 1200 MHz at 49C
    DRAM:  2 GiB
    MCA:   HW_VER=1  FW_VER=0.12
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    In:    serial
    Out:   serial
    Err:   serial
    Model: Digi International ConnectCore 8X SBC Pro Board.
    ConnectCore 8X SOM variant 0x02: Automotive QuadXPlus 1.2GHz, 16GB eMMC, 2GB LPDDR4, -40/+85C, Wireless, Bluetooth
    Board: ConnectCore 8X SBC Pro, version 2, ID 135
    Boot:  MMC0
    
     BuildInfo:
      - SCFW 65afe5f6, SECO-FW 9d71fd5b, IMX-MKIMAGE 19b9d9b6, ATF d6451cc
      - U-Boot dub-2018.03-r1.3
    
    flash target is MMC:0
    Net:   eth0: ethernet@5b040000 [PRIME], eth1: ethernet@5b050000
    Fastboot: Normal
    Hit any key to stop autoboot:  0
    =>
  9. Update the U-Boot image (optional):

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

      => update uboot mmc 1 fat <u-boot-filename>.imx
    2. Reset the board to boot into the recently updated U-Boot, and press any key to stop the autoboot process.

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

      => env save
  10. Configure the partition table of the eMMC to hold Android images by executing these commands:

    => setenv mmcdev 0
    => run partition_mmc_android
  11. Update the boot image by executing this command:

    => update boot mmc {sdcard-index} fat boot.img
  12. Update the vendor image by issuing this command:

    => update vendor mmc {sdcard-index} fat vendor.img
  13. Update the Android file system image by issuing this command:

    => update system mmc {sdcard-index} fat system.img
  14. Update the recovery image by executing this command:

    => update recovery mmc {sdcard-index} fat recovery.img
  15. You can format the data and cache partitions or directly boot the new firmware:

    • To clean the data and cache partitions, enter these commands in U-Boot:

      => setenv boot_recovery yes
      => setenv recovery_command recovery --wipe_data
      => saveenv
      => reset

      The above process will boot your device into recovery mode, will format the cache and data partitions and will reboot your device.

    • If data and cache partitions are already formatted or you want to preserve their contents, boot the device with the firmware you have just programmed:

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