Difference between revisions of "iMX6 Rex Ultra Android"

From Voipac Wiki
Jump to navigation Jump to search
(Created page with "Category:iMX6 Rex Development kit Category:iMX6 Rex Ultra Category:Android <!-- --> <div style="float:right">__TOC__</div> Android is a mobile operating system (OS...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:iMX6 Rex Development kit]]
+
[[Category:iMX6 Rex Development Kit]]
 
[[Category:iMX6 Rex Ultra]]
 
[[Category:iMX6 Rex Ultra]]
 
[[Category:Android]]
 
[[Category:Android]]
Line 7: Line 7:
  
 
This document describes installation procedure for binary Freescale Android 7.1 image.
 
This document describes installation procedure for binary Freescale Android 7.1 image.
Supported peripheral:
+
Supported peripherals on iMX6 Rex Ultra Module:
* iMX6 Rex Ultra Module
 
 
* HDMI/LVDS output
 
* HDMI/LVDS output
 
* USB flash as external storage
 
* USB flash as external storage
Line 33: Line 32:
 
=== Source code ===
 
=== Source code ===
 
Downloadable files needed during the building:
 
Downloadable files needed during the building:
* [http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_kit/module/software/android/Android_7_1/sources&dl=android_N7.1.1_1.0.0_docs.tar.gz Documentation] for Android provided by NXP
+
* [http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/software/android/Android_7_1/sources/android_N7.1.1_1.0.0_docs.tar.gz Documentation] for Android provided by NXP
  
* [http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_kit/module/software/android/Android_7_1/sources&dl=android_N7.1.1_1.0.0_source.tar.gz Source code] with patches provided by NXP
+
* [http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/software/android/Android_7_1/sources/android_N7.1.1_1.0.0_source.tar.gz Source code] with patches provided by NXP
  
* [http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_kit/module/software/android/Android_7_1/sources&dl=android_N7.1.1_1.0.0_source_voipac.tar.gz Voipac patches] that add support for TinyRex boards
+
* [http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/software/android/Android_7_1/sources/android_N7.1.1_1.0.0_source_voipac.tar.gz Voipac patches] that add support for iMX6 Rex boards
  
 
==== Applying Voipac patches ====
 
==== Applying Voipac patches ====
Line 63: Line 62:
  
 
==== Build name options ====  
 
==== Build name options ====  
* imx6tinyrex - iMX6 TinyRex Module PRO/MAX/MAX4G/ULTRA
+
* imx6tinyrex - iMX6 TinyRex Module Pro/Max/Max4G/Ultra
* imx6rex - iMX6 Rex Module PRO/ULTRA
+
* imx6rex - iMX6 Rex Module Pro/Ultra
* imx6openrex - iMX6 OpenRex SBC MAX/MAX4G/ULTRA
+
* imx6openrex - iMX6 OpenRex SBC Max/Max4G/Ultra
  
 
==== Build type options ====
 
==== Build type options ====
Line 101: Line 100:
  
 
=== Binary files ===
 
=== Binary files ===
Official Voipac Android files can be found in [http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_kit/module/software/android/Android_7_1/binaries downloads section].
+
Official Voipac Android files can be found in [http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_Kit/module/software/android/Android_7_1/binaries downloads section].
  
 
=== Preparing SD card ===
 
=== Preparing SD card ===
Line 107: Line 106:
 
mkdir -pv ~/workdir/imx6/android/bin/7_1/rex
 
mkdir -pv ~/workdir/imx6/android/bin/7_1/rex
 
cd ~/workdir/imx6/android/bin/7_1/rex
 
cd ~/workdir/imx6/android/bin/7_1/rex
wget -r -nH -nd -np -R index.html* http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_kit/module/software/android/Android_7_1/binaries
+
wget -r -nH -nd -np -R index.html* http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_Kit/module/software/android/Android_7_1/binaries
 
chmod a+x vpac-sdcard-partition.sh
 
chmod a+x vpac-sdcard-partition.sh
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 148: Line 147:
 
=== Setup ===
 
=== Setup ===
 
==== Bootloader ====
 
==== Bootloader ====
Android bootloader is stored at SD card and directly executed. Linux bootloader stored in SPI Flash must be configuration to chainload Android bootloader.
+
Android bootloader is stored in SD card and directly executed. Linux bootloader stored in SPI Flash must be configuration to chainload Android bootloader.
  
 
=== Chainloading SD card bootloader ===
 
=== Chainloading SD card bootloader ===

Latest revision as of 19:56, 24 October 2021

Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google.

This document describes installation procedure for binary Freescale Android 7.1 image. Supported peripherals on iMX6 Rex Ultra Module:

  • HDMI/LVDS output
  • USB flash as external storage
  • SD card as external storage
  • Video playback
  • Audio playback
  • WiFi
  • Ethernet

Android 7.1

Install Prerequisites

sudo apt-get install uuid uuid-dev
sudo apt-get install zlib1g-dev liblz-dev
sudo apt-get install liblzo2-2 liblzo2-dev
sudo apt-get install lzop
sudo apt-get install git-core curl
sudo apt-get install u-boot-tools
sudo apt-get install mtd-utils
sudo apt-get install android-tools-fsutils
sudo apt-get install openjdk-8-jdk

Source code

Downloadable files needed during the building:

Applying Voipac patches

tar xvzf android_N7.1.1_1.0.0_source_voipac.tar.gz -C ~/workdir/imx6/android/

cd ~/workdir/imx6/android/a711-rex/device/
tar xvzf ~/workdir/imx6/android/android_N7.1.1_1.0.0_source_voipac/device_vpac-proprietary_voipac.tar.gz -C .

cd ~/workdir/imx6/android/a711-rex/device/fsl/
git apply ~/workdir/imx6/android/android_N7.1.1_1.0.0_source_voipac/device_fsl_voipac.patch

cd ~/workdir/imx6/android/a711-rex/bootable/bootloader/uboot-imx
git apply ~/workdir/imx6/android/android_N7.1.1_1.0.0_source_voipac/bootable_bootloader_uboot-imx_voipac.patch

cd ~/workdir/imx6/android/a711-rex/kernel_imx
git apply ~/workdir/imx6/android/android_N7.1.1_1.0.0_source_voipac/kernel_imx_voipac.patch

cd ~/workdir/imx6/android/a711-rex/hardware/imx
git apply ~/workdir/imx6/android/android_N7.1.1_1.0.0_source_voipac/hardware_imx_voipac.patch

cd ~/workdir/imx6/android/a711-rex/hardware/broadcom/wlan
git apply ~/workdir/imx6/android/android_N7.1.1_1.0.0_source_voipac/hardware_broadcom_wlan_voipac.patch

Build name options

  • imx6tinyrex - iMX6 TinyRex Module Pro/Max/Max4G/Ultra
  • imx6rex - iMX6 Rex Module Pro/Ultra
  • imx6openrex - iMX6 OpenRex SBC Max/Max4G/Ultra

Build type options

  • user - Production ready image, no debug
  • userdebug - Provides image with root access and debug, similar to "user"
  • eng - Development image with debug tools

Building commands

cd ~/workdir/imx6/android/a711-rex
source build/envsetup.sh

lunch imx6tinyrex-userdebug
make 2>&1 | tee build-log-imx6tr.txt

lunch imx6rex-userdebug
make 2>&1 | tee build-log-imx6r.txt

lunch imx6openrex-userdebug
make 2>&1 | tee build-log-imx6or.txt

Compiled files are stored in the ouput directory:

cd ~/workdir/imx6/android/a711-rexout/
ls -la out/target/product/

drwxrwxr-x  6 user user 4096 7 24 07:19 .
drwxrwxr-x  4 user user 4096 8 30  2017 ..
drwxrwxr-x 11 user user 4096 8 22 21:34 imx6openrex
drwxrwxr-x 11 user user 4096 7 28 20:19 imx6rex
drwxrwxr-x 11 user user 4096 6 18  2017 imx6tinyrex
drwxrwxr-x 11 user user 4096 5  1  2017 sabresd_6dq

Binary files

Official Voipac Android files can be found in downloads section.

Preparing SD card

mkdir -pv ~/workdir/imx6/android/bin/7_1/rex
cd ~/workdir/imx6/android/bin/7_1/rex
wget -r -nH -nd -np -R index.html* http://downloads.voipac.com/index.php?p=iMX6_Rex_Development_Kit/module/software/android/Android_7_1/binaries
chmod a+x vpac-sdcard-partition.sh

SD card partition layout

This will be the final SD card partitioning layout at the end of installation procedure:

Partition type/index Name Start offset Size File system Content
N/A BOOT Loader 1 KB 1 MB N/A bootloader
Primary 1 Boot 8 MB 32 MB boot.img format, kernel + ramdisk boot.img
Primary 2 Recovery Follow Boot 32 MB boot.img format, kernel + ramdisk recovery.img
Logic 5 (Extended 3) SYSTEM Follow Recovery 1536 MB EXT4. Mount as /system system.img (Android system files under /system/ dir)
Logic 6 (Extended 3) CACHE Follow SYSTEM 512 MB EXT4. Mount as /cache Android cache for image store of OTA
Logic 7 (Extended 3) Device Follow CACHE 8 MB EXT4. Mount as /vender To Store MAC address files
Logic 8 (Extended 3) Misc Follow Device 6 MB N/A For recovery store bootloader message, reserve
Logic 9 (Extended 3) DATAFOOTER Follow Misc 2 MB N/A For crypto footer of DATA partition encryption bootloader message, reserve
Primary 4 DATA Follow Misc Total - Other images EXT4. Mount at /data Application data storage for the system application and for internal media partition in /mnt/sdcard/ dir

Creating SD card

Based on the location where the SD card has been mounted alter and use one of these commands:

sudo ./vpac-sdcard-partition.sh -f imx6rex ultra /dev/mmcblkX

or

sudo ./vpac-sdcard-partition.sh -f imx6rex ultra /dev/sdX

Setup

Bootloader

Android bootloader is stored in SD card and directly executed. Linux bootloader stored in SPI Flash must be configuration to chainload Android bootloader.

Chainloading SD card bootloader

setenv bootcmd "bmode esdhc3"
saveenv
reset

Setting HDMI video output

setenv bootargs "console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,if=RGB24,bpp=32 video=mxcfb1:off vmalloc=128M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=320M"
saveenv

Setting LVDS video output

setenv bootargs "console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,edt570,if=RGB666 video=mxcfb1:off vmalloc=128M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=320M"
saveenv