Wiki Home » imx6 openrex » android71

android71

Last modified by Administrator on 2018/10/21 17:09
Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google.
https://www.android.com/

This document describes installation procedure for binary Freescale Android 7.1 image (i.MX6 OpenREX MAX/ULTRA module).
Supported peripheral:

  • i.MX6 OpenREX MAX/ULTRA module
  • HDMI/LVDS output
  • USB flash as external storage
  • SD card as external storage
  • Video playback
  • Audio playback
  • WiFi
  • Ethernet

Android 7.1

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

Documentation for android provided by NXP
https://www.voipac.com/downloads/imx/iMX6_OpenRex/src/android/7_1/android_N7.1.1_1.0.0_docs.tar.gz

Source code with patches provided by NXP
https://www.voipac.com/downloads/imx/iMX6_OpenRex/src/android/7_1/android_N7.1.1_1.0.0_source.tar.gz

Voipac patches that add support for REX targets
https://www.voipac.com/downloads/imx/iMX6_OpenRex/src/android/7_1/android_N7.1.1_1.0.0_source_voipac.tar.gz

How to apply 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 - i.MX6 TinyREX PRO/MAX/MAX4G/ULTRA
  • imx6rex - i.MX6 REX PRO/ULTRA
  • imx6openrex - i.MX6 OpenREX 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 command

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

Output 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

https://www.voipac.com/downloads/imx/iMX6_OpenRex/bin/android/7_1/

Preparing SD card

mkdir -pv ~/workdir/imx6/android/bin/7_1/openrex/
cd ~/workdir/imx6/android/bin/7_1/openrex
wget -r -nH -nd -np -R index.html* https://www.voipac.com/downloads/imx/iMX6_OpenRex/bin/android/7_1/
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 MBN/A bootloader
 Primary 1 Boot 8 MB 32 MBboot.img format,
kernel + ramdisk
boot.img 
 Primary 2 Recovery Follow Boot 32 MBboot.img format,
kernel + ramdisk
recovery.img
 Logic 5 (Extended 3) SYSTEM Follow Recovery 1536 MBEXT4. Mount as /
system
system.img (Android system files under /system/ dir)
 Logic 6 (Extended 3) CACHE Follow SYSTEM 512 MBEXT4. Mount as /
cache 
 Android cache for image store of OTA.
 Logic 7 (Extended 3) Device Follow CACHE 8 MBEXT4. Mount as /
vender
To Store MAC address files
 Logic 8 (Extended 3) Misc Follow Device 6 MB N/AFor recovery store
bootloader message, reserve
 Logic 9 (Extended 3) DATAFOOTER Follow Misc 2 MB N/AFor crypto footer of DATA partition encryption
bootloader message, reserve.
 Primary 4 DATA Follow Misc Total - Other
images
EXT4. Mount at /dataApplication data storage for the system application and
for internal media partition in /mnt/sdcard/ dir.

IMX6 Max module

sudo ./vpac-sdcard-partition.sh -f imx6openrex max /dev/mmcblkX

#or

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

IMX6 Ultra module

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 at SD card. Linux bootloader stored in SPI flash must be configuration to chainload android bootloader.

Chainloading SD card bootloader

setenv bootcmd "bmode esdhc2"
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
Tags:
Created by Administrator on 2017/07/24 06:08

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.1 - Documentation