Table 5. Android system image production build method 2
i.MX development tool
Description
Lunch configuration
Evaluation Kit
i.MX 8M Nano EVK
evk_8mn-userdebug
Evaluation Kit
i.MX 8QuadXPlus MEK
mek_8q-userdebug
For more Android platform building information, see
source.android.com/source/building.html
3.2.3 Building with GMS package
Get the Google Mobile Services (GMS) package from Google. Put the GMS package into
${MY_ANDROID}/vendor/partner_gms
folder. Make sure that the product.mk* file includes the following line:
$(call inherit-product-if-exists, vendor/partner_gms/products/gms.mk)
Then build the images. The GMS package is installed into the target images.
product.mk
indicates the build target make file. For example, for i.MX 8M Nano EVK Board, the
product.mk
is named
device/fsl/imx8m/evk_8mn/evk_8mn.mk
.
NOTE
3.3 Building U-Boot images
Use the following command to generate
u-boot.imx
under the Android environment:
# U-Boot image for i.MX 8M Nano board
$ cd ${MY_ANDROID}
$ source build/envsetup.sh
$ lunch evk_8mn-userdebug
$ make bootloader -j4
For other platforms, use
lunch <buildName-buildType>
to set up the build configuration. For detailed build configuration, see
Section 3.2 "Building Android images".
3.4 Building a kernel image
Kernel image is automatically built when building the Android root file system.
The following are the default Android build commands to build the kernel image:
$ cd ${MY_ANDROID}/vendor/nxp-opensource/kernel-imx
$ echo $ARCH && echo $CROSS_COMPILE
Make sure that you have those two environment variables set. If the two variables are not set, set them as follows:
$ export ARCH=arm64
$ export CROSS_COMPILE=${MY_ANDROID}/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/
aarch64-linux-android-
# Generate ".config" according to default config file under arch/arm64/configs/android_defconfig.
# to build the kernel Image for i.MX 8M Nano EVK and i.MX 8QuadXPlus MEK.
$ make android_defconfig
$ make KCFLAGS=-mno-android
The kernel images are found in ${MY_ANDROID}/out/target/product/evk_8mm/obj/KERNEL_OBJ/arch/arm64/boot/Image.
NXP Semiconductors
Building the Android platform for i.MX
Android
™
User's Guide, Rev. P9.0.0_2.3.2, 6 March 2020
User's Guide
6 / 31