Follow these steps to build your Android custom images based on Digi’s source code:

  1. Set up your environment and install the sources. If you have not already done so, see Set up your development computer and Install Digi Embedded for Android.

  2. Change to the directory where the source code is installed.

    $ cd dea-9.0-r3
  3. Initialize the build environment:

    $ source build/envsetup.sh
  4. Select a ConnectCore 8X target to build:

    • ccimx8xsbcpro-user creates images with no root access, suitable for production.

    • ccimx8xsbcpro-userdebug like user images but with root access and debug capability.

      Information about the selected target is displayed:

      $ lunch ccimx8xsbcpro-userdebug
      
      ============================================
      PLATFORM_VERSION_CODENAME=REL
      PLATFORM_VERSION=9
      TARGET_PRODUCT=ccimx8xsbcpro
      TARGET_BUILD_VARIANT=userdebug
      TARGET_BUILD_TYPE=release
      TARGET_ARCH=arm64
      TARGET_ARCH_VARIANT=armv8-a
      TARGET_CPU_VARIANT=cortex-a53
      TARGET_2ND_ARCH=arm
      TARGET_2ND_ARCH_VARIANT=armv7-a-neon
      TARGET_2ND_CPU_VARIANT=cortex-a9
      HOST_ARCH=x86_64
      HOST_2ND_ARCH=x86
      HOST_OS=linux
      HOST_OS_EXTRA=Linux-5.0.0-32-generic-x86_64-Ubuntu-18.04.3-LTS
      HOST_CROSS_OS=windows
      HOST_CROSS_ARCH=x86
      HOST_CROSS_2ND_ARCH=x86_64
      HOST_BUILD_TYPE=release
      BUILD_ID=dea-9.0-r3.1
      OUT_DIR=out
      ============================================
      $
  5. Use make to build the Android images.

    • To build the complete Android firmware, execute:

      $ make -j<Number_Of_Jobs>
      Building Android can take several hours, depending mainly on the number of CPUs of the development machine and the parallelization level used in the make command.
    • To only build the bootloader image, execute:

      $ make -j<Number_Of_Jobs> bootloader
    • To only build the boot image, execute:

      $ make -j<Number_Of_Jobs> bootimage
      The command make can handle parallel tasks with a -jN argument, and it’s common to use a number of tasks N that’s between 1 and 2 times the number of hardware threads on the computer used for the build.
  6. Once the build process finishes, check that the resulting images are inside the dea-9.0-r3 sources directory at out/target/product/ccimx8xsbcpro. List them with the following command:

    $ ls -lh out/target/product/ccimx8xsbcpro/

To program generated development images into your ConnectCore 8X, follow the steps in Program firmware.

The images generated during this process are suitable for development. When you prepare for release, you must generate the proper images. See Generate release custom images.