This section describes how to build Digi Embedded for Android firmware for your device. You have to build your own firmware images to customize them to meet the specific needs of your system. For instance:
-
You have designed a custom carrier board for a Digi embedded module and need to customize the U-Boot bootloader or Android kernel.
-
You need to customize the default Android root file system to add, remove, or modify software packages.
-
You want to integrate your application into Digi Embedded for Android so that it is built and included in the root file system.
Follow these steps to build your Android custom images based on Digi’s source code:
-
Set up your environment and install the sources. If you have not already done so, see Set up your development workstation and Install Digi Embedded for Android.
-
Change to the directory where the source code is installed.
$ cd dea-11.0-r2
-
Initialize the build environment:
$ source build/envsetup.sh
-
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.For more information about build types, go to Choosing a target. For development, use
userdebug
build type:$ lunch ccimx8xsbcpro-userdebug ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=11 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-4.15.0-142-generic-x86_64-Ubuntu-18.04.5-LTS HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=RP1A.201005.004 OUT_DIR=out PRODUCT_SOONG_NAMESPACES=device/generic/goldfish device/generic/goldfish-opengl external/mesa3d vendor/nxp-opensource/imx/power hardware/google/pixel vendor/partner_gms hardware/google/camera vendor/nxp-opensource/imx/camera ============================================ $
-
-
Build the kernel and U-Boot images
$ ./imx-make.sh bootloader kernel -j<Number_Of_Jobs>
The command make
can handle parallel tasks with a-jN
argument, and it’s common to use a number of tasksN
that’s between 1 and 2 times the number of hardware threads on the computer used for the build. -
Use
m
to build the Android images.-
To build the complete Android firmware, execute:
$ m -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 m
command. -
To only build the boot image, execute:
$ m -j<Number_Of_Jobs> bootimage
The command m
can handle parallel tasks with a-jN
argument, and it’s common to use a number of tasksN
that’s between 1 and 2 times the number of hardware threads on the computer used for the build.
-
-
Once the build process finishes, check that the resulting images are inside the
dea-11.0-r2
sources directory atout/target/product/ccimx8xsbcpro
. List them with the following command:$ ls -lh out/target/product/ccimx8xsbcpro/
For more information about Android build system, see https://source.android.com/setup/build
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. |