RSB3720
Android 15 Image Development
Host requirements:
- Ubuntu (supports all versions)
- Minimum 300 GB of free disk space
- Minimum 16 GB RAM
- Internet connection (for source downloads and dependencies)
Docker Setup:
1. Install using apt repository
- Follow the commands below to set up the docker apt repository.
$ sudo apt-get update
$ sudo apt-get install ca-certificates curl
$ sudo install -m 0755 -d /etc/apt/keyrings
$ sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
$ sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add docker apt repository (uses shell expansion)
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
(. /etc/os-release && echo \"${UBUNTU_CODENAME:-$VERSION_CODENAME}\") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
$ sudo apt-get update
2. Install the Docker packages
- Enter the command below to install the docker packages.
$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
3. Verify installation with hello-world
- Run the following to verify the installation:
$ sudo docker run hello-world
Download Android 15 Source Code:
- Pull the Docker container for the RSB-3720 board (pre-installed with dependencies):
$ docker pull ainrisc/u24.04-rsb3720a15
- Run the docker container (replace the host path as needed):
$ sudo docker run --privileged -it --name android_R15 -v /home/your-name/myandroid:/home/adv/BSP:rw ainrisc/u24.04-rsb3720a15 /bin/bash
(Note: Replace /home/your-name/myandroid with the path to the local directory you want to mount into the container. This directory will be accessible inside the container at /home/adv/BSP.)
- Enter the commands below inside the container to download the Android 15 source code:
$ mkdir bin
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ../bin/repo
$ mkdir imx8_android_R15
$ cd imx8_android_R15
# Configure git
$ git config --global user.name "Your Name"
$ git config --global user.email you@example.com
$ git config --global http.postBuffer 5242880000
$ git config --global http.maxRequestBuffer 100M
$ git config --global core.compression 0
$ chmod 777 ~/BSP/bin/repo
$ ../bin/repo init -u https://dev.azure.com/AIN-SW/RISC-IMX-Android-15/_git/RISC-IMX-Android-15 -b imx-android-15 -m imx-android-15.0.0_1.2.0.xml
$ ../bin/repo sync
Building Android 15 Image
- Set up the environment for building (run these in the build shell):
$ export AARCH64_GCC_CROSS_COMPILE=/opt/arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
$ export CLANG_PATH=/opt/prebuilt-android-clang/
$ source build/envsetup.sh
$ git config --global --add safe.directory '*'
$ cp -r /opt/dependencies/* vendor/nxp/
$ cp /opt/dependencies/SCR* .
$ cp /opt/dependencies/EULA.txt .
- Execute the Android lunch command:
$ lunch rsb3720_a1-advantech-userdebug
- Execute the imx-make.sh script to generate the image (parallelized):
$ ./imx-make.sh -j$(nproc)
Flashing the image to SD-card
- After building, the generated image files are in the out directory. To navigate to the output directory:
$ cd out/target/product/rsb3720_a1/
- Insert the SD card into your PC and format it (e.g., FAT32). To list storage devices:
$ lsblk
- Replace sdx with the device name for your SD card and run the flashing script:
$ sudo ./imx-sdcard-partition.sh -f imx8mp /dev/sdx
- After successfully flashing the image to the SD card, insert it into the RSB-3720 board. Set boot switches 1 and 2 to the ON position.