Android 15.0.0_1.2.0 Developer Guide¶
Introduction¶
This page explains how to build and deploy Android Android 15 on the DART-MX8M-PLUS.
This release is based on NXP's i.MX android-15.0.0_1.2.0 release.
For additional details about this release, refer to the Release Notes.
Overview¶
The objective of this document is to guide DART-MX8M-PLUS Android developers to obtain Android Android 15 sources, setting up host environment, compilation, and deployment.
This document contains instructions for:
- Hardware and software requirements.
- Setup the hardware.
- Setup the toolchain.
- Download & build the sources.
- Install the binaries on the DART-MX8M-PLUS SOM and variants.
Hardware Requirements¶
You will need the Variscite DART-MX8M-PLUS based evaluation kit.
Host (PC) setup requirements¶
The host development environment for Android is based on Ubuntu, please install one of the following Ubuntu versions:
- Ubuntu 20.04/22.04/24.04 64bit LTS http://www.ubuntu.com/download/desktop
If you are running Linux in a virtual machine you need at least 16GB of RAM and 32 GB of swap.
The build process requires ~250GB of free storage space. Before starting a build, make sure you have adequate free space available.
Note: Do not use other Ubuntu releases other than the ones recommended above. Variscite provides Docker containers that can be used for a development environment as an alternative to using a virtual machine or a dedicated computer.
To learn more, please see Variscite's Docker Build Environment guide.
Windows with WSL/WSL2 is not supported for Android BSP
Install required packages on host PC¶
Then, install the following packages:
$ sudo apt-get install python3 python3-pip python3-pexpect \
python3-git python3-jinja2 python3-subunit python3-git liblz4-tool \
python3-jinja2 python3-subunit curl zstd
For Ubuntu 20.04 and earlier, install python2:
Starting in Ubuntu 22.04, python2 is no longer available. Install the following to create a symbolic link from python to python3:
Ubuntu 24.04 introduced additional unprivileged user namespace restrictions. They must be disabled to avoid permission errors during Yocto fetch tasks when using Variscite's docker container.
Disable this restriction on the entire system for one boot:
Alternatively, disable this restriction using a persistent setting by adding a new file (/etc/sysctl.d/60-apparmor-namespace.conf) with the following contents:
$ echo 'kernel.apparmor_restrict_unprivileged_userns=0' | sudo tee /etc/sysctl.d/60-apparmor-namespace.conf
$ sudo sysctl -p /etc/sysctl.d/60-apparmor-namespace.conf
Install Docker:
Give permissions to run Docker without sudo:
Configure git user and email:
Obtain source code¶
Variscite's Linux kernel and U-Boot are available through Github.
Required patches for the Android file system are under Variscite's FTP
Files:
- imx-android-15.0.0_1.2.0.tar.gz - NXP's Android 15.0.0_1.2.0 original BSP patch files.
Get NXP's Android Release Package¶
$ mkdir ~/var_imx-android-15.0.0_1.2.0
$ cd ~/var_imx-android-15.0.0_1.2.0
$ curl -o ~/Downloads/imx-android-15.0.0_1.2.0.tar.gz https://variscite-public.nyc3.cdn.digitaloceanspaces.com/Android/Android_iMX8_1500_120/imx-android-15.0.0_1.2.0.tar.gz
$ tar xvf ~/Downloads/imx-android-15.0.0_1.2.0.tar.gz
Sync Android Source¶
$ mkdir -p ~/bin
$ curl -o ~/bin/repo https://commondatastorage.googleapis.com/git-repo-downloads/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH
$ cd ~/var_imx-android-15.0.0_1.2.0
$ source imx-android-15.0.0_1.2.0/imx_android_setup.sh
Note: Wait for the script to finish running, and it should create following folders
$ ~/var_imx-android-15.0.0_1.2.0/android_build/device/variscite/
$ ~/var_imx-android-15.0.0_1.2.0/android_build/vendor/variscite/kernel_imx and
$ ~/var_imx-android-15.0.0_1.2.0/android_build/vendor/variscite/uboot-imx
Apply Variscite's i.MX platforms patches¶
Build Android Images¶
Start a Ubuntu Docker container:
$ cd ~/var_imx-android-15.0.0_1.2.0/android_build/
$ ./var-start-container.sh
Note: After Ubuntu Docker container is started you can see the shell prompt similar to: vari@20-04-3b61eb74-android-15-0-0_1-2-0$
All references to commands without this prompt should be executed in a native terminal (outside Docker). If you need to run a command using 'sudo' inside the container, the default password is ubuntu.
Change to Android top level directory.
or
Note: userdebug build creates a debuggable version of Android.Development mode enable and development tools are available on target.
user build creates a production version of Android.
Switching from eMMC build to SD card build and vice versa¶
Unlike previous Android BSPs, the boot media is autodetected at boot time.
Build Android¶
The build command depends on your SOM version:
For DART-MX8M-PLUS/VAR-SOM-MX8M-PLUS V1.x SOMs:
For DART-MX8M-PLUS/VAR-SOM-MX8M-PLUS V2.x SOMs:
Images created by the Android build¶
The resulted images are located in out/target/product/dart_mx8mp.
|
Image
|
Description
|
|---|---|
| spl-imx8mp-var-dart-dual.bin |
U-Boot SPL without Trusty OS for eMMC/SD card boot.
SOM agnostics. |
| bootloader-imx8mp-var-dart-dual.img |
An image containing U-Boot proper and ATF without Trusty OS for eMMC/SD card boot.
SOM agnostics. |
| boot.img |
Android kernel image file.
SOM agnostics. |
| vendor_boot.img |
A composite image, which includes vendor RAMDisk and boot parameters.
SOM agnostics. |
| init_boot.img |
A composite image, which includes init process.
SOM agnostics. |
| super.img |
Android super image file.
SOM agnostics. |
|
dtbo-<name>.img
vbmeta-<name>.img |
configuration dependent |
| dtbo-imx8mp-var-dart-dt8mcustomboard.img | Device tree blob for DART-MX8M-PLUS V2.x with LVDS support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-dt8mcustomboard-basler-isp0.img | Device tree blob for DART-MX8M-PLUS V2.x with LVDS and Basler VCAM-AR0821B camera support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-dt8mcustomboard-basler-isi0.img | Device tree blob for DART-MX8M-PLUS V2.x with LVDS and Basler VCAM-AR1335B camera support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-dt8mcustomboard-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with LVDS and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-dt8mcustomboard-basler-isp0-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with LVDS, Basler VCAM-AR0821B camera and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-dt8mcustomboard-basler-isi0-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with LVDS, Basler VCAM-AR1335B camera and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-wbe-dt8mcustomboard.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE and LVDS support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-wbe-dt8mcustomboard-basler-isi0-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE, LVDS, Basler VCAM-AR1335B camera and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-wbe-dt8mcustomboard-basler-isi0.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE, LVDS and Basler VCAM-AR1335B camera support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-wbe-dt8mcustomboard-basler-isp0-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE, LVDS, Basler VCAM-AR0821B camera and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-wbe-dt8mcustomboard-basler-isp0.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE, LVDS and Basler VCAM-AR0821B camera support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-wbe-dt8mcustomboard-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE, LVDS and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-wbe-sonata-basler-isi0.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE and Basler VCAM-AR1335B camera support on Sonata-Board |
| dtbo-imx8mp-var-dart-wbe-sonata-basler-isi0-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE, Basler VCAM-AR1335B camera and M7 support on Sonata-Board |
| dtbo-imx8mp-var-dart-wbe-sonata-basler-isp0.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE and Basler VCAM-AR0821B camera support on Sonata-Board |
| dtbo-imx8mp-var-dart-wbe-sonata-basler-isp0-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE, Basler VCAM-AR0821B camera and M7 support on Sonata-Board |
| dtbo-imx8mp-var-dart-wbe-sonata.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE support on Sonata-Board |
| dtbo-imx8mp-var-dart-wbe-sonata-m7.img | Device tree blob for DART-MX8M-PLUS V2.x with WBE and M7 support on Sonata-Board |
| dtbo-imx8mp-var-dart-1.x-dt8mcustomboard.img | Device tree blob for DART-MX8M-PLUS V1.x with LVDS support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-1.x-dt8mcustomboard-m7.img | Device tree blob for DART-MX8M-PLUS V1.x with LVDS and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-1.x-dt8mcustomboard-basler-isi0.img | Device tree blob for DART-MX8M-PLUS V1.x with LVDS and Basler VCAM-AR1335B camera support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-1.x-dt8mcustomboard-basler-isi0-m7.img | Device tree blob for DART-MX8M-PLUS V1.x with LVDS, Basler VCAM-AR1335B camera and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-1.x-dt8mcustomboard-basler-isp0.img | Device tree blob for DART-MX8M-PLUS V1.x with LVDS and Basler VCAM-AR0821B camera support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-1.x-dt8mcustomboard-basler-isp0-m7.img | Device tree blob for DART-MX8M-PLUS V1.x with LVDS, Basler VCAM-AR0821B camera and M7 support on DT8MCustomBoard 2.x and above |
| dtbo-imx8mp-var-dart-1.x-sonata-basler-isi0.img | Device tree blob for DART-MX8M-PLUS V1.x with Basler VCAM-AR1335B camera support on Sonata-Board |
| dtbo-imx8mp-var-dart-1.x-sonata-basler-isi0-m7.img | Device tree blob for DART-MX8M-PLUS V1.x with Basler VCAM-AR1335B camera and M7 support on Sonata-Board |
| dtbo-imx8mp-var-dart-1.x-sonata-basler-isp0.img | Device tree blob for DART-MX8M-PLUS V1.x with Basler VCAM-AR0821B camera support on Sonata-Board |
| dtbo-imx8mp-var-dart-1.x-sonata-basler-isp0-m7.img | Device tree blob for DART-MX8M-PLUS V1.x with Basler VCAM-AR0821B camera and M7 support on Sonata-Board |
| dtbo-imx8mp-var-dart-1.x-sonata.img | Device tree blob for DART-MX8M-PLUS V1.x support on Sonata-Board |
| dtbo-imx8mp-var-dart-1.x-sonata-m7.img | Device tree blob for DART-MX8M-PLUS V1.x with M7 support on Sonata-Board |
| dtbo-imx8mp-var-som-symphony.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.X with LVDS support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-symphony-basler-isp0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS and Basler VCAM-AR0821B camera support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-symphony-basler-isi0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS and Basler VCAM-AR1335B camera support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-symphony-2nd-ov5640.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS and 2nd OV5640 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-symphony-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.X with LVDS and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-symphony-basler-isp0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS, Basler VCAM-AR0821B camera and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-symphony-basler-isi0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS v2.X with LVDS, Basler VCAM-AR1335B camera and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony-basler-isp0.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and Basler VCAM-AR0821B camera support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony-basler-isi0.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and Basler VCAM-AR1335B camera support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony-2nd-ov5640.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and 2nd OV5640 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony-basler-isp0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS, Basler VCAM-AR0821B camera and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony-basler-isi0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS, Basler VCAM-AR1335B camera and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-wbe-symphony.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE and LVDS support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-wbe-symphony-basler-isp0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and Basler VCAM-AR0821B camera support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-wbe-symphony-basler-isi0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and Basler VCAM-AR1335B camera support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-wbe-symphony-2nd-ov5640.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and 2nd OV5640 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-wbe-symphony-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-wbe-symphony-basler-isp0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS, Basler VCAM-AR0821B camera and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-wbe-symphony-basler-isi0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS, Basler VCAM-AR1335B camera and M7 support on Symphony-Board V2.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x-2nd-ov5640.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and 2nd OV5640 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x-2nd-ov5640-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS, 2nd OV5640 and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x-basler-isi0.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and Basler VCAM-AR1335B camera support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x-basler-isi0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS, Basler VCAM-AR1335B camera and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x-basler-isp0.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and Basler VCAM-AR0821B camera support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x-basler-isp0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS, Basler VCAM-AR0821B camera and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-1.x-symphony-1.x-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V1.x with LVDS and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x-2nd-ov5640.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS and 2nd OV5640 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x-2nd-ov5640-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS, 2nd OV5640 and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x-basler-isi0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS and Basler VCAM-AR1335B camera support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x-basler-isi0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS, Basler VCAM-AR1335B camera and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x-basler-isp0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS and Basler VCAM-AR0821B camera support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x-basler-isp0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS, Basler VCAM-AR0821B camera and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-symphony-1.x-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with LVDS and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x-2nd-ov5640.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and 2nd OV5640 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x-2nd-ov5640-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS, 2nd OV5640 and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x-basler-isi0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and Basler VCAM-AR1335B camera support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x-basler-isi0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS, Basler VCAM-AR1335B camera and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x-basler-isp0.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and Basler VCAM-AR0821B camera support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x-basler-isp0-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS, Basler VCAM-AR0821B camera and M7 support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE and LVDS support on Symphony-Board V1.x |
| dtbo-imx8mp-var-som-wbe-symphony-1.x-m7.img | Device tree blob for VAR-SOM-MX8M-PLUS V2.x with WBE, LVDS and M7 support on Symphony-Board V1.x |
Boot options¶
Boot options of the Android:
1. Directly from SD card
2. U-Boot boots from on-SOM eMMC
Note: Flashing Android images inside Docker containers is not supported. Use a native terminal (outside Docker) to flash the Android images to your target device.
Flash and boot Android from SD card¶
Create a bootable SD card¶
Partition and format SD card, and copy all images
- Replace
with the actual desired setup name according to the second table in the "Images created by the Android build" section. - Replace /dev/sdX with your true device, You can identify it with dmesg.
Boot From SD card¶
- Power-off the board.
- Insert the SD card into the SD card slot of the carrier board (DVK)
- Make sure the Boot Mode is set to SD card
- Power up the board - it will boot into Linux from the SD card
Flash and boot Android from eMMC¶
Preparing images¶
The default system.img and vendor.img format is suitable for flashing using fastboot, and must be modified for flashing using 'dd'.
$ cd out/target/product/dart_mx8mp
$ simg2img system.img system_raw.img
$ simg2img vendor.img vendor_raw.img
Flashing Android from Linux shell (when the primary installation android)¶
An example of flashing eMMC, can be found here.
Follow the following steps instructions above:
-
Preparing a rescue SD card;
-
Flash from command line (use the install_android.sh script)
Further, follow the steps described in paragraph "Flashing Android with USB Fastboot"
Flashing Android with USB Fastboot¶
Install tools on host¶
Note: Make sure you built Android for eMMC
Connect the target with host PC at fastboot mode:
- Connect a USB OTG cable from the target board OTG port to a your host machine USB HOST port.
- Power up the board and hit return/space to stop the boot at U-Boot.
- type fastboot 0 in the U-Boot command line.
On the Host PC:
$ sudo `which fastboot` flash bootloader_a out/target/product/dart_mx8mp/bootloader-imx8mp-var-dart-dual.img
$ sudo `which fastboot` flash bootloader_b out/target/product/dart_mx8mp/bootloader-imx8mp-var-dart-dual.img
$ sudo `which fastboot` flash dtbo_a out/target/product/dart_mx8mp/dtbo-<name>.img
$ sudo `which fastboot` flash dtbo_b out/target/product/dart_mx8mp/dtbo-<name>.img
$ sudo `which fastboot` flash boot_a out/target/product/dart_mx8mp/boot.img
$ sudo `which fastboot` flash boot_b out/target/product/dart_mx8mp/boot.img
$ sudo `which fastboot` flash init_boot_a out/target/product/dart_mx8mp/init_boot.img
$ sudo `which fastboot` flash init_boot_b out/target/product/dart_mx8mp/init_boot.img
$ sudo `which fastboot` flash vendor_boot_a out/target/product/dart_mx8mp/vendor_boot.img
$ sudo `which fastboot` flash vendor_boot_b out/target/product/dart_mx8mp/vendor_boot.img
$ sudo `which fastboot` flash super out/target/product/dart_mx8mp/super.img
$ sudo `which fastboot` flash vbmeta_a out/target/product/dart_mx8mp/vbmeta-<name>.img
$ sudo `which fastboot` flash vbmeta_b out/target/product/dart_mx8mp/vbmeta-<name>.img
$ sudo `which fastboot` reboot
Replace
Update Android firmware¶
Generate OTA packages¶
For generating "OTA" packages, use the following commands:
$ cd ~/var_imx-android-15.0.0_1.2.0/android_build
$ source build/envsetup.sh
$ lunch dart_mx8mp-var_stable-userdebug
$ ./imx-make.sh bootloader kernel -j4
$ make otapackage -j4 2>&1
Install OTA package to device¶
-
Extract payload.bin and payload_properties.txt from OTA zip file
-
Push file payload.bin to somewhere on the device (typically /cache folder)
- Open payload_properties.txt on an editor to copy its content, lets suppose it's like in the NXP manual:
FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
FILE_SIZE=379074366
METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ/de8Dgp9zFXt8Fo+Hxccp465uTOvKNsteWU=
METADATA_SIZE=46866
- Input the following command on the board's console to update:
su
update_engine_client --payload=file:///data/ota_package/payload.bin --update --headers="FILE_HASH=0fSBbXonyTjaAzMpwTBgM9AVtlBeyOigpCCgkoOfHKY=
FILE_SIZE=379074366
METADATA_HASH=Icrs3NqoglzyppyCZouWKbo5f08IPokhlUfHDmz77WQ/de8Dgp9zFXt8Fo+Hxccp465uTOvKNsteWU=
METADATA_SIZE=46866"
Make sure that the -- header equals to the exact content of payload_properties.txt without "space" or "return" character.
After issuing the command, nothing seems to happen on the device, but you can monit logcat for operation progress. After a successful update you can reboot into the updated version.
You can check chapter 7 of official NXP "Android User Guide" for further "Over-The-Air (OTA) Update" examples.
Manual operations¶
Build boot.img¶
When you perform changes to the kernel, you may build boot.img solely instead of building the whole Android.
$ cd ~/var_imx-android-15.0.0_1.2.0/android_build
$ source build/envsetup.sh
$ lunch dart_mx8mp-var_stable-userdebug
Unlock device for fastboot¶
Our build behaves like any other standard Android device.
To use fastboot, you should go through the following steps
- Settings => System => About Tablet => Build number
- keep on tapping until you see a prompt that says "You are now a developer!"
- Settings => System => Advanced => Developer options => OEM unlocking
- reboot to bootloader
- type "fastboot 0" in the U-Boot command line
- run "sudo
which fastbootoem unlock" from the Host PC - wait until the unlock process is complete
- proceed for flashing
Flashing Using NXP MFGTools - UUU (Universal Update Utility)¶
To flash Android OS without using a recovery SD card, UUU (MFG Tools 3.0) can be used.
Please refer to Flashing Android OS using UUU - USB Boot.
**Note:**The specific version of UUU is required to use this release, as VID/PIDs have been updated in the u-boot by NXP.
Please download/build specific version of UUU on your host machine
Running a M7 demo¶
Please choose one of the below
imx8mp-var-dart-dt8mcustomboard-m7 (Variscite DART-MX8M-PLUS with LVDS and Cortex M7 on DT8MCustomBoard 2.x)
imx8mp-var-som-symphony-2nd-ov5640-m7 (Variscite VAR-SOM-MX8M-PLUS with 2nd OV5640 and Cortex M7 on Symphony-Board V2.x)
imx8mp-var-som-symphony-m7 (VAR-SOM-MX8M-PLUS with LVDS and Cortex M7 on Symphony-Board V2.x)
imx8mp-var-dart-wbe-sonata-m7 (DART-MX8M-PLUS with LVDS and Cortex M7 on Sonata Board)
Running a demo from Linux¶
Boot Android to the shell
Increase kernel loglevel while debugging:
Check the state of the m7, it should be running already by U-Boot
If the state is 'running', stop the m7
Load new firmware (.elf file must already exist in /lib/firmware directory)
echo rpmsg_lite_pingpong_rtos_linux_remote.elf.dart > /sys/class/remoteproc/remoteproc0/firmware OR
echo rpmsg_lite_pingpong_rtos_linux_remote.elf.som > /sys/class/remoteproc/remoteproc0/firmware
Change the state to running
Copy and run demo module
From Host PC
$ adb root
$ adb push ~/var_imx-android-15.0.0_1.2.0/android_build/out/target/product/dart_mx8mp/obj/KERNEL_OBJ/drivers/rpmsg/imx_rpmsg_pingpong.ko /data
From device shell
$ su
$ cd /data
$ insmod imx_rpmsg_pingpong.ko
Running a demo from U-Boot¶
Enable below node in -m7.dtsi and re-build images as per "Build Android Images" section and follow the steps described in paragraph "Flashing Android with USB Fastboot" to flash the images
From U-Boot shell execute below commands
u-boot=> bootmcu
run command: 'bootaux 0x7e0000'
## Starting auxiliary core stack = 0x20020000, pc = 0x0000051D...
u-boot=> run bootcmd
Follow steps as described in "Copy and run demo module"
Building Android with Trusty support enabled¶
Set PRODUCT_IMX_TRUSTY to true in ~/var_imx-android-15.0.0_1.2.0/android_build/device/variscite/imx8m/dart_mx8mp/SharedBoardConfig.mk
Follow the instructions from "Build Android Images" section
Note: To build Android with Trusty support for the DART-MX8M-PLUS machine you need to set TARGET_TEE_DART to true, e.g. from command line like this below:
The images from "Images created by the Android build" section will only be partially different for the bootloader.
|
Image
|
Description
|
|---|---|
| spl-imx8mp-var-dart-trusty-dual.bin |
U-Boot SPL with Trusty related configurations for eMMC boot
for Android build with Trusty OS support enabled to burn only to eMMC DART-MX8M-PLUS needs TARGET_TEE_DART=true passed to the build |
| bootloader-imx8mp-var-dart-trusty-dual.img |
An image containing U-Boot proper, ATF and Trusty OS for eMMC boot
for Android build with Trusty OS support enabled to burn only to eMMC DART-MX8M-PLUS needs TARGET_TEE_DART=true passed to the build |