During development process, you would typically use plain
m with no particular target to compile Android sources.
(See Build your development images.)
However, when you prepare for release, you must use the target
dist to generate the proper release images.
To do so, follow these steps:
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-usercreates images with no root access, suitable for production.
ccimx8xsbcpro-userdebuglike user images but with root access and debug capability.
For more information about build types, go to Choosing a target.
For production, use
$ lunch ccimx8xsbcpro-user ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=11 TARGET_PRODUCT=ccimx8xsbcpro TARGET_BUILD_VARIANT=user 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>
makecan handle parallel tasks with a
-jNargument, and it’s common to use a number of tasks
Nthat’s between 1 and 2 times the number of hardware threads on the computer used for the build.
This generates several artifacts inside the
out/target/product/ccimx8xsbcprofolder of the
dea-11.0-r2directory. The bootloader images are required to program your device:
u-boot-ccimx8xsbcpro2GB-<variant>.imx: Bootloader image without Trusty.
u-boot-ccimx8xsbcpro2GB-<variant>-trusty.imx: Bootloader image with Trusty. See Secure boot.
disttarget to generate the release images:
$ make -j<Number_Of_Jobs> dist
It compiles the whole source tree, as a plain
makedoes. Then it generates several zip files inside the
out/distfolder of the
ccimx8xsbcpro-target_files-<build_id>.zipcontains all the target files (apk, binaries, libraries, etc.) that will go into the final release package.
You will use this file later on to get privately signed artifacts. The next step is to Sign for release.
ccimx8xsbcpro-ota-<build_id>.zipis an OTA update package that can be installed through recovery. It is a full update package with all the files needed by system, boot, vendor, and recovery partition.
You can use it during testing or development, but not as a final distributable artifact as it is signed with non-private keys.
ccimx8xsbcpro-apps-<build_id>.zipcontains all the apks.
ccimx8xsbcpro-img-<build_id>.zipcontains image files
The images inside are using test-keys, use them only for development purposes.
ccimx8xsbcpro-symbols-<build_id>.zipcontains all files in
All these files are signed using test-keys. These keys are insecure because they are distributed with the code. For this reason, these generated files should not be use for production.
You must sign the