<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.somlabs.com/index.php?action=history&amp;feed=atom&amp;title=VisionSOM_imx-android_12</id>
	<title>VisionSOM imx-android 12 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.somlabs.com/index.php?action=history&amp;feed=atom&amp;title=VisionSOM_imx-android_12"/>
	<link rel="alternate" type="text/html" href="https://wiki.somlabs.com/index.php?title=VisionSOM_imx-android_12&amp;action=history"/>
	<updated>2026-04-28T06:04:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.somlabs.com/index.php?title=VisionSOM_imx-android_12&amp;diff=2752&amp;oldid=prev</id>
		<title>KrzysztofChojnowski: Created page with &quot;{{PageHeader|iMX Android for VisionSOM modules}} __toc__  This tutorial explains how to build the iMX Android 12.0.0_1.0.0 system image for the VisionSOM modules. It uses the...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.somlabs.com/index.php?title=VisionSOM_imx-android_12&amp;diff=2752&amp;oldid=prev"/>
		<updated>2022-05-06T17:42:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{PageHeader|iMX Android for VisionSOM modules}} __toc__  This tutorial explains how to build the iMX Android 12.0.0_1.0.0 system image for the VisionSOM modules. It uses the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PageHeader|iMX Android for VisionSOM modules}} __toc__&lt;br /&gt;
&lt;br /&gt;
This tutorial explains how to build the iMX Android 12.0.0_1.0.0 system image for the VisionSOM modules. It uses the following kernel and u-boot repositories:&lt;br /&gt;
&lt;br /&gt;
* kernel (5.10.72): https://github.com/SoMLabs/somlabs-linux-imx/tree/somlabs_imx_android-12.0.0_1.0.0&lt;br /&gt;
* u-boot (2021.04): https://github.com/SoMLabs/somlabs-uboot-imx/tree/somlabs-imx_android-12.0.0_1.0.0&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This tutorial describes the building procedure based on the official NXP instructions that are available on the NXP website:&lt;br /&gt;
&lt;br /&gt;
https://www.nxp.com/design/software/embedded-software/i-mx-software/android-os-for-i-mx-applications-processors:IMXANDROID&lt;br /&gt;
&lt;br /&gt;
== Host system prerequisites ==&lt;br /&gt;
&lt;br /&gt;
This tutorial was prepared for the Ubuntu 18.04.5 LTS host operating system. According to the official Android documentation (https://source.android.com/setup/build/requirements), all of the files required for system image compilation may require at least 250 GB. Additional 150 GB of the disk space may be needed for build files. The host system needs also at least 16 GB of available RAM.&lt;br /&gt;
&lt;br /&gt;
The following packages need to be installed before the building process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig uuid uuid-dev zlib1g-dev liblz-dev liblzo2-2 liblzo2-dev lzop git-core curl u-boot-tools mtd-utils android-tools-fsutils openjdk-8-jdk device-tree-compiler gdisk m4 libz-dev bison flex libssl-dev gcc-multilib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The source code will be obtained using git, so it needs to be configured by setting the user name and email with correctly set values:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git config --global user.email &amp;quot;you@example.com&amp;quot;&lt;br /&gt;
git config --global user.name &amp;quot;Your Name&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is also suggested to use the newest repo tool, that may be obtained from the following link:&lt;br /&gt;
&lt;br /&gt;
https://storage.googleapis.com/git-repo-downloads/repo&lt;br /&gt;
&lt;br /&gt;
It may be downloaded to the /usr/bin/ directory to be available in the system PATH.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we use the ~/dev/imx-android directory as the build base:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/dev/imx-android&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, we need the gcc compiler for the ARM64 architecture. We can obtain one from the ARM website:&lt;br /&gt;
&lt;br /&gt;
https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz&lt;br /&gt;
&lt;br /&gt;
We need to download it and extract to the ~/dev directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ~/dev/imx-android&lt;br /&gt;
wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.3-2019.03/binrel/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz&lt;br /&gt;
tar -xf gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the system sources ==&lt;br /&gt;
&lt;br /&gt;
First of all we need the iMX source package that may be downloaded from the NXP website (login is required):&lt;br /&gt;
&lt;br /&gt;
https://www.nxp.com/webapp/Download?colCode=12.0.0_1.0.0_ANDROID_SOURCE&lt;br /&gt;
&lt;br /&gt;
Next we need to extract the archive, source the setup file and set required environmental variables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -xf imx-android-12.0.0_1.0.0.tar.gz&lt;br /&gt;
source imx-android-12.0.0_1.0.0/imx_android_setup.sh&lt;br /&gt;
export MY_ANDROID=~/dev/imx-android/android_build&lt;br /&gt;
export AARCH64_GCC_CROSS_COMPILE=~/dev/imx-android/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/bin/aarch64-linux-gnu-&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Obtaining the VisionSOM support ==&lt;br /&gt;
&lt;br /&gt;
When all of the sources are downloaded we need to replace the default components with the ones provided by SoMLabs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $MY_ANDROID/vendor/nxp-opensource&lt;br /&gt;
rm -rf kernel_imx uboot-imx imx-mkimage arm-trusted-firmware&lt;br /&gt;
&lt;br /&gt;
mkdir $MY_ANDROID/vendor/somlabs&lt;br /&gt;
cd $MY_ANDROID/vendor/somlabs&lt;br /&gt;
git clone https://github.com/SoMLabs/somlabs-imx-atf.git -b somlabs-imx-atf_android-12.0.0_1.0.0 arm-trusted-firmware&lt;br /&gt;
git clone https://github.com/SoMLabs/somlabs-uboot-imx.git -b somlabs-imx_android-12.0.0_1.0.0 uboot-imx&lt;br /&gt;
git clone https://github.com/SoMLabs/somlabs-linux-imx.git -b somlabs_imx_android-12.0.0_1.0.0 kernel_imx&lt;br /&gt;
git clone https://github.com/SoMLabs/somlabs-imx-mkimage.git -b somlabs-android-12.0.0_1.0.0 imx-mkimage&lt;br /&gt;
git clone https://github.com/SoMLabs/imx_android_visionsom_8mm_demo_app.git -b android-12.0.0_1.0.0 somlabsdemo&lt;br /&gt;
&lt;br /&gt;
cd $MY_ANDROID/device/nxp&lt;br /&gt;
git clone https://github.com/SoMLabs/imx_android_visionsom_8mm.git -b android-12.0.0_1.0.0 visionsom_8mm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally go to the imx-vpu-hantro-daemon sources and fix the kernel path in Android.bp file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $MY_ANDROID/vendor/nxp/imx-vpu-hantro-daemon&lt;br /&gt;
sed -i &amp;quot;s/nxp-opensource\/kernel_imx/somlabs\/kernel_imx/g&amp;quot; Android.bp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building the system image ==&lt;br /&gt;
&lt;br /&gt;
Having all sources ready, we can go on to system image compilation. The following device configurations are available:&lt;br /&gt;
* visioncb_8mm_adv_dsi-user VisionCB-8M-ADV carrier board with SL-TFT7-TP-720-1280-MIPI display&lt;br /&gt;
* visioncb_8mm_adv_dsi-userdebug VisionCB-8M-ADV carrier board with SL-TFT7-TP-720-1280-MIPI display with debug enabled&lt;br /&gt;
* visioncb_8mm_adv_hdmi-user VisionCB-8M-ADV carrier board with HDMI display connected&lt;br /&gt;
* visioncb_8mm_adv_hdmi-userdebug VisionCB-8M-ADV carrier board with HDMI display connected with debug enabled&lt;br /&gt;
* visioncb_8mm_std_dsi-user VisionCB-8M-STD carrier board with SL-TFT7-TP-720-1280-MIPI display&lt;br /&gt;
* visioncb_8mm_std_dsi-userdebug VisionCB-8M-STD carrier board with SL-TFT7-TP-720-1280-MIPI display with debug enabled&lt;br /&gt;
* visioncb_8mm_std_hdmi-user VisionCB-8M-STD carrier board with SL-MIPI-LVDS-HDMI-CNV converter&lt;br /&gt;
* visioncb_8mm_std_hdmi-userdebug VisionCB-8M-STD carrier board with SL-MIPI-LVDS-HDMI-CNV converter with debug enabled&lt;br /&gt;
&lt;br /&gt;
Each configuration supports the VisionSOM-8MM modules with at least 2GB RAM memory and 16GB or 32GB eMMC storage.&lt;br /&gt;
&lt;br /&gt;
The system image may be compiled using the following commands. The &amp;#039;&amp;#039;visioncb_8mm_std_dsi-userdebug&amp;#039;&amp;#039; configuration name may be changed to one of the previously mentioned options. By changing the -j16 option we can assign more processor cores to the compilation jobs. More information about available configuration options can be found in the iMX Android system documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd $MY_ANDROID&lt;br /&gt;
source build/envsetup.sh&lt;br /&gt;
lunch visioncb_8mm_std_dsi-userdebug&lt;br /&gt;
./imx-make.sh -j16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing the compiled system ==&lt;br /&gt;
&lt;br /&gt;
The compiled system files are located in the output directory: $MY_ANDROID/out/target/product/. We can install them on the eMMC memory using the scripts provided by NXP. The path in the arguments list depends on the hardware configuration selected during the system build.&lt;br /&gt;
&lt;br /&gt;
* 16GB eMMC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ./device/nxp/common/tools/uuu_imx_android_flash.sh -c 14 -D out/target/product/visioncb_8mm_std_dsi/ -f imx8mm -a -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 32GB eMMC:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ./device/nxp/common/tools/uuu_imx_android_flash.sh -c 28 -D out/target/product/visioncb_8mm_std_dsi/ -f imx8mm -a -e&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the eMMC memory programming we also need the UUU version 1.4.193 (https://github.com/NXPmicro/mfgtools/releases). It needs to be available in the system PATH.&lt;/div&gt;</summary>
		<author><name>KrzysztofChojnowski</name></author>
	</entry>
</feed>