IoTGateway/BSP/Android/User Guide 10.0.0 For i.MX8
Table of Contents
- Android BSP Version
- Introduction
- Setup Ubuntu Host Computer
- Docker Installation and Setup
- Run Docker Example
- Getting Android Source Code
- Building Android 10.0.0 Image for SD Card
- Burning Image
Android BSP Version
Android 10.0.0_r35
Introduction
This document describes how to work with the RISC and ELAA Android 10.0.0 Board Support Package (BSP) release. The BSP includes:
- Bootloaders
- Android Linux kernel and root file system
- Tools and documentation to ease the development, deployment, and execution of Android-based systems
Setup Ubuntu Host Computer
Required Equipment and Software
- Host OS: Ubuntu 18.04 LTS 64bit for Android build
- Disk Space: 130GB free disk space for build image
Install Ubuntu
IMPORTANT! You must be able to log in as root or use sudo to have root permissions during the installation.
- Go to Ubuntu Downloads
- Download 64-bit PC (AMD64) desktop image for installation
Docker Installation and Setup
If you don't have docker in your system, then you can follow the below steps to install docker and run it first.
To Install Docker Engine on Your Platform
Please refer to Docker Installation Guide for details.
To Pull Ubuntu 18.04 Image from Docker Hub
docker pull advrisc/u18.04-rk3399abv10
Run Docker Example
Step 1: Run Docker Container
$ docker run -it --name android_q10 -v /home/bsp/myandroid:/home/adv/BSP:rw advrisc/u18.04-rk3399abv10 /bin/bash
Step 2: Change User in Container
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP
Docker Environment Details
Please use docker environment to compile Android 10.0.0:
- Android Version: 10.0.0 Docker
- Image Repository:
advrisc/u18.04-rk3399abv10 - Image Tag: latest
Alternative Docker Commands:
# Pull Docker image
$ docker pull advrisc/u18.04-rk3399abv10
# Run Docker container
$ docker run --name imx8ABV10 -it advrisc/u18.04-rk3399abv10 /bin/bash
Getting Android Source Code
Related Version Information
- Android: 10.0.0_r35
- Kernel: Yocto-3.0
- U-Boot: Yocto-3.0
Step 1: Configure Git and Download Source
Configure Git user information:
$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
Create working directory and download source:
$ mkdir myandroid
$ mkdir bin
$ cd myandroid/
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ../bin/repo
$ chmod a+x ../bin/repo
$ ../bin/repo init -u https://gitlab.edgecenter.io/nxp/android-manifest.git -b q10.0.0_2.3.0-ga -m release_version.xml
$ ../bin/repo sync
Release Version XML Files:
- RSB3720: Use
RSB3720_Q10_AIV0002.xml
SSL Certificate Issues: If you encounter SSL certificate verification errors, use:
export GIT_SSL_NO_VERIFY=1 # 讓 Git Client 忽略 SSL 憑證檢查
Step 2: Apply Patches to Android Q10.0.0
$ cd ~/myandroid/vendor/nxp-opensource/uboot-imx/
$ patch -p1 < ../../../patches_android-10.0.0_r35/10001-Uboot_Yocto_5.4.24_2.1.0-to-android-10.0.0_r35.patch
$ cd ~/myandroid/vendor/nxp-opensource/kernel_imx/
$ patch -p1 < ../../../patches_android-10.0.0_r35/10001-Linux_Yocto_5.4.24_2.1.0-to-android-10.0.0_r35.patch
$ cd ~/myandroid
Building Android 10.0.0 Image for SD Card
For RSB-3720 products, the product name is rsb3720_a1
PRODUCT=rsb3720_a1
Build Instructions
1. Set Environment Variables
$ export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
$ export AARCH64_GCC_CROSS_COMPILE=/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-
2. Set Up Build Environment
This only configures the current terminal:
$ source build/envsetup.sh
3. Execute Android Lunch Command
For RSB-3720 devices:
$ lunch $PRODUCT-userdebug
4. Build Bootloader
$ ./imx-make.sh bootloader -j8
The files u-boot_crc.bin and u-boot_crc.bin.crc will be located in directory ./out/target/product/product_name
5. Build Kernel
$ ./imx-make.sh kernel -j8
6. Build Boot Image
$ ./imx-make.sh bootimage -j4
7. Build DTBO Image (Kernel Device Tree)
$ ./imx-make.sh dtboimage -j4
8. Build System Image
$ ./imx-make.sh -j8
Burning Image
SD Card Boot
Navigate to Built Image Directory
For Daily Build:
$ cd ~/image/
For Local Build:
$ cd ~/out/target/product/PRODUCT_NAME/
Flash Command for RSB-3720
$ sudo ./fsl-sdcard-partition.sh -super -f imx8mp /dev/sdX
Note: Replace X with your SD card device drive letter
Image from SD Card to eMMC Boot
Download and Extract Image Package
You can get Downloads package for images (e.g., RSB3720-androidQ10-AIV00XX-YYYYMMDD.tar.gz)
Prepare SD Card Image:
$ tar zxvf RSB3720-androidQ10-AIV00XX-YYYYMMDD.tar.gz # (extracts image/ and scripts/ directories)
$ cd scripts/
$ sudo ./mk-sdcard-mmc-partition.sh -super -f imx8mp /dev/sdX
Note: Replace X with your SD card device drive letter
Flash to eMMC from Running System
Start OS from SD Card, then on debug console, flash image to eMMC:
$ su
# cd /data/mkimage/scripts
# ./mk-emmc-mmc-partition.sh -super -f imx8mp /dev/block/mmcblk2
Supported Hardware Platforms
- RSB-3720: Industrial Single Board Computer with i.MX8M Plus processor
System Requirements Summary
- Ubuntu 18.04 LTS 64-bit
- Docker environment with
advrisc/u18.04-rk3399abv10image - 130GB free disk space
- ARM GCC 8.3 toolchain
- Java 8 OpenJDK
- Internet connection for source code download
- SD card for image deployment
- Target processors (RSB-3720)
Build Workflow Summary
- Environment Setup → Docker + Ubuntu 18.04
- Source Download → Git repo sync from NXP manifest
- Patch Application → Apply Android 10.0.0 patches
- Environment Configuration → Set Java, GCC paths
- Build Process → Bootloader → Kernel → Boot Image → DTBO → System
- Image Deployment → SD Card or eMMC flash