Difference between revisions of "iMX6 Rex Android 4.4.2"

From Voipac Wiki
Jump to navigation Jump to search
m (Voipac moved page iMX6 Rex Android 442 to iMX6 Rex Android 4.4.2 without leaving a redirect)
 
Line 102: Line 102:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Persistent boot settings ====
+
==== Permanent boot settings ====
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
setenv machid 12a9
 
setenv machid 12a9
Line 111: Line 111:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Persistent boot settings (touch screen calibration) ====
+
==== Permanent boot settings (touch screen calibration) ====
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
setenv machid 12a9
 
setenv machid 12a9
Line 134: Line 134:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Persistent boot settings ===
+
=== Permanent boot settings ===
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
setenv machid 12a9
 
setenv machid 12a9

Latest revision as of 11:57, 24 April 2022

Android version 4.4.2 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 4.4.2 image. Supported peripherals on iMX6 Rex Pro Module:

  • HDMI / LVDS 640x480 LCD output
  • Resistive touchscreen
  • USB flash as external storage
  • SD card as external storage
  • Video playback
  • Audio playback

Initial steps

Install Prerequisites

sudo apt-get install wget
sudo apt-get install e2fsprogs
sudo apt-get install util-linux

Create working directory

mkdir -pv ~/workdir/imx6/android/
cd ~/workdir/imx6/android/

Download installation files

git clone https://github.com/voipac/imx6_rex_bin_kk442
cd imx6_rex_bin_kk442/

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 Not used
Primary 1 Boot 8 MB 8 MB boot.img format, kernel + ramdisk boot.img
Primary 2 Recovery Follow Boot 8 MB boot.img format, kernel + ramdisk recovery.img
Logic 5 (Extended 3) SYSTEM Follow Recovery 512 MB EXT4. Mount as /system system.img
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 4 MB N/A For recovery store 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

Install Bootloader

Download the image file

wget http://downloads.voipac.com/files/iMX6_Rex_Development_Kit/module/software/android/Android_kk442/binaries/u-boot-0x27800000_imx6q_20160410.bin

Flash the bootloader into SPI memory

mw.b 0x10800000 0xFF 0x80000
tftp 0x10800000 u-boot-0x27800000_imx6q_20160410.bin
sf probe 3:2
sf erase 0x0 0x80000
sf write 0x10800000 0x0 0x80000

Install Android

Extract system.img

7z x system.img.7z.001

Creating SD card

Note: Unmounted SD card during this process is essential otherwise the fsl-sdcard-partition script may fail to create a proper Android SD card.

For installation SD card partition script is used:

  • This script requires boot.img, recovery.img and system.img files in the same directory as script itself
  • /dev/mmcblk0 is the path to the SD card


Note: The script is working correctly only with /dev/mmcblk0 devices (USB to SD adaptors will not work).

chmod a+x fsl-sdcard-partition.sh 
sudo ./fsl-sdcard-partition.sh -f /dev/mmcblk0

Configure Bootloader

LVDS Display (LDB-ETV570)

Temporary boot settings

setenv machid 12a9
setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,LDB-ETV570,if=RGB666 video=mxcfb1:off video=mxcfb2:off fbmem=10M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
booti mmc1

Permanent boot settings

setenv machid 12a9
setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,LDB-ETV570,if=RGB666 video=mxcfb1:off video=mxcfb2:off fbmem=10M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
setenv bootcmd booti mmc1
saveenv
reset

Permanent boot settings (touch screen calibration)

setenv machid 12a9
setenv bootargs tsdev=tsc2007 console=ttymxc0,115200 init=/init video=mxcfb0:dev=ldb,LDB-ETV570,if=RGB666 video=mxcfb1:off video=mxcfb2:off fbmem=10M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
setenv bootcmd booti mmc1
saveenv
reset

Triggering new touch screen calibration

rm /data/calibration 
reboot

HDMI Monitor

Temporary boot settings

setenv machid 12a9
setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=28M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
booti mmc1

Permanent boot settings

setenv machid 12a9
setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off fbmem=28M vmalloc=400M androidboot.console=ttymxc0 androidboot.hardware=freescale
setenv bootcmd booti mmc1
saveenv
reset