TI-Android-GingerBread-2.3.4-DevKit-2.1.2 UserGuide

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Construction Icon small.png This page is currently under construction. The content of this page is due to change quite frequently and thus the quality and accuracy are not guaranteed until this message has been removed. Please feel free to contribute to this page while construction is in progress.
TIBanner.png

Contents

TI_Android_GingerBread_2.3.4_DevKit_2.1.2 User Guide

User Guide - Nov, 2011

NOTE: This document is applicable for Android on AM38xx/TI81xx devices.
The TI Android Development Kit for DM3730, AM37x and AM35x devices can be downloaded from http://focus.ti.com/docs/toolsw/folders/print/androidsdk-sitara.html

About this manual

This document describes how to install, use and work with Texas Instruments' Android Gingerbread DevKit release 2.1.2 for TI81xx/AM38xx platforms running Android. This release package provides a stable Android Gingerbread 2.3.4 distribution with integrated drivers for 3D graphics acceleration (SGX) and hardware-accelerated multimedia. The release consists of

The product forms the basis for all Android application development on TI814X and TI816X platforms. In this context, the document contains instructions to:

Installation

This section describes the list of Software and Hardware requirements to evaluate the DevKit release.

Hardware Requirements

This release of Android Gingerbread DevKit is evaluated on the below given list of platforms. This package should be easily portable on other platforms on similar TI devices.

TI Device Platform Supported Version Other Accessories
DM816x / AM389x TI816X EVM - HDMI Monitor, USB Keyboard, USB Mouse, Ethernet, UART Cable, Audio Speakers, MMC/SD Card (2GB min)
DM814x / AM387x TI814X EVM - HDMI Monitor, USB Keyboard, USB Mouse, Ethernet, UART Cable, Audio Speakers, MMC/SD Card (2GB min)


Software Host Requirements

To evaluate this release we recommend you to have a Linux "Ubuntu 10.04 or above" Host machine, See ubuntu installation notes, http://developer.android.com/sdk/installing.html#troubleshooting

If you are a Android application developer or would like to dynamically install Android applications or would like to use Android SDK Tools (for debugging) then refer to http://developer.android.com/sdk/requirements.html for Host PC requirements

Package Content

 TBD

Out of the Box Demo

This section gives the instructions to quickly prepare an SD Card image and get an experience of Android Gingerbread 2.3.4 on AM38xx/TI81xx platforms.

Host$: tar -xzvf <Board name>.tar.gz
Host$: cd <Board name>

/* For ti814xevm */

Host$: sudo ./mkmmc-android /dev/sd<device> Boot_Images/MLO Boot_Images/u-boot.bin Boot_Images/uImage Boot_Images/boot.scr.ti814x rootfs.tar.bz2 Media_Clips

/* For ti816xevm */

Host$: sudo ./mkmmc-android /dev/sd<device> Boot_Images/MLO Boot_Images/u-boot.bin Boot_Images/uImage Boot_Images/boot.scr.ti816x rootfs.tar.bz2 Media_Clips


For MMC/SD boot - On TI814X EVM the DIP switch S1 and on TI816X EVM the DIP switch SW3 should be set as shown below

Switch
1
2
3
4
5
6
7
8
   9 
10 
State
ON
ON
ON
OFF
ON
OFF
OFF
OFF
OFF
OFF




  NOTE: For the first time boot the System might take few minutes to boot. 
  NOTE: If your NAND flash is not empty the system might not boot with MMC, 
      in that case do the following with Serial Console / Terminal prompt in u-boot 

u-boot#: mmc init
u-boot#: fatload mmc 0 0x81000000 boot.scr
u-boot#: source 0x81000000
  • Android home screen

Android 2.3 DevKit homescreen.jpg

  • Using browser and android applciations

Android 2.3 DevKit browser.jpg


  • Image browsing and media playback

Android 2.3 DevKit gallery.jpg

Android File system mount options

The Android file system can be located in MMC or on Network (mounted using NFS), the following steps describe the procedure to mount Android filesytem on MMC or NFS.

Booting Android over MMC

Prepare file system on MMC/SD card

Use the mk-mmc utility provided in the tools folder of this package to populate the SD Card. This utility helps users create a MMC/SD Card with required Images to boot Android on any given TI platform.

This will partition the SD card to three partitions namely boot, rootfs and data. 1) The boot partition will get populated with the images required for booting. 2) The rootfs partition will be used as android root filesystem partition. 3) The Media inside the folder Media_Clips will get copied to the data partition. The data partition will get mounted as EXTERNAL storage when Android boots up.

Execute the following command

   Example:
    
   #>./mkmmc-android /dev/sdc MLO u-boot.bin uImage boot.scr rootfs.tar.bz2 Media_Clips

This populates the SD/MMC card with all the images.
  NOTE:
    
    To create the boot.scr boot script use the mkbootscr tool found in the Tools directory provided in the DevKit.

If you want to use the pre built images in the DevKit you have to adjust the above mentioned command to take them into account, as a more direct example the commands below will generate a SD card for an TI816X EVM. Ensure you have your SD card connected to the Linux machine you are using and that it is in /dev/sdb for this command otherwise adjust the command accordingly (WARNING: if you get this wrong it can wipe your HDD). Note that this assumes you installed the SDK in your home (~) directory and that the command is run with sudo (or your preferred way of getting super user privileges) to allow for the reformatting of the SD card.

  HOST $ cd ~/TI_Android_GingerBread_2_3_DevKit_2_0/TI816X
  HOST $ sudo ../../Tools/mk-mmc/mkmmc-android.sh /dev/sdb

Configure and boot

AM387x/TI814x:

u-boot#> setenv bootargs 'console=ttyO0,115200n8 andrboot.console=ttyO0 rootwait noinitrd init=/init rw mem=364M earlyprintk notifyk.vpssm3_sva=0xBF900000 vram=32M root=/dev/mmcblk0p2 rootfstype=ext3 ip=off'
u-boot#> mmc init
u-boot#> fatload mmc 0 81000000 uImage
u-boot#> bootm 0x81000000


AM389x/TI816x:

u-boot#> setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 rootwait noinitrd init=/init rw mem=364M earlyprintk notifyk.vpssm3_sva=0xBF900000 vram=32M root=/dev/mmcblk0p2 rootfstype=ext3 ip=off'
u-boot#> mmc init
u-boot#> fatload mmc 0 81000000 uImage
u-boot#> bootm 0x81000000

NOTE:

- If the board has bootargs configured already, then the board will not boot for Android automatically, 
- It is suggested to either delete the bootargs or use the following commands on u-boot prompt through UART console. 
 u-boot#>; mmc init
 u-boot#>; fatload mmc 0 0x81000000 boot.scr
 u-boot#>; source 0x81000000

If the board is not configured for bootargs, then it automatically boots.

Booting Android over NFS

Prepare file system on network machine (PC/server)

Android filesystem can be mounted over network.Following procedure explains the

  Host$: mkdir /home/workdir/Android_nfs
  Host$: cd /home/workdir/Android_nfs
  Host$: tar -jxvf ~/TI_Android_GingerBread_2_3_DevKit_2_0/TI816X/Filesystem/rootfs_ti814x.tar.bz2

Edit /etc/exports file and add following line

  /home/workdir/Android_nfs *(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
  Host$: sudo exportfs -a

Run the following command to restart nfs server

  On Ubuntu 10.04 machine 
  Host$: sudo service nfs-kernel-server restart


Booting over Network Filesystem

Complete bootargs for AM389x/TI816X board using NFS

u-boot#> setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 mem=364M notifyk.vpssm3_sva=0xBF900000 noinitrd ip=dhcp rw init=/init root=/dev/nfs nfsroot=<ip_address>:/home/workdir/Android_nfs rootwait vram=32M earlyprintk'

Complete bootargs for AM387x/TI814X board using NFS

u-boot#> setenv bootargs 'console=ttyO0,115200n8 androidboot.console=ttyO0 mem=364M notifyk.vpssm3_sva=0xBF900000 noinitrd ip=dhcp rw init=/init root=/dev/nfs nfsroot=<ip_address>:/home/workdir/Android_nfs rootwait vram=32M earlyprintk'

Configuring Android Applications

Browser Configuration

To browse web pages user should configure the Internet connection as given below.

  #> netcfg eth0 dhcp
  #> getprop net.eth0.dns1

This prints the dns for the ethernet port, do the following to configure the DNS entries on board.

  #> setprop net.dns1 <your_dns_server_ip>

If the platform is behind proxy, then following command should be executed to set the proxy settings

  #> setprop net.gprs.http-proxy http://proxyurl:80

NOTE: If network is behind a proxy, in this DevKit release, we have NOT found a method to set the proxy server. We tried using "setprop net.eth0.http-proxy hostname:port" and "setprop net.gprs.http-proxy hostname:port", but neither could get us through the proxy. Also, the option of adding an entry of (99,'http_proxy','hostname:port") to the 'system' and 'secure' tables in the /data/data/com.android.providers.settings/databases/settings.db database has also been tried, but failed.


Display Support

LCD out

On AM387x/TI814x device HDMI is used as a default output device. To change output to LCD daugther card attached to evm,kindly follow below procedure

/* open init.rc file */
$ sudo vim /media/rootfs/init.rc
/* comment following line */
//service syslink /system/bin/syslink/rc.syslink start
/* un-comment following line */
service syslink /system/bin/syslink/rc_lcd.syslink start

Component out

On AM389x/TI816x device HDMI is used as a default output device. To change output to Component, please configure sysfs entries by following below procedure.

  #> echo 0 > /sys/devices/platform/vpss/graphics0/enabled
  #> echo 1:hdcomp > /sys/devices/platform/vpss/graphics0/nodes
  #> echo 1 > /sys/devices/platform/vpss/graphics0/enabled

ADB Android Debugger & Downloader

Android Debug Bridge (adb) is a versatile tool lets you manage the state of the Android-powered device. For more information about what is possible with adb, see Android Debug Bridge page at http://developer.android.com/guide/developing/tools/adb.html. The ADB tool can be used to


Downloading "ADB" & Host setup

The adb tool is a part of Android SDK package located at http://developer.android.com/sdk/index.html. For an overview of how to install and set up the Android SDK, follow download & setup instructions from http://developer.android.com/sdk/index.html. Once you install Android SDK, the directory contents look like this.

  |-- add-ons
|-- platforms
|-- platform-tools
|   |-- aapt
|   |-- adb
|   |-- aidl
|   |-- dexdump
|   |-- dx
|   |-- lib
|   |-- llvm-rs-cc
|   |-- NOTICE.txt
|   `-- source.properties
|-- SDK Readme.txt
|-- temp
`-- tools
    |-- adb_has_moved.txt
    |-- android
    |-- ant
    |-- apkbuilder
    |-- ddms
    |-- dmtracedump
    |-- draw9patch
    |-- emulator
    |-- etc1tool
    |-- hierarchyviewer
    |-- hprof-conv
    |-- layoutopt
    |-- lib
    |-- mksdcard
    |-- monkeyrunner
    |-- NOTICE.txt
    |-- proguard
    |-- source.properties
    |-- sqlite3
    |-- traceview
    `-- zipalign

The adb tool is located in platform-tools/ directory under the Android SDK installation. Export the tools and platform-tools directory path as shown below.

  Host$: export PATH=${PATH}:<your_sdk_dir>/tools:<your_sdk_dir>/platform-tools

Connecting Host machine & board through adb

This release of DevKit has been tested for adb over USB Ethernet for connecting a given board with host machine

The below sections describes this method and provides necessary instructions for the same.

adb over Ethernet

    #> netcfg                                                                        
     lo       UP    127.0.0.1       255.0.0.0       0x00000049                       
     eth0     UP    172.24.190.59   255.255.252.0   0x00001043                       
    #> netcfg eth0 dhcp
    #> setprop service.adb.tcp.port 5555


    #> stop adbd
    #> start adbd
    Host$: export ADBHOST=<target's ip address>
    Host$: adb kill-server
    Host$: adb start-server
    Host$: adb devices 

If connected, you'll see the device name listed as a "emulator-5554"

    List of devices attached
    emulator-5554    device
    Host$: adb shell 

For more information about adb commands, see Android Debug Bridge page at http://developer.android.com/guide/developing/tools/adb.html

Running Applications

The root File System provided in this DevKit releases contains only standard Android components and applications. User might be interested to download & run android applications (.apk) available in the market. The below procedure gives the steps to be followed to download any .apk file to the board and run it on the platform.

Installing (.apk files) application on Target Platform

    Host$: adb install <package>.apk. 
  

NOTE: Use -s option with the adb tool, to install the package on external storage.

On successful installation adb tool will report SUCCESS on host terminal, and the application would be listed on the android main menu.

Un-installing applications (.apk) using adb

  Host$: adb uninstall <package>.apk
  Main menu -> Menu -> Settings -> Applications -> Manage applications -> Find the package 
  Tap on it -> Uninstall -> OK -> OK
  Host$: adb shell
  #rm /system/app/app.apk

On successful removal, the application would have been removed from the android main menu.

Setup ADB for application Debugging

ADB and Eclipse, with ADT( Android Development Tools plug-in) allow users to create and debug Android applications. Follow Developing In Eclipse, with ADT at http://developer.android.com/guide/developing/eclipse-adt.html

Steps to connect Eclipse to the board.

  Verify the connectivity by executing 
  Host$: adb devices

For more detailed and complete information on the above follow Developing In Eclipse, with ADT at http://developer.android.com/guide/developing/eclipse-adt.html

  Window -> Open Perspective -> Other -> DDMS; 
  Click on OK

Copy any files to and from the board over ADB

    Host$: adb pull <remote> <local>
    Host$: adb push <local> <remote>

In the commands, <local> and <remote> refer to the paths to the file or directory on your development host (local) and on the target instance (remote).

    Here's an example: 
  Host$: adb push foo.txt /sdcard/foo.txt

Adobe Flash 10 Integration

The Android version of Flash10 that runs on Gingerbread is now available for customer download (by registration) at, http://focus.ti.com/docs/toolsw/folders/print/adobeflash-a8.html

The below steps give the procedure to download the Adobe Flash 10 library for Android Gingerbread and installing the same in File system.

Host$: ./ Flash10.1_Android_Webkit_Plugin-0.4-Linux-x86-Install.bin
Will result in following instruction, press "Y" 
This will install Flash10.1 Android Webkit Plugin on your computer.  Continue? [n/Y] Y
Select the source install location
Where do you want to install Flash10.1 Android Webkit Plugin? 
[/home/user/flash10_androidplugin] /home/user/flash10_androidplugin
Installing Flash10.1 Android Webkit Plugin...
Installing Program
Files...                                                                                                                                
Installation complete.
After Installation the following directory structure is resulted 
Host$: cd flash10_androidplugin 
Host$: ls
install_flash_player.apk  uninstall

 Host$: adb install install_flash_player.apk

Compatibility Test Suite (CTS)

This section describe the procedure to run CTS on any platform.

  cts_host > ls –plan 
  cts_host > start --plan <plan name>

Once all the tests are executed, the results can be browsed in an browser by opening [android-cts/repository/results/session-name/testResult.xml] and use the results to adjust your design.

  #> stop adbd;sleep 1;start adbd;

SD Card Recommendations

Some brands or models of SD cards are observed with poor performance on TI81xx EVMs and other platforms. The symptom could be one or some of the followings.


The table below lists the SD cards tested which have no issue on performance.


Brand/Model Type Class Capacity
Sandisk-C4-4GB.jpg SanDisk SDHC 4 4GB
Sandisk-ultra-C4-16GB.jpg SanDisk Ultra SDHC 4 4GB
Sandisk-ultra-C4-16GB.jpg SanDisk Ultra SD 4 2GB
SONY-C4-4GB.jpg Sony SDHC 4 4GB
SONY-C4-2GB.jpg Sony SD 4 2GB
SONY-micro-C4-4GB.jpg Sony micro SDHC 4 4GB


The table below lists the SD cards tested which have poor performance.


Brand/Model Type Class Capacity

HP Invent SDHC 4 4GB

Kingston SDHC 4 4GB
Kingston-C4-4GB.jpg Kingston micro SDHC 4 4GB
Lexar-Multi-Use-C4-4GB.jpeg Lexar MULTI-USE SDHC 4 4GB
Lexar-PlatinumII-C6-4GB.jpeg Lexar PLANTINUM II SDHC 6 4GB
PNY-Optima-C4-4GB.jpg PNY Optima SDHC 4 4GB


Versioning

TBD

Content Link Ref#
Developers Guide TBD
Release Notes TBD
Downloads TDB

Technical Support and Product Updates

For further information or to report any problems, contact http://e2e.ti.com/android or http://support.ti.com.
For community support join http://groups.google.com/group/rowboat
For IRC #rowboat on irc.freenode.net

E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article TI-Android-GingerBread-2.3.4-DevKit-2.1.2 UserGuide here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox