NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

AM335X EVM-SK Android Devkit Guide

From Texas Instruments Wiki
Jump to: navigation, search

Content is no longer maintained and is being kept for reference only!

Contents

AM335X EVM-SK Android Devkit Guide
[edit]

Content is no longer maintained and is being kept for reference only!

EVM-SK.JPG


EVM-sk is a development board, equipped with ARM Cortex A8 processor, SGX graphics processor, sensors, and Wireless connectivity.

This platform is well suited as a development platform for mid-end android solutions.
This document contains instructions to:

  • Install the release
  • Set up the hardware
  • Use the pre-built binaries in the package
  • Run Android on the supported platforms
  • Set up the Android debugger “adb” with the hardware platform
  • Install and execute Android (out of market) applications on hardware platforms


EVM-sk Features
[edit]


Feature
Processor
AM335x 1 GHz
Display
4.3” LCD with Touch screen
Memory
256MB DDR3
Wi-Fi
Integrated WLAN 802.11 b/g/n
Bluetooth
BT2.1 with EDR
USB
High speed 2.0 OTG multiplex with Debug uart
Audio
Stereo audio with auxiliary LINE OUT
Storage
SD\MMC card on SD\MMC interface
Camera
USB Camera interface
Sensors
Accelerometer on I2C



Installation
[edit]

This section explains how to prepare a micro-sd card for booting android on the EVM-sk. The details on booting the EVM-sk and evaluating Android is also explained.

Hardware Requirements[edit]

TI Device Platform Supported Version Other Accessories
AM335x EVM-SK 1.2 Micro-USB cable, Ethernet cable, Audio Speakers, micro-SD Card (2GB min), USB Keyboard, USB Mouse, USB Camera Module

Software Host Requirements[edit]

The host and target software dependencies and requirements are described below.

Host PC requirements[edit]

If you are an Android application developer or would like to use Android SDK Tools then refer to Android SDK Requirements for Host PC requirements.

To evaluate this release we recommend you to have a Linux "Ubuntu 10.04 or above" Host machine, See Ubuntu Linux installation notes

Setup[edit]

This section gives the instructions to quickly prepare an SD Card image and get an experience of AM335x EVM-SK platforms/devices.


Getting Prebuilt Images[edit]

EVM-sk Prebuilt from Prebuilt images can be obtained from


Preparation of SD card[edit]

Connect a Micro SD card (Atleast 2GB size and Class 4) via a USB card reader on an Ubuntu Machine
From a terminal, type the below commands,

$ tar -jxvf TI_Android_EVM-sk.tar.bz2
$ cd TI_Android_EVM-sk

The tree structure for pre-built image directory should be as:
   .
   `-- <Board Name>
       |-- START_HERE
       |-- Boot_Images
       |   |-- MLO
       |   |-- u-boot.img
       |   |-- uEnv.txt
       |   `-- uImage
       |-- Filesystem
       |   `-- rootfs.tar.bz2
       |-- Media_Clips
       |   |-- Audio
       |   |-- Images
       |   `-- Video
       |-- README.txt
       `-- mkmmc-android.sh

$ sudo ./mkmmc-android.sh /dev/sd<device> 

The above step prepares the SD Card with three partitions.

  1. boot - Boot Images (Boot Loaders, Boot Script and Kernel)
  2. rootfs - Filesystem (Android ICS 4.0.3)
  3. data - Media Clips (Audio, Video and Images)

Now this card can be used to boot the EVM-sk

Hardware setup[edit]

Connect MicroB USB Cable, Ethernet Cable and 5V DC Power to the EVM-sk and have it powered. Windows or Linux Host can be used to connect and evaluate EVM-sk. We prefer to use Ubuntu > 10.04 as the host to connect to EVM-sk.

Getting serial console
[edit]

Serial console is provided via micro-usb cable connection between the EVM-sk and the Host. To establish a connection the serial console enter the following commands on the linux console:

$ sudo modprobe ftdi_sio vendor=0x0403 product=0xa6d0
$ minicom -D /dev/`dmesg | grep FTDI | grep "now attached to" | tail -n 1 | awk '{ print $NF }'` 

Powering on to Android Terminal[edit]

Put the Micro SD card to the slot on the EVM-sk. Press the power button(SW5) for 3 sec that is given down of the user LEDs. EVM-SK-power-key1.JPG

Allow the boot loader to run.Kernel boots up and Android shell is activated. Wait till Android init to start the zygote thread.
See the below message appearing on the shell.

warning: `zygote' uses 32-bit capabilities (legacy support in use) 

Booting the platform[edit]

Booting over MMC using uEnv.txt

   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. 
   #> mmc init
   #> fatload mmc 0 0x82000000 uEnv.txt
   #> source 0x82000000

Boot arguments[edit]

Boot arguments for EVM-sk are as follows

 bootargs=console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait init=/init ip=off
 bootcmd=mmc rescan ; fatload mmc 0 81000000 uImage ; bootm 81000000
 uenvcmd=boot

Configure Boot Arguments[edit]

The boot script (uEnv.txt) helps the board to boot automatically (Provided the NAND environment is empty).

  • Create a boot script file named uEnv.txt file with following content:
File: uEnv.txt
bootargs=console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait init=/init ip=off
bootcmd=mmc rescan ; fatload mmc 0 81000000 uImage ; bootm 81000000
uenvcmd=boot


NOTE: You can edit uEnv.txt to update bootargs and bootcmd.


Android Home Screen
[edit]

After the first boot, the user will see an unlocked Android home screen. On subsequent boot, a locked screen will be displayed. User needs to unlock the screen via TouchScreen by dragging the lock tab accross the screen. Once the screen is unlocked, the user can navigate using the icons on the right side of the display. Shortcuts are provided for Browser, RowboPERF benchmarks etc.

EVM-sk-home2.png

Keypad mappings[edit]

The below table lists the keypad mappings to Android UI functionality

EVM-SK-keys.JPG

Functionality
Keypad Button
MENU
SW1
HOME
SW2
BACK
SW3
SEARCH
SW4

Out of the Box Demo[edit]

Multimedia Experience[edit]

  • Using browser and android applications

EVM-sk-first-page.png

Swipe across the screen to access more applications and widgets.

  • Image browsing and media playback

View Image[edit]

NOTE: The Android pre-built filesystem includes few images from http://www.freephotobank.org/main.php, they are marked under Creative Commons License. Thanks to Freephotobank.

Select "App Launcher" -> "Gallery" -> "Images". Click any thumbnail to view the image.

Double click the image to zoom in/out. Slide the image to view next image.

Gallery: Pictures

Play Video[edit]

Select "App Launcher" -> "Gallery" -> "Video". Click any thumbnail to play the video.

You can use the UI controls to Pause/Play/Seek the video. To stop playback and exit press the back key button.

Media Player

Play Music[edit]

Select "App Launcher" -> "Music" -> "<Artist>" -> "<song-name>" to experience the music.

Music Player

Control Volume[edit]

  • Select "App Launcher" -> "Settings" -> "Sound" -> "Volumes"
Enable Video Frame Per Second logs in Logcat
[edit]

To print the FPS in logcat dump, type this command on the console before starting playback:

  # setprop debug.video.showfps 1

To disable the prints, type:

  # setprop debug.video.showfps 0

Rowboperf and 3D graphics applications[edit]

RowboPERF is comprehensive set of banchmarks and Demos.
Select the rowboperf icon and get into the app directory. For more information on RowboPERF, please check RowboPERF User Guide

Rb rowbo.JPG

Browser Experience[edit]

EVM-sk-Browser.png


NOTE:Set the time and date

Crank Demo applications[edit]

The demos provided were generated by Crank Software's Storyboard Suite. It provides UI Designers and Embedded Engineers a GUI development tool and embedded runtime to rapidly create rich animated user interfaces. Storyboard provides a drag and drop UI development environment that imports content directly from Photoshop and easily exports an Android APK that is completely accelerated through the Android NDK OpenGL ES 2.0 interface.

Storyboard from a single tool and runtime to prototype, develop and deploy embedded user interfaces. For more information or to obtain an evaluation license to the Storyboard suite, contact Crank Software at http://cranksoftware.com/


Storyboard 30 Day Evaluation

http://cranksoftware.com/products/eval.php


Storyboard on Android

http://cranksoftware.com/products/android.php


Storyboard Tutorial - Photoshop to Android APK

http://www.youtube.com/watch?v=xF8dRFvbB8w&feature=plcp


Crank Story-board Demo

EVM-sk-Crank-app1.png

Crank Thermostat Demo

EVM-sk-Crank-app-thermostate.png

Ethernet Configuration[edit]

Ethernet is configured by default for DHCP. Use below command to verify Ethernet configuration

  # netcfg
  e.g.
  lo       UP                                   127.0.0.1/8   0x00000049 00:00:00:00:00:00
  sit0     DOWN                                   0.0.0.0/0   0x00000080 00:00:00:00:00:00
  eth0     UP                               172.24.191.26/22  0x00001043 96:cd:df:8b:c6:2b

You can configure ethernet from the Settings menu.

Settings menu

  • Select Ethernet configuration. Here you can enable/disable ethernet and perform any additional configuration.

Ethernet Settings menu

  • Choose between DHCP and static IP based on your network configuration

Choose DHCP or static IP

  • Optional If you need to set up proxy, configure this from Ethernet proxy settings:

Configure ethernet proxy

Accelerometer Sensor[edit]

This release supports the built-in accelerometer on the EVM-sk. You can check accelerometer functionality in the following ways:

Auto-rotate screen[edit]

  • Browse to the "App Launcher" -> "Settings" -> "Display".
  • Enable the "Auto-rotate screen" feature. Ensure the Check box gets ticked.
  • Now hold the device in horizontal or vertical orientation to find the screen getting rotated.

Auto Rotate:Landscape Mode Auto Rotate:Portrait Mode

NoteNote: The device should be kept vertically for best results

Amazed Game[edit]

Android-ics-amazed-icon.png

  • Launch Amazed by browsing to the "App Launcher" -> "Amazed".
  • The game starts. Tap the screen to begin.
  • Hold the device in different orientation to move the ball to the destination and hence test the accelerometer.

Camera Support[edit]

Ti Android ICS supports USB camera for EVM-sk

Feature supported:

  • Image Capture
  1. Go to application/activity view luncher > open camera
  2. Click on camera capture.By default images will get stored at - /sdcard/DCIM
NoteNote: Video recording is not supported

Dual Ethernet[edit]

EVM-sk support Dual Ethernet support .

  1. Jumper J6 is a eth0
  2. Jumper J5 is a eth1
  • when you connect Ethernet cable in J6 then go

browse to "App Launcher" -> "Settings" -> "Ethernet configuration" -> "Ethernet configuration" -> "Ethernet Devices" and select eth0 EVM-sk-Ethernet.png

  • when you connect Ethernet cable in J5 then go

browse to "App Launcher" -> "Settings" -> "Ethernet configuration" -> "Ethernet configuration" -> "Ethernet Devices" and select eth1

Wireless[edit]

EVM-sk supports Wi-Fi and Bluetooth on Android.

Wi-Fi[edit]

Enabling Wi-Fi[edit]
  • To turn on Wi-Fi, browse to "App Launcher" -> "Settings" -> "Wi-Fi".
  • Enable Wi-Fi by sliding the ON/OFF tab to the ON position and wait for few seconds.
  • The device scans for the available APs and displays them.

AP scan results

  • Connect to desired AP by clicking on its name and enter required details (username/key etc) and click Connect

Login to AP

  • The following appears on console
[ 1270.525207] wl1271: loaded
[ 1271.494323] wl1271: firmware booted (Rev 6.3.6.0.79_2)
[ 1271.499694] wl1271: Driver version: R4_SP2_03_00
[ 1336.340881] cfg80211: Calling CRDA for country: IN
[ 1336.379425] cfg80211: Regulatory domain changed to country: IN
[ 1336.385559] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 1336.394287] cfg80211:     (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 1336.402160] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 1336.410064] cfg80211:     (5250000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 1336.417968] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[ 1340.068145] wl1271: Association completed.
  • when successfully connected, you will see status as connected under the respective AP name
Disabling Wi-Fi[edit]
  • To turn off Wi-Fi, browse to "App Launcher" -> "Settings" -> "Wi-Fi".
  • Disable Wi-Fi by sliding the ON/OFF tab to the OFF position.
  • Following message appears on console and the Wi-Fi status is shown as OFF.
[ 1459.324127] cfg80211: Calling CRDA to update world regulatory domain
[ 1459.381622] cfg80211: World regulatory domain updated:
[ 1459.386993] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 1459.395721] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1459.403991] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 1459.412261] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 1459.420501] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1459.428741] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 1459.438476] wl1271: down
Wi-Fi Hostspot (SoftAP)[edit]

TI-Android-ICS-4.0.3-DevKit-3.0.1 supports Wi-Fi hostspot (SoftAP) feature with TI WL1271 Wireless module.

  • To turn on Wi-Fi hotspot, browse to "App Launcher" -> "Settings" -> "More..." -> "Portable hotspot"

More settings in Wireless and Networks

  • Click "Configure Wi-Fi hotspot" to configure the hotspot settings..
NoteNote: Do not enable Wi-Fi Hotspot before configuring the settings. Changing the settings after enabling Wi-Fi hotspot may result in hotspot malfunction

Portable Hotspot menu

configuring hotspot with open security

  • Click the checkbox next to "Portable Wi-Fi hotspot" to start hotspot. You will see the message "Tethering or hotspot active" in the notification bar once the hotspot is fully functional.

hotspot active

  • The following screenshot shows the hotspot being detected from another evm.

hotspot detected on another evm


NoteNote: Tethering with another network interface like ethernet is not currently supported in this DevKit release
Wi-Fi Direct[edit]

TI-Android-ICS-4.0.3-DevKit-3.0.1 supports Wi-Fi Direct with TI WL1271 Wireless module.

  • To turn on Wi-Fi direct, browse to "App Launcher" -> "Settings" -> "More..."
  • Click checkbox next to "Wi-Fi direct".

enable Wi-Fi Direct

  • After Wi-Fi direct is enabled, click "Wi-Fi direct: Set up peer-to-peer connections". This window shows any nearby devices with Wi-Fi direct enabled.

Other Wi-Fi direct devices detected on evm


NoteNote: Wi-Fi station mode or SoftAP/hotspot mode, if enabled, shall be disabled when Wi-Fi direct is active. The earlier state is restored when Wi-Fi direct is disabled
Changing WLAN MAC address[edit]

The devices loaded with TI-Android-ICS-4.0.3-DevKit-3.0.1 will have the same MAC address which is encoded in wl1271-nvs.bin file. This may result in Wi-Fi not operating correctly when multiple devices are simultaneously in use. For optimum results, we recommend to modify the MAC address to ensure unique MAC for the devices before use

NoteNote: Ensure that Wi-Fi (STA mode), hotspot (SoftAP) or Wi-Fi direct is not enabled when you are changing the MAC address

To change the MAC address, perform the following on the serial console of device:

  • First get the current MAC address for WLAN:
  root@android:/ # calibrator get nvs_mac /system/etc/firmware/ti-connectivity/wl1271-nvs.bin
  • Then update the MAC address for WLAN:
  root@android:/ # calibrator set nvs_mac /system/etc/firmware/ti-connectivity/wl1271-nvs.bin <MAC Address>

You need to reboot the board after changing the MAC address.

Bluetooth[edit]

Enabling Bluetooth[edit]
  • To turn on Bluetooth, browse to "App Launcher" -> "Settings" -> "Bluetooth".
  • Enable Bluetoth by sliding the ON/OFF tab to the ON position and wait for few seconds.
  • Bluetooth icon appears on taskbar.
  • When BT is enabled the status shows Turning Bluetooth ON and lists out the available Bluetooth devices.

BT scan results

  • Select the desired device to pair with.
  • A popup dialog with pin will appear.

PIN for pairing

  • Click Pair button to confirm pairing.
  • Verify that the desired device shows the same pin. click OK. And then the device gets listed under the paired devices category.
NoteNote: When pairing with Bluetooth headset, pin may not be displayed. Android attempts to pair automatically with Bluetooth headsets. Pin dialog will be shown only if auto-pairing fails.
Disabling Bluetooth[edit]
  • To turn off Bluetooth, browse to "App Launcher" -> "Settings" -> "Bluetooth".
  • Disable Bluetooth by sliding the ON/OFF tab to the OFF position.
Bluetooth Object Push profile[edit]

Using Bluetooth, it is possible to send / receive files (pictures, media files etc).

Sending files[edit]

NoteNote: 'Share using Bluetooth' is not enabled by default in the Gallery app. You need to install a third party application like BlueFTP to enable the sharing option. Follow the instructions from http://www.medieval.it/blueftp-android/menu-id-68.html to download BlueFTP

  • browse to "App Launcher" -> "Gallery" -> "Images".
  • Select a picture to share.
  • Click share icon (top bar), select bluetooth from the options
  • select paired BT device to send to.
  • The BT device will prompt to accept. Accept incoming file at the other device.
  • Once download finishes, check file.
Receiving files[edit]
  • On paired device (e.g. phone), select send via Bluetooth, click on AM335XEVM.
  • On evm, notification appears about incoming connection.

incoming transfer icon

  • Open the task bar and select "Bluetooth share: Incoming file".

incoming transfer message

  • A pop up appears asking for confirmation. On popup click Accept.

Confirm incoming transfer

  • Once download completes, check file.
Bluetooth A2DP[edit]

You can listen to Media audio on Bluetooth A2DP headset.

  • Pair A2DP capable bluetooth headset with device. Android uses the stereo headset icon to denote A2DP headset.
  • After pairing succeeds, the status is updated to 'Connected'.

A2DP headset pairing

  • Open Music player and play any audio clip.
  • Audio will be heard on the Bluetooth headset.
Bluetooth HID[edit]

You can connect to Bluetooth keyboard or mouse.

Bluetooth Keyboard[edit]
  • Pair with the Bluetooth keyboard, by providing the suitable pass-code from the keyboard matching to the code shown on the device.
  • After the successful pairing of the keyboard with the device, the keyboard will be listed under the paired devices category.
  • The supported functionality of the paired keyboard can be used on the device.
  • For disconnecting the keyboard from the device, select the keyboard under paired devices category, and agree to disconnect message.

Bluetooth keyboard detected

Bluetooth keyboard pairing

Bluetooth Mouse[edit]
  • Pair with the Bluetooth mouse, by providing the suitable pass-code from the device, matching to the supported code of the mouse.
  • After the successful pairing of the mouse with the device, the mouse will be listed under the paired devices category.
  • The supported functionality of the paired mouse can be used on the device.
  • For disconnecting the mouse from the device, select the mouse under paired devices category, and agree to the disconnect message.

Bluetooth mouse detected

Bluetooth mouse pairing

Bluetooth AVRCP[edit]

You can control Media playback with Media player keys on Bluetooth headset with AVRCP capabilities.

NOTE: The following steps assume Bluetooth A2DP headset with AVRCP.

  • Pair the BT headset
  • The following text appears on the debug serial when the pairing is successfully completed. This confirms that AVRCP feature is registered with android
 [ 3291.281250] input: AVRCP as /devices/virtual/input/input4
  • Open Music Player and go to playlist view. Check that there are multiple clips in the playlist.
  • Press the Play/Pause button on the BT headset - The currently queued clip begins playing on the headset.
  • Press the Play/Pause button again on the headset - The currently playing clip is paused.
  • Press the Next button on the headset; the next clip in the playlist begins to play on the headset.
  • Press the Prev button on the headset; the currently playing clip restarts from the beginning.


Power Management[edit]

Power management is supported on EVM-sk.


BackLight Control

  • Change of LCD backlights based on Wake Locks and Screen Timeouts
  • LCD back light brightness control from Settings Application

Suspend and Resume

  • Suspending the device to Memory.The following features are supported
  1. Suspend by a screen timeout.
  2. Prevent Suspend based on Wake Locks.
  3. System Resume on (SW3)Key Press or Touch 

CPU Freq or Dynamic Voltage Frequency Scaling(DVFS)

  • A PM feature to automatically increase / decrease frequency and drop voltage based on CPU usage.
  • There are four different governors which can be used to control this feature, namely ondemand, performance, powersave and userspace governors.

CPU Idle States

  • There are two deeper power states introduced by CPU Idle namely Wait for interrupt,WFI and DDR Self Refresh.

Basic Settings[edit]

Enable PM[edit]

By default we have disabled PM with the setting "setprop hw.nopm true" in init.rc.

Replace the line with "setprop hw.nopm false" to enable suspend/resume features.

Remove the selection "App Launcher" -> "Settings" -> "Developer options" -> "Stay awake" if selected already.

To go in suspend mode
[edit]
  • Release the USB wake lock by Giving the below command
   $ echo usb_connected > sys/power/wake_unlock
  • wait for screen time out.
To resume from suspend mode
[edit]
  • Touch the LCD screen for 3 to 4 second OR
  • Press Back Key (SW3)
To set the Screen Timeout to go suspend
[edit]
  • Select "App Launcher" -> "Settings" -> "Display" -> "Sleep"
  • Select one of the options from the list.
To set set the screen always on preventing suspend
[edit]
  • Select "App Launcher" -> "Settings" -> "Developer options" -> "Stay awake"
To set Screen Brightness[edit]
  • Select "App Launcher" -> "Settings" -> "Display" -> "Brightness"
To set Alarm in Android[edit]
  • Select "App Launcher" -> "Clock "
  • Click "Set alarm" -> "Add Alarm". Set the alarm as per requirements.

Device will be woken up from suspend at Alarm Time.

Advanced Settings[edit]

To Disable Power Management[edit]
  • Edit init.rc file on the root directory.
  • Set the property hw.nopm to true

This will prevent screen timeout based suspend.

CPU Dynamic Voltage Frequency Scaling settings[edit]
Enabling ondemand frequency governor[edit]

The ondemand governor enables DVFS(frequency/OPP) transitions based on CPU load.

  #echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Enabling performance frequency governor[edit]

The performance governor keeps the CPU always at the highest frequency.

  #echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Enabling powersave frequency governor[edit]

The powersave governor keeps the CPU always at the lowest frequency.

  #echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Enabling userspace frequency governor[edit]

Once this governor is enabled, DVFS( frequency) transitions will be manually triggered by a userspace application by using the CPUfreq sysfs interface

  #echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

See all the available operating points

  #cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

Application can select any of the available frequency from the above

  #echo  <Desired Frequancy> > /sys/devices/system/cpu/cpu0/cpufreq/ scaling_setspeed
CPU Idle settings[edit]

All states of Cpu Idle are enabled by default. System enter deeper states when the cpu is idle. The usage and time count for these different states can be checked via

  #cat /sys/devices/system/cpu/cpu0/cpuidle/state*/time
  #cat /sys/devices/system/cpu/cpu0/cpuidle/state*/usage

To minimize the power consumption in runtime[edit]

The maximum power reduction in runtime is achieved when dvfs option is set to “power save”.

Power Consumption Analysis[edit]

Please check the power consumption analysis at TI-Android-ICS-4.0.3-DevKit-3.0.1 Performance Benchmark page

Limitations[edit]

  • Alarm to wake up the device from suspend will not work since there is no Real Time Clock functional when the device is put into suspend.
  • To wake the device from suspend, the user need to tap the touch the screen a little longer (2 seconds) .
  • System never enter "WFI and DDR Self Refresh" cpu idle state since display is always active and preventing this state to enter in runtime.

Booting Android over NFS[edit]

Prepare file system on network machine (PC/server)[edit]

Android filesystem can be mounted over network. Follow the procedure explained below:

  • Extact the android filesystem
  $ mkdir /home/workdir/Android_nfs
  $ cd /home/workdir/Android_nfs
  $ tar -xjvf ~/rootfs.tar.bz2
  • Change the permission of target rootfs else it will give permission denied errors
   $ sudo chmod -R 777 /home/workdir/Android_nfs
  • Export filesystem using NFS

Edit /etc/exports file and add following line

  /home/workdir/Android_nfs *(rw,sync,no_subtree_check,no_root_squash)
  • Run exportfs command
  $ sudo exportfs -a
  • Restart the NFS server

Run the following command to restart NFS server

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

Booting over Network Filesystem[edit]

Below are the complete bootargs for different boards using NFS:

  setenv bootargs 'console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=/dev/nfs nfsroot=<server-ip>:/home/workdir/Android_nfs rw rootwait init=/init ip=dhcp omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M'

Developing with source code
[edit]

This section show the steps to obtain the complete source code for the android images(Boot loader, Kernel and Filesystem) and to build the same.

Host (PC) setup requirements[edit]

The host development environment for Android is based on Ubuntu, please install Ubuntu version 10.04 or later http://www.ubuntu.com/desktop/get-ubuntu/download. The host installation would need few more Android specific dependencies, these can be installed dynamically over network using below commands.
For Ubuntu on 32-bit machines

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo add-apt-repository "deb-src http://archive.canonical.com/ubuntu lucid partner"
$ sudo apt-get update
$ sudo apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev minicom tftpd uboot-mkimage expect
$ sudo update-java-alternatives -s java-6-sun

Developers can download the sources from the gitorious.org/rowboat repository.

A tool called 'Repo' helps to fetch the android sources from gitorious.org/rowboat. Repo is a tool that makes it easier to work with Git in the context of Android.
For more information about Repo, see the link http://source.android.com/source/version-control.html.
To install, initialize, and configure Repo, follow these steps:
Make sure you have a bin/ directory in your home directory, and that it is included in your path:

$ mkdir ~/bin
$ PATH=~/bin:$PATH


Download the Repo script and ensure it is executable:

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo


The following commands help developers to clone sources from www.gitorious.org/rowboat repository

$ mkdir $HOME/rowboat-android
$ cd $HOME/rowboat-android
$ repo init -u git://gitorious.org/rowboat/manifest.git -m TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1.xml
$ repo sync


Using Pre-Packaged Sources[edit]

The above method is time consuming, so developers can use the pre-packaged Android sources in DevKit package.

Download the pre-packaged DevKit sources from TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1.bin.

Run following commands to extract the pre-packaged source:

  • Commands
 $ mkdir $HOME/rowboat-android
 $ cd $HOME/rowboat-android
 $ chmod a+x TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1.bin
 $ ./TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1.bin
  • Accept the Licence when the installer prompts
  • This will generate following sources
    • Android File system : $HOME/rowboat-android/TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1/
    • Android Linux Kernel: $HOME/rowboat-android/TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1/kernel
    • Bootloader  : $HOME/rowboat-android/TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1/u-boot
    • Toolchain location will be at $HOME/rowboat-android/TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin

Building Source Code
[edit]

Tool chain setup[edit]

Setup the tool-chain path to point to arm-eabi- tools in prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin

$ export PATH=$HOME/rowboat-android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH

Compilation procedure
[edit]

To build boot loader (u-boot)[edit]
  • Change directory to u-boot
  $ cd u-boot
  • Execute the following commands
  $ make CROSS_COMPILE=arm-eabi- distclean
  $ make CROSS_COMPILE=arm-eabi- am335x_evm_config
  $ make CROSS_COMPILE=arm-eabi- 
  • This command will generate the MLO and the u-boot Image "u-boot.img"
To build Linux kernel[edit]
  • Change directory to kernel
  $ cd kernel

  • Do the following to build kernel sources for EVM-sk
  $ make ARCH=arm CROSS_COMPILE=arm-eabi- distclean
  $ make ARCH=arm CROSS_COMPILE=arm-eabi- am335x_evm_android_defconfig
  $ make ARCH=arm CROSS_COMPILE=arm-eabi- uImage
  • This will generate uImage (kernel image) in kernel/arch/arm/boot folder
To build Android filesystem[edit]
  • RowboPERF Integration

This step is needed only if the RowboPERF Application needs to be included in the Android file system.

  • Download the sources from rowboat
  $ git clone  git://gitorious.org/rowboat/rowboperf.git 
  $ cd rowboperf
  $ git checkout in rowboat-ics branch 

NOTE: Clone RowboPERF sources inside the rowboat-android tree.

  • Android filesystem build will take care of the integration of rowboperf applications

To Build the root file system for the EVM-sk, from android source top directory, type the following command

  $ make TARGET_PRODUCT=am335xevm_sk -j8 OMAPES=4.x

This step will build the rowboPerf and install packages at

   out/target/product/am335xevm_sk/system/app 
   out/target/product/am335xevm_sk/system/bin
Create root filesystem tarball[edit]

Prepare the root filesystem as follows:

  $ cd out/target/product/am335xevm_sk
  $ mkdir android_rootfs
  $ cp -r root/* android_rootfs
  $ cp -r system android_rootfs
  $ sudo ../../../../build/tools/mktarball.sh ../../../host/linux-x86/bin/fs_get_stats android_rootfs . rootfs rootfs.tar.bz2

The rootfs.tar.bz2 is the android filesystem, it can be put on a SD/MMC Card or used our NFS.

To generate SD/MMC card to boot Android[edit]

These compiled Images can be copied to a SD / MMC card to boot Android on the Flashboard.

Copy all the images to one folder

  $ mkdir image_folder
  $ cp kernel/arch/arm/boot/uImage image_folder
  $ cp u-boot/u-boot.img image_folder
  $ cp u-boot/MLO image_folder
  $ cp out/target/product/am335xevm_sk/rootfs.tar.bz2 image_folder
  $ cp Media_clips image_folder

NOTE: Get the Media_clips folder from the SD card prebuilt image

  $ cp mkmmc-android.sh image_folder

NOTE: Get the mkmmc-android.sh script from the SD card prebuilt image

Connect an SD card to the Host machine

Invoke the mkmmc-android.sh script to prepare the card for booting

  $ cd image_folder
  $ sudo ./mkmmc-android.sh <sd card mounted dev folder example:/dev/sdc> MLO u-boot.bin uImage boot.scr rootfs.tar.bz2 Media_Clips

Wait for the script to complete.
Safely remove the SD card and put it on the EVM-sk for Booting.

Demo applications Installation[edit]

The pre-built Image includes few demo applications,these applications were not developed by TI as such. The source sites and licensing for these apps is as given below:

Apps Licensed PATH
Pocket-chess GPL v-2 http://code.google.com/p/pocket-chess-for-android
FBReader GPL v-2 https://code.google.com/p/fbreader-pockebook
Frozen-Bubble GPL v-2 http://f-droid.org/repository/browse/?fdcategory=Games&fdid=org.jfedor.frozenbubble&fdpage=1
NPR-News Apache Licences 2 http://code.google.com/p/npr-android-app


Steps to download and integrate the demo apps in Android rootfs is as given below:

1-Download demo applications from gitoroius

  $ cd ~
  $ git clone git://gitorious.org/rowboat/demo-apks.git

2-Copy demo-apks folder to filesystem/data/app folder

  $ cp -r demo-apks/* <androidfilesyatem/data/app>
  • Download the sources from rowboat
  $ git clone  git://gitorious.org/rowboat/rowboperf.git 
  $ cd rowboperf
  $ git checkout  origin/rowboat-ics-evmsk  

NOTE: Clone RowboPERF sources inside the rowboat-android tree.

3-Compile the Rowboperf

  $ mm TARGET_PRODUCT=am335xevm_sk  OMAPES=4.x

4-Remove the launcher2.apk in filesystem/system/app folder

5-Create the root tar file system use below command

  $ make TARGET_PRODUCT=am335xevm_sk  OMAPES=4.x fs_tarball

ADB[edit]

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

  1. Download an application from a host machine, install & run it on the target board.
  2. Start a remote shell in the target instance.
  3. Debug applications running on the device using the debugging tool DDMS ( Dalvik Debug Monitor Server) which runs on top of adb connection.
  4. Copy files to and from the board to host machine

Please visit http://processors.wiki.ti.com/index.php/Android_ADB_Setup for setting up ADB on the EVM-sk

Porting Information[edit]

Android porting guide is at http://processors.wiki.ti.com/index.php/TI-Android-ICS-PortingGuide
Linux Drivers porting guides:

  1. http://processors.wiki.ti.com/index.php/AM335x_U-Boot_User%27s_Guide
  2. http://processors.wiki.ti.com/index.php/AM335x_Power_Management_User_guide
  3. http://processors.wiki.ti.com/index.php/Sitara_GPIO_Driver_User_Guide
  4. http://processors.wiki.ti.com/index.php/AM335x_MMC/SD_Driver%27s_Guide
  5. http://processors.wiki.ti.com/index.php/AM335x_LCD_Controller_Driver%27s_Guide
  6. http://processors.wiki.ti.com/index.php/AM335x_Touchscreen_Driver%27s_Guide
  7. http://processors.wiki.ti.com/index.php/AM335x_Audio_Driver%27s_Guide
  8. http://processors.wiki.ti.com/index.php/AM335x_CPSW_(Ethernet)_Driver%27s_Guide
  9. http://processors.wiki.ti.com/index.php/AM335x_PWM_Driver%27s_Guide
  10. http://processors.wiki.ti.com/index.php/AM335x_USB_Driver%27s_Guide


NOTE:More Information on AM335x http://processors.wiki.ti.com/index.php/Category:AM335x

Release notes[edit]

See below table to find information on various individual components of this release

Component Version
Repository (Branch) Commit ID / Baseline Base Repository
Commit ID / Base Tag
Bootloader 2011.09
http://gitorious.org/rowboat/u-boot

(am335x-master-android-ics)

63097683
http://arago-project.org/git/projects/?p=u-boot-am33x.git;a=shortlog;h=refs/heads/AM335XPSP_04.06.00.07
AM335XPSP_04.06.00.07
AM335x Linux Kernel 3.2
http://gitorious.org/rowboat/kernel

(rowboat-am335x-kernel-3.2)

407167ad

http://arago-project.org/git/projects/?p=linux-am33x.git;a=shortlog;h=refs/heads/AM335XPSP_04.06.00.07

SGX Release ddk 1.8

http://gitorious.org/rowboat/hardware-ti-sgx

(ti_sgx_sdk-ddk_1.8)

eb94bf9

None
None
Android Filesystem
ICS 4.0.3
http://gitorious.org/rowboat
TI-Android-ICS-4.0.3-DevKit-EVM-SK-3.0.1.xml
https://android.googlesource.com/platform/manifest.git
android-4.0.3_r1

References
[edit]

Technical Support and Product Updates[edit]

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

Observations
[edit]

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article AM335X EVM-SK Android Devkit Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article AM335X EVM-SK Android Devkit Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article AM335X EVM-SK Android Devkit Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article AM335X EVM-SK Android Devkit Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article AM335X EVM-SK Android Devkit Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article AM335X EVM-SK Android Devkit Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article AM335X EVM-SK Android Devkit Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article AM335X EVM-SK Android Devkit Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article AM335X EVM-SK Android Devkit Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity