Adeneo i.MX53 Quick Start Board BSP for Android Gingerbread User Guide and Release Notes v4.0

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

Table of Contents Release Description 3 Change Log 3 Release Contents 4 Tested Functionality 4 Untested Functionality 7 Known Issues 8 Android Software Setup 8 Unpacking Sources and Patching 8 HDMI Fix: 8 Building Android for the i.MX53 Quick Start Board 8 Setup SD Card and Flashing Binaries 9 Setup Boot Environment 9 Voltage Fix: 9 4.3” SEIKO 24bpp LCD 10 7” CHUNGWA 16bpp LCD 10 VGA 10 HDMI (1080P@60) 10 Default Environment Settings 10 Manual Setup Reference 11 Building U-Boot 12 Building 12 Building Notes 12 Support 13

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

Release Description This documents provides a user guide and release information on the contents of the i.MX53 Android BSP for QSB/LOCO board. This release builds upon the i.MX5x Android R10.2 release from Freescale. Some features have been dropped from release 3.3 and will be added again in the following releases.

Change Log

Version Description

1.0 Initial drop of Android 2.2 (Froyo) on i.MX53 LOCO

2.0 Update to R9.3 for LOCO board.

3.0 ● Fix for touchscreen calibration ● VGA support ● usb otg + adb support ● preliminary accelerometer orientation support.

3.1 ● Added command line information for using 7” LCD since 4.3” is now the default. ● Also removed debug logging from libsensor.

3.2 ● Added boot logo ● Script to help setup the SD card file system for booting binary images.

3.3 ● Added support for Freescale R9.4 release. This includes improved performance fix, dvfs support. ● User Keys 1/2 added for Android as Back/Home ● HDMI (see HDMI Fix)

4.0 ● Update to Android 2.3 (Gingerbread) ● Update to R10.2 for QSB/LOCO

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

Release Contents

The i.MX53 LOCO Android BSP v4.0 contains the following features: ● Complete source code for the bootloader (U-Boot), kernel (Linux 2.6.35) and Android version 2.3. ● Scripts to automate building and flashing images.

Tested Functionality

The build has been tested on Ubuntu 10.10 32-bit.

Item Working Notes

Android Gallery (media Yes Stability issues playback)

Apps(SDK) Yes Yes, installation via adb successful with multiple applications. Direct installation via copying to SD card partitions or NFS also supported.

Boot linux Kernel and Yes Android FS from SD card

Boot U-boot from SD Yes

Ethernet Yes For internet browsing see Android Browser note below

VGA Yes

LCD Yes Currently supports 4.3” and 7” LCD

HDMI Yes Tested 1080p and 720p

nfs + tftpboot Yes

SD Card mount in Android Yes MicroSD slot has been tested.

Serial UART Yes

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

USB-HID (keyboard, Yes Use of Dell keyboard provides mouse) Android Home, Back, Menu, Enter, etc. buttons. Key mappings are found in the “Key Map” section of the i.MX_Android_R10.2_User_Guide.ht ml.

Mouse has scrolling-only functionality in this build of Android.

Android Browser Yes To set the DNS run the command: “setprop net.dns1 my_dns_ip” or modify the init.rc file.

Touchscreen Yes Calibration is run once and a calibration file is created on the system. Subsequent boots do not re- calibrate the device. This means when switching from default 4.3” LCD to another supported LCD requires the calibration file to be removed. When the SD card is inserted into the Linux development PC the calibration file is located at:

/media/data/system/calibration

Backlight Yes In Android navigate to Settings- >Display->Brightness and adjust the slider.

USB OTG Yes The micro-B USB port is device only. Also, due to physical hardware limitations DO NOT connect the micro USB device Jack and lower USB host Jack at the same time!!

Accelerometer No To be merged in next release

User Keys Yes Mapped User Key1 and User Key2 to Back and Home respectively

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

Untested Functionality The following is a list of components that have not been tested.

Item Working Notes

SATA Untested

Software Update using Untested Recovery Mode

USB Mass Storage Untested

Known Issues The following is a list of known issues in this release:

Item Workaround Available Notes

VPU issue causes Yes There is an issue with the multicolored mosaic when VPU on rev 2.0 silicon that playing back video. requires a voltage increase as a temporary workaround. See Voltage Fix:

Touchscreen filtering causes No The touchscreen driver has selections to ‘bounce around’ an issue with proper filtering when dragging icons, of values. This issue is being selecting items. investigated.

Android Browser cannot Yes access Internet An issue with the web browser unable to load web page. See Android Browser Fix:

Crashes when using the No To be determined. gallery

Intermittent crashes when No Improper PMIC initialization booting sequence

Suspend/resume issues No The touchscreen driver raises spurious interrupts

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

that prevent the system from properly going to suspend.

No accelerometer support No Will be supported in the upcoming releases.

Android Software Setup

Unpacking Sources and Patching

● Install the build prerequisites (http://source.android.com/source/initializing.html)

● Unpack the tar.gz file: $ tar xzvf i.MX53-QSB-Android-Release4.0.tar.gz $ cd i.MX53-QSB-Android-Release4.0/scripts ● Run the script “download_android.sh” $ ./download_android.sh

The Android sources will be downloaded from the public repositories. This takes a while.

● Run the script “patch_android.sh” $ ./patch_android.sh

● Run the script “apply_qsb_patch.sh” $ ./apply_qsb_patch.sh

● By default, the Gingerbread build-system now requires a 64-bit machine. The sources can be patched to build Android on 32-bit machines. Only run this command if this is the case for you (tested on Ubuntu 10.10): $ ./fix_android.sh

Building Android for the i.MX53 Quick Start Board ● To build the bootloader, kernel, and android filesystem for the first time: ○ Run the script “build_android.sh” $ ./build_android.sh imx53_qsb all ● Build just the bootloader: ○ Run the script “build_android.sh”

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

$ ./build_android.sh imx53_qsb uboot ● Build just the kernel: ○ Run the script “build_android.sh” $ ./build_android.sh imx53_qsb kernel ● Build just the android filesystem: ○ Run the script “build_android.sh” $ ./build_android.sh imx53_qsb android

Setup SD Card and Flashing Binaries

NOTE: /dev/sdx parameter is your SD Card device. For example: /dev/sde

NOTE: if you are overwriting an SD Card that you were using for previous releases, make sure you clear the previous environment settings (since they are saved on the SD Card and will override the default parameters): $ sudo dd if=/dev/zero of=/dev/sdx bs=1M count=1

Flashing binaries built using the above build scripts: ● Run the script “flash_android.sh” $ ./flash_android.sh /dev/sdx ● When using the provided build scripts all binaries are copied automatically to the “out” directory. This is the location that the “flash_android.sh” script uses for binaries.

Flashing prebuilt binaries: ● Run the script “flash_prebuilt_android.sh” $ ./flash_prebuilt_android.sh /dev/sdx ● This script copies the prebuilt binaries located in the “prebuilt” folder.

Setup Boot Environment

The boot environment is already setup to boot the linux kernel and android filesystem from the micro SD card.

Voltage Fix: There is a temporary workaround to fix mosaic observed when playing video. This increase in VCC voltage is only required with the MX53 T2.0 silicon. Boards that are labeled SCH-26565 REV D or later do not require this workaround. 6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

From the FSL Release Notes: “MX53 TO2.0 silicon has issue that causes video quality poor with yellow blocks on the screen when playback some Videos. And we have a Software Workaround which is little dangerous to the silicon. This workaround increases the VPU voltage by increasing the VCC to 1.35V. We did not include this workaround code in the release, and suggest that you wait for TO2.1. Because It will shorten your silicon's life cycle, so please pay attention to this before you decided to do so”

# setenv fix_voltage 'i2c mw 0x48 0x2f 0x62; i2c mw 0x48 0x3c 0x62' # setenv bootcmd 'run fix_voltage bootcmd_SD1 bootcmd_SD2' # saveenv

4.3” SEIKO 24bpp LCD (MCIMX28LCD) Supported by default. If necessary do the following: ● When u-boot starts to load, press ‘spacebar’ to pause. # setenv bootargs_android ${lcd} # saveenv ● This will save the environment variables to the SD card. Restart the board and android will load.

7” CHUNGWA 16bpp LCD ● When u-boot starts to load, press ‘spacebar’ to pause. # setenv bootargs_android ${claa_lcd} # saveenv ● This will save the environment variables to the SD card. Restart the board and android will load.

VGA ● When u-boot starts to load, press ‘spacebar’ to pause. # setenv bootargs_android ${vga} # saveenv ● This will save the environment variables to the SD card. Restart the board and android will load.

HDMI (720P@60) ● When u-boot starts to load, press ‘spacebar’ to pause. ○ 720P@60 # setenv bootargs 'console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1280x720M@60 hdmi di0_primary gpu_nommu, gpu_memory=64M' # saveenv ○ 1080P@60 # setenv bootargs 'console=ttymxc0 init=/init androidboot.console=ttymxc0

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

video=mxcdi0fb:RGB24,1920x1080M@60 hdmi di0_primary gpu_nommu, gpu_memory=64M' # saveenv ● This will save the environment variables to the SD card. Restart the board and android will load.

SEIKO LCD + VGA Dual Display ● When u-boot starts to load, press ‘spacebar’ to pause. # setenv bootargs_android 'setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 di0_primary video=mxcdi1fb:GBR24,VGA-XGA vga calibration' # saveenv # run bootcmd ● Once Android has loaded, in the serial port terminal press ‘spacebar’ then enter: # setprop rw.SECOND_DISPLAY_CONNECTED 1

HDMI + VGA Dual Display ● When u-boot starts to load, press ‘spacebar’ to pause. # setenv bootargs 'console=ttymxc0 init=/init androidboot.console=ttymxc0 video=mxcdi0fb:RGB24,1280x720M@60 hdmi di0_primary gpu_nommu, gpu_memory=64M video=mxcdi1fb:GBR24,VGA-XGA vga' # saveenv # run bootcmd ● Once Android has loaded, in the serial port terminal press ‘spacebar’ then enter: # setprop rw.SECOND_DISPLAY_CONNECTED 1

Default Environment Settings Settings used to boot from micro SD are shown below for your reference: # setenv ethaddr address # setenv fec_addr ${ethaddr} # setenv bootcmd ‘run bootcmd_SD1 bootcmd_SD2’ # setenv bootcmd_SD1 'run bootargs_base bootargs_android' # setenv bootcmd_SD2 'mmc read 1 ${loadaddr} 0x800 0x2000;mmc read 1 ${rd_loadaddr} 0x3000 0x300;bootm ${loadaddr} ${rd_loadaddr}' # setenv bootargs_base 'setenv bootargs console=ttymxc0,115200' # setenv vga ‘setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 di1_primary tve ip=dhcp’ #setenv lcd ‘setenv bootargs ${bootargs} init=/init androidboot.console=ttymxc0 di0_primary calibration ip=dhcp' # setenv bootargs_android ${lcd} # setenv loadaddr 0x70800000

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

# setenv rd_loadaddr 0x70D00000 # saveenv

● To boot from tftp/nfs follow the instructions in the document docs/ i.MX_Android_R10.2_User_Guide.html

Notes This release is an engineering release and is tested only for basic functionnality.

Touchscreen Calibration The calibration info is stored at: /media/data/system/calibration

If you want to recalibrate the touchscreen you will need to remove the existing calibration file. To remove the calibration info insert your SD card into the PC and run the following commands from a terminal:

$ cd /media/data/system $ sudo rm calibration

Android Browser Fix Make sure to set your DNS Server address in android after bootup: setprop net.dns1 mydnsaddress

Also make sure an IP address has been assigned to ethernet 0. netcfg eth0 dhcp

You should then see a 'Link is up' indication. Enter 'netcfg' again to verify that there are now IP address and subnet assignments. Now you should be able to use the browser with an ethernet connection.

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8

Support For support questions, please email [email protected]

6/6/2011 Adeneo i.MX53 QSB BSP for Android Gingerbread v4.0 Page 8