TI-Android-GingerBread-2.3.4-DevKit-2.1 UserGuide

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

TIBanner.png

Contents

TI Android GingerBread 2.3.4 DevKit 2.1 User Guide

User Guide - July 15, 2011


About this manual

This document describes how to install and work with Texas Instruments' Android GingerBread DevKit release for AM37x, AM35x platforms running Android. This release package provides a stable Android distribution with integrated SGX (3D graphics) drivers, TI hardware abstraction for video overlay, and standard applications from Android. The package also includes Linux Android kernel, tools and documentation to ease development, deployment and execution of Android based systems. The product forms the basis for all Android application development on AM37x, AM35x 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 TI Android GingerBread 2.3.4 DevKit 2.1 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
OMAP35x



Beagleboard Rev Cx DVI Monitor, USB HUB, USB Keyboard, USB Mouse, Ethernet, UART Cable, Audio Speakers, MMC/SD Card (2GB min)
AM35x



AM3517 Evaluation Module Rev C DVI Monitor, USB HUB, USB Keyboard, USB Mouse, Ethernet, UART Cable, Audio Speakers, MMC/SD Card (2GB min)
AM37x



AM37x Evaluation Module Rev C DVI Monitor, USB HUB, USB Keyboard, USB Mouse, Ethernet, UART Cable, Audio Speakers, MMC/SD Card (2GB min)

BeagleBoard XM Rev A/B/C DVI Monitor, USB HUB, USB Keyboard, USB Mouse, Ethernet, UART Cable, Audio Speakers, MMC/SD Card (2GB min)


Software Host Requirements

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

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

Package Content

   TI_Android_GingerBread_2_3_4_DevKit_2_1
  |-- Android_Source_Manifest
  |   `-- TI-Android-GingerBread-2.3.4-DevKit-2.1.xml
  |-- Documents
  |   |-- RowboPERF_User_Guide.pdf
  |   |-- Software_Manifests
  |   |   |-- TI-Android-DevKit-FS-Manifest.doc
  |   |   |-- TI-Android-DevKit-Manifest-For-TSU-components.doc
  |   |   `-- TI-Android-DevKit-Software-Manifest.doc
  |   |-- TI-Android-GingerBread-2.3.4-DevKit-2.1_DeveloperGuide.pdf
  |   |-- TI-Android-GingerBread-2.3.4-DevKit-2.1_ReleaseNotes.pdf
  |   |-- TI-Android-GingerBread-2.3.4-DevKit-2.1_UserGuide.pdf
  |   `-- Test_Performance_Results
  |       |-- CTS_Report.tar.gz
  |       `-- TestResults
  |           |-- AM3517_Gingerbread_2.3.4_Devkit_2.1_Test_Report.pdf
  |           `-- AM37x_Gingerbread_2.3.4_Devkit_2.1_Test_Report.pdf
  |-- Prebuilt_Images
  |   |-- AM35X
  |   |-- AM37X
  |   |-- AM37X_UBIFS
  |   |-- beagleboard-rev-c4
  |   `-- beagleboard-xm
  `-- Tools
      |-- Flash_Tool_01_06_00_00.zip
      |-- android-sdk_r06-linux_86.tgz
      |-- mk-bootscr
      |-- mk-mmc
      |-- pinmux-utility.tar.gz
      `-- signGP

Out of the Box Demo

This section gives the instructions to quickly prepare an SD Card image and get an experience of TI Android GingerBread 2.3.4 DevKit 2.1 on TI platforms/devices.

 tar -xzvf <Board name>.tar.gz
cd <Board name>
sudo ./mkmmc-android /dev/sd<device>
  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 

#> mmc init
#> fatload mmc 0 0x82000000 boot.scr
#> source 0x82000000

Android Booting Procedure

Booting Android on any TI platform requires following software components

The above listed software components or images can be populated by

Software Integration

TI provides Android sources for all the supported devices in multiple locations, developers can download the sources from the rowboat repository (http://gitorious.org/rowboat) or use the pre-packaged repo in the DevKit.

Refer to http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_DeveloperGuide for the detailed procedure to compile and integrate all the required software components to boot Android on TI platforms.

Setting up Hardware

This DevKit release supports six different platforms AM37x EVM, AM35x EVM, Beagleboard Rev Cx, Beagleboard XM. While they are different devices the hardware setup will almost remain the same.

   NOTE:

- Beagleboard have no keypad mappings, user is recommended to use USB Keyboard over a self powered USB HUB connected to the Host port of Beagleboard.

For MMC/SD boot - On AM37x EVM the DIP switch SW4 should be set as shown below

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


For MMC/SD boot - On AM35x EVM the DIP switch S7 should be set as shown below

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

Booting Android

TI platforms (Beagle or EVM) can be booted over MMC or NAND or UART. We follow and prefer MMC based booting of platforms.

Procedure to populate 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.sh /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 AM37x 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_4_DevKit_2_1/AM37X
  HOST $ sudo ../../Tools/mk-mmc/mkmmc-android.sh /dev/sdb

Procedure to add Video, Audio and other media

To play media after booting Android on any platform, the content must be included in the MMC/SD card's FAT32 partition. If you use the mk-mmc script included in the release package then it creates 3 partitions. The media content should be placed into the 3rd (FAT32) partition.

   Example:

HOST $ sudo mount /dev/sdd3 /mnt
HOST $ sudo cp <all media files> /mnt
HOST $ sudo umount /mnt
   NOTE:

- This release supports all the standard Android media formats, listed here http://developer.android.com/guide/appendix/media-formats.html

Booting the platform

Booting over MMC using boot.scr

   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 boot.scr
   #> source 0x82000000

Boot arguments

Boot arguments for various boards are as follows.

  AM35X:
setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=1 init=/init ip=off omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M'
  AM37X:
setenv bootargs 'console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=1 init=/init ip=off omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M'
  Beagleboard-rev-c4:
setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=1 init=/init ip=off omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M'   
  Beagleboard-xm:
setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=1 init=/init ip=off omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M'

Keypad mappings

The below table lists the keypad and USB Keyboard mappings to Android UI functionality.

Functionality
USB Keyboard/Mouse
Keypad on AM37x EVM
Keypad on AM35x EVM
Home Screen
Home
R3C2
S3
Left
Left Arrow
R2C1
S6
Right
Right Arrow
R0C2
S5
Up
Up Arrow
R1C3
S7
Down
Down Arrow
R2C0
S9
Volume Up
Volume Up
R1C2
S4
Volume Down
Volume Down
R0C1
S1
Contacts
F3


Power
R0C0 S2
Select
Enter
R3C1

Back
Mouse right
R2C3
S8
Menu
F1
R3C3
S10


Using Network Filesystem

Android filesystem can be mounted over network, the bootargs for doing the same should include below text instead of MMC

   ip=dhcp rw root=/dev/nfs nfsroot=<your NFS server ipaddr>:/home/USER/FILESYSTEM_DIR,nolock noinitrd

Example: Complete bootargs for AM37x board using NFS and LCD output

   setenv bootargs init=/init console=ttyO0,115200n8 ip=dhcp rw root=/dev/nfs nfsroot=192.168.133.01:/home/user/targetfs,nolock\
   mem=256M noinitrd androidboot.console=ttyO0 vram=8M omapfb.vram=0:8M


Important

   NFS is not supported for Beagle Rev C4 since it doesn't have an Ethernet port.

Using Flashing Utility

Android boot images x-loader and u-boot etc can be flashed to NAND from windows host, using flashing utility provided in tools. Flashing utility is tested on USB connection with AM37X Pre-built images. For instructions on flashing utility please refer the steps at http://processors.wiki.ti.com/index.php/Flash_v1.6_User_Guide.

In some cases the flashing utility's recommended settings of HWECC, 4-bit for flashing Uboot and the kernel image may not work and the board displays a bad CRC message. If this happens re-flash the components again using the SWECC setting of the utility for Uboot and kernel.

Display Support

Using DVI Monitor

On AM37x, DM37x and AM35x EVMs the on board LCD is used as output device by default. User is allowed to configure DVI port as output device, by changing the boot arguments as shown below.

Append the boot arguments with following text

   omapfb.mode=dvi:1280x720MR-16 omapdss.def_disp="dvi"
   Example: 

 To boot over MMC and use DVI at resolution 1024x768 on AM37x EVM, the complete bootargs would be, 
 
 setenv bootargs init=/init console=ttyO0,115200n8 ip=dhcp rw root=/dev/mmcblk0p2 rw init=/init rootwait mem=256M androidboot.console=ttyO0 omapfb.mode=dvi:1024x768MR-16 omapdss.def_disp="dvi" vram=8M omapfb.vram=0:8M 
  NOTE:

 - On beagleboard the DVI port is configured as default output device.
 - On AM3517, 8th switch on SW7 should be "ON" to enable DVI

Using S-VIDEO Monitor

By Setting Boot parameters

On AM37x and AM35x EVMs the on board LCD is used as output device by default. User is allowed to configure S-video port as output device, by changing the boot arguments as shown below.

Append the boot arguments with following text

   omapdss.def_disp="tv"
  Example: 

 To boot over MMC and use S-video port as output device on AM37x EVM, the complete bootargs would be, 
 
 setenv bootargs 'console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=1 init=/init ip=off omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M omapdss.def_disp="tv"'

By Sysfs configuration

Boot the device with LCD as default output device.

  To boot over MMC and use lcd as output device on AM37x EVM, the complete bootargs would be,
 setenv bootargs 'console=ttyO0,115200n8 androidboot.console=ttyO0 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootdelay=1 init=/init ip=off omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M'
Switch video on S-video device

Use the following procedure to display video on s-video device.

Disable overlay1. Before changing any overlay attributes, it should first be disabled.

  #echo 0 > /sys/devices/platform/omapdss/overlay1/enabled;

Reset overlay1 manager which is set to lcd by default

  #echo "" > /sys/devices/platform/omapdss/overlay1/manager;

Disable display1/tv

  #echo 0 > /sys/devices/platform/omapdss/display1/enabled;

Set overlay manager to tv

  #echo "tv" > /sys/devices/platform/omapdss/overlay1/manager;

Enable display1/tv

  #echo 1 > /sys/devices/platform/omapdss/display1/enabled

Open gallery application and play video. Video will be played on s-video device and graphics will be displayed on the lcd.

Switch video on lcd device

Use the following procedure to display video on lcd device.

Disable overlay1. Before changing any overlay attributes, it should first be disabled.

  #echo 0 > /sys/devices/platform/omapdss/overlay1/enabled;
 

Disable display1/tv

  #echo 0 > /sys/devices/platform/omapdss/display1/enabled;

Disable display0/lcd

  #echo 0 > /sys/devices/platform/omapdss/display0/enabled;

Reset overlay1 manager which is previously set to tv

  #echo "" > /sys/devices/platform/omapdss/overlay1/manager;

Set overlay manager to lcd

  #echo "lcd" > /sys/devices/platform/omapdss/overlay1/manager;

Enable display0/lcd

  #echo 1 > /sys/devices/platform/omapdss/display0/enabled

Open gallery application and play video. Video and graphics will be displayed on the lcd.

Rotation Support

Graphics and Video rotation is managed by software. Use standard android API to rotate screen in portrait or landscape mode. Currently portrait and landscape graphics rotation mode is supported.

Camera Support

Ti Android GingerBread 2.3.4 Devkit 2.1 supports camera sensor mt9v113 for beagleboard-xm and camera sensor mt9t111 for AM37x

Mt9v113.jpeg

Feature supported:

  1. Go to application/activity view luncher > open camera
  2. Click on camera capture.By default images will get stored at - /sdcard/DCIM

NOTE:

- Video recording is not supported

Wireless

AM37x evm revG with the wireless module supports WLAN and Bluetooth on Android. For steps on installing the wireless module see this page.

WLAN

wl1271: loaded
wl1271: initialized
wl1271: firmware booted (Rev 6.1.5.50.69)
cfg80211: Calling CRDA to update world regulatory domain
wl1271: Association completed.


wl1271: down
wl1271: unloaded

Bluetooth

Set BT_EN of WL1271
WL1271: Powering on

BT scan results

PIN for pairing

NOTE: 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.


Set BT_EN of WL1271
WL1271: Powering off

Bluetooth Object Push profile

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

Sending files

Send picture from Gallery to Bluetooth

Receiving files

incoming transfer icon

incoming transfer message

Confirm incoming transfer

Bluetooth A2DP

You can listen to Media audio on Bluetooth A2DP headset.

A2DP headset pairing-Note headset icon

Bluetooth AVRCP

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.

  input: AVRCP as /devices/virtual/input/input3

Bluetooth SCO Audio

Android supports the Bluetooth Headset Profile/HandsFree Profile Audio Gateway (HSP/HFP AG). Bluetooth SCO connection is used to play/capture audio in these profiles.

It is possible to record audio from Bluetooth headset over SCO.

BT HSP/HFP headset pairing

  • Menu -> Settings -> Wireless & networks -> Bluetooth settings
  • Long tap on the entry for A2DP headset, a menu appears
BT device menu
  • Tap Options
  • Uncheck Media. This stops android from using A2DP profile of the headset
Disable A2DP feature for paired headset
  • To re-enable A2DP, repeat the above steps and check-mark Media

The audio is recorded in 3gpp format and can be played back by the Music player.

Bluetooth Audio Recording and Playback using ALSA utils

An alternate method to capture and play audio using SCO using alsa-utils is given below. These steps do not use the Android Mediaplayer framework.

BT HSP/HFP headset pairing

NOTE: If using A2DP headset, you need to disable the A2DP profile before BluetoothSCOApp can be used.

# ln -s /system/app/alsa_aplay /system/app/alsa_arecord
# alsa_arecord -D hw:0,1 -f S16 test.wav
# alsa_aplay -D hw:0,1 test.wav

Turn off the HandsFree Headset to stop the SCO session.

NOTE: An active SCO session needs to be established to play/capture audio from Bluetooth Hands-Free.

Known Issues


Power Management

Below are the features supported in TI-Android-GingerBread-2.3.4-DevKit-2.1

AM37X

  1. Pressing the POWER key on the keypad
  2. Allowing the system go to suspend after a screen timeout

AM35X

  1. Pressing the POWER key on the keypad
  2. Allowing the system go to suspend after a screen timeout

Basic Settings

Enable PM

By default we have disabled pm by setting "setprop hw.nopm true" in init.rc.

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

To go in suspend mode
To resume from suspend mode
To set the Screen Timeout to go suspend
To set set the screen always on preventing suspend
To set Screen Brightness
To set Alarm in Android

Device will be woken up from suspend at Alarm Time

Advanced Settings

To Disable Power Management
CPU Idle and OFF mode Settings

CPU Idle feature is enabled by default in the kernel. There are seven power states introduced by CPU Idle. Enable "sleep_while_idle" and "enable off_mode" to achieve all the possible idle states. For maximum power reduction set the UART console timeouts as well

   # echo 1 > /debug/pm_debug/sleep_while_idle
   # echo 1 > /debug/pm_debug/enable_off_mode
   # echo 5 > /sys/devices/platform/omap/omap_uart.0/sleep_timeout
   # echo 5 > /sys/devices/platform/omap/omap_uart.1/sleep_timeout
   # echo 5 > /sys/devices/platform/omap/omap_uart.2/sleep_timeout

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
CPU Dynamic Voltage Frequency Scaling settings
Enabling ondemand frequency governor

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

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

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

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
Smart Reflex
To enable smart reflex
  # echo 1 > /debug/voltage/vdd_core/smartreflex/autocomp
  # echo 1 > /debug/voltage/vdd_mpu/smartreflex/autocomp
To disable smart reflex
  # echo 0 > /debug/voltage/vdd_core/smartreflex/autocomp
  # echo 0 > /debug/voltage/vdd_mpu/smartreflex/autocomp
To minimize the power consumption in runtime

The maximum power reduction in runtime is achieved when “enable_off_mode”, “sleep_while_idle”and “smart reflex” options are enabled and dvfs option is set to “power save”.


To minimize the power consumption in suspend

The maximum power reduction in suspend is achieved when “enable_off_mode”, “sleep_while_idle”and “smart reflex” options are enabled and UART console timeouts are set.

Please check the power consumption analysis at LINK

Limitations

NAND Booting

NAND Image flashing from u-boot prompt

The ECC algorithm supported in this release are:

# nandecc [ hw <hw_type> | sw | bch4_sw | bch8_sw ] 

Usage: 

   sw           - Set software ECC for NAND
   hw <hw_type> - Set hardware ECC for NAND
                  <hw_type> - 1 for Kernel/FileSystem ECC layout
                              2 for X-loader/U-boot ECC layout
   bch4_sw      - Set 4-bit BCH ECC for NAND
   bch8_sw      - Set 8-bit BCH ECC for NAND

  (hw 1 is set as the default nandecc)

Saving Environment Variables

For example, to set bootargs and save them to the environment, the following commands could be used:

OMAP3_EVM # nandecc hw 1
OMAP3_EVM # setenv bootargs 'mem=128M console=ttyO0,115200n8 noinitrd root=/dev/mtdblock4 rw rootfstype=jffs2'
OMAP3_EVM # saveenv

Flashing x-loader

To flash MLO (x-load.bin.ift) to the NAND Flash, execute the commands listed below:

OMAP3_EVM # tftp 0x80000000 MLO
OMAP3_EVM # nand erase 0x0 0x50000
OMAP3_EVM # nandecc hw 2
OMAP3_EVM # nand write 0x80000000 0x0 0x50000

Flashing U-boot

To flash u-boot.bin to the NAND Flash, execute the commands listed below:

OMAP3_EVM # tftp 0x80000000 u-boot.bin
OMAP3_EVM # nand erase 0x80000 0x1C0000
OMAP3_EVM # nandecc hw 2
OMAP3_EVM # nand write 0x80000000 0x80000 0x1C0000

Flashing Linux kernel

To flash uImage to the NAND Flash execute the commands listed below:

OMAP3_EVM # tftp 0x80000000 uImage
OMAP3_EVM # nand erase 0x280000 <kernel image size>
OMAP3_EVM # nandecc hw 1
OMAP3_EVM # nand write 0x80000000 0x280000 <kernel image size>

Flashing UBI filesystem

To flash UBI image to the NAND Flash execute the commands listed below:

OMAP3_EVM # mw.b 0x80000000 0xFF <file system size>
OMAP3_EVM # tftp 0x80000000 <file system image>
OMAP3_EVM # nand erase 0x780000 <file system size>
OMAP3_EVM # nandecc hw 1
OMAP3_EVM # nand write 0x80000000 0x780000 <file system size>

Note

The image size should be upward aligned to NAND page size which is 2KiB (i.e. 0x800). For example, if the image size is 0x19B8004 the size to be passed to the NAND write command should be 0x19B8800.

Fastboot and UBI rootfs

Fastboot flashing utility is for updating the different software components of Android. Here is a guide to reflash the xloader, u-boot, kernel and root-filesystem (UBIFS image). This guide assume that Rowboat has been compiled before trying out these instructions.

Establishing Fastboot connectivity

Setup on linux host
   $ export ANDROID_ROOT=<rowboat top level directory>
   $ cd $ANDROID_ROOT/out/host/linux-x86/bin
   $ sudo ./fastboot devices

if a device number is echoed, fastboot is working.

Setup on Windows host
   %SingleBootLoaderInterface% = USB_Install, USB\VID_0451

Creating ubifs images

   $ sudo chmod -R 777 android_rootfs_am37x
   $ git clone git://git.infradead.org/mtd-utils.git
   $ cd mtd-utils
   $ make
   $ sudo mkfs.ubifs/mkfs.ubifs -r <path_to_rootfs>/ -m 2048 -e 126976 -c X -o ubifs.img
      where X = 3991 for 512MB NAND and X = 1948 for 256MB NAND flash
   [ubifs]
  mode=ubi
  image=ubifs.img
  vol_id=0
  vol_size=Y
      where Y=450MiB for 512MB NAND and X=200MiB for 256MB NAND
  vol_type=dynamic
  vol_name=rootfs
  vol_flags=autoresize
   $ sudo ubi-utils/ubinize -o ubi.img -O 2048 -m 2048 -p 128KiB -s 512 ubinize.cfg

Important Use either Fastboot to flash ubi.img over System partition of NAND or do it manually from u-boot prompt.

Fastboot commands

   $ export ANDROID_ROOT=<rowboat_top_level_build_directory>
   $ cd $ANDROID_ROOT/out/host/linux-x86/bin
   $ sudo ./fastboot devices
   $ sudo ./fastboot flash xloader <xloader_binay_path>/MLO
   $ sudo ./fastboot flash bootloader <uboot_binary_path>/u-boot.bin
  sending 'bootloader' (203 KB)... OKAY [  0.541s]
            writing 'bootloader'... OKAY [  0.552s]
  finished. total time: 1.093s
   $ sudo ./fastboot flash boot <kernel_image_path>/uImage
  sending 'boot' (2537 KB)... OKAY [  6.466s]
                  writing 'boot'... OKAY [  3.330s]
  finished. total time: 9.796s
   $ sudo ./fastboot flash system <rootfs_image_path>/ubi.img
  sending 'system' (72320 KB)... OKAY [183.758s]
                writing 'system'... OKAY [ 84.040s]
  finished. total time: 267.819s
   $ sudo ./fastboot erase <partition name> (eg. xloader)
   $ sudo ./fastboot getvar <variable>
   $ sudo ./fastboot continue

Booting with UBIFS rootfs

   # setenv nandboot 'echo Booting from nand ...; nand read ${loadaddr} ${boot_nand_offset} ${boot_nand_size}; bootm ${loadaddr}'
   # setenv bootcmd 'run nandboot'
   # setenv bootargs 'init=/init console=ttyO0,115200n8 noinitrd ip=off androidboot.console=ttyO0 rootwait mem=256M \
    omap_vout.vid1_static_vrfb_alloc=y rw ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs rootdelay=2 vram=8M omapfb.vram=0:8M'

Limitations

YAFFS2 rootfs

Following the official(?) procedure how to incorporate yaffs linux to write/flash the YAFFS2 image i.e flash_erase <mtd_partition>, mount the <mtd_partition> and copy/untar the Android rootfs, from a running system (MMC/NFS), onto the mount_point to boot from NAND partition.

flashing the MTD partition

   # cat /proc/mtd
   dev:    size   erasesize  name
   mtd0: 00080000 00020000 "X-Loader-NAND"
   mtd1: 00140000 00020000 "U-Boot-NAND"
   mtd2: 000c0000 00020000 "Boot Env-NAND"
   mtd3: 00500000 00020000 "Kernel-NAND"
   mtd4: 1f880000 00020000 "File System - NAND"

The file system partition of the flash device is /dev/mtd/mtd3

   target# flash_eraseall /dev/mtd/mtd3
  Erasing 16 Kibyte @ 3b9c000 -- 99 % complete.
   target# mkdir /tempd
NoteNote: For small block NAND devices (i.e. DM6446) you must mount the file system as a YAFFS file system.
For large block NAND devices (i.e. DM355/AM389X) the file system should be mounted as YAFFS2.
Using the wrong version of YAFFS will result in error messages similar to:
   target# mount -t yaffs2 /dev/block/mtdblock3 /tempd
  yaffs: dev is 32505859 name is "mtdblock3"
  yaffs: Attempting MTD mount on 31.3, "mtdblock3"
  yaffs: MTD device does not support have the right page sizes
  mount: wrong fs type, bad option, bad superblock on /dev/mtdblock3,
         or too many mounted file systems
   target# cd /tempd
   target# busybox tar xjf /rootfs.tar.gz
   target# cd /
   target# umount /tempd
   target# reboot

Booting with YAFFS2 rootfs

   # setenv bootargs 'init=/init console=ttyO0,115200n8 noinitrd ip=off androidboot.console=ttyO0 rootwait mem=256M \
    omap_vout.vid1_static_vrfb_alloc=y rw root=/dev/mtdblock3 rootfstype=yaffs2 bootdelay=2 vram=8M omapfb.vram=0:8M'

To Do List

Building Android Sources

Refer to TI Android DevKit Developer Guide at http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_DeveloperGuide for building Android sources and setting up the platform for booting.

RowboPERF Integration

   #> git clone -b rowboat-gingerbread git://gitorious.org/rowboat/rowboperf.git
   #> cd rowboperf

NOTE: Clone rowboperf sources outside the rowboat-android tree.

Refer to RowboPERF User Guide to know more.

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/
 docs/
 platforms/
   <platform>/
      data/
      images/
      skins/
      templates/
      tools/
      android.jar
 samples/
 tools/
SDK Readme.txt

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

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

Connecting Host machine & board through adb

This release of DevKit has been tested for three different methods of connecting a given board with host machine

The below sections describe each of these methods and provides necessary instructions for the same.

adb over USB

    For Gusty/Hardy, edit the file to read:
   SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
    For Dapper, edit the file to read:
   SUBSYSTEM=="usb_device", SYSFS{idVendor}=="18d1", MODE="0666"
    $> chmod a+r /etc/udev/rules.d/51-android.rules
    $> adb devices 
    If device is connected, then output on screen should list the device, example:
 
      List of devices attached
      20100720    device

adb over USB Ethernet (Ethernet over USB)

IMPORTANT NOTE: Inventra configuration must occur in two places as shown in non-highlighted lines of the screen shots below.

    #> make ARCH=arm CROSS_COMPILE=arm-eabi- menuconfig

Device Drivers --- USB Support

Android USB ADB ENABLE.JPG

Device Drivers --- USB Support --- USB Gadget Support

Android USBGadget ADB.JPG

Device Drivers --- USB Support --- USB Gadget Support --- Enable Gadget Ethernet support

Android USBEthernet ADB.JPG


The USB network gadget g_ether is named usb0 (instead of eth0 or other network interface names). The normal set of Ethernet configuration tools should work, such as ifconfig, netstat, and route.

For example, the following commands will assign the network address 192.168.194.2 to the target. Run this on the target:

    $> ifconfig usb0 192.168.194.2 netmask 255.255.255.224 up

On Host machine, run the following commands to establish the connection to the target:

    $> sudo ifconfig usb0 192.168.194.1 netmask 255.255.255.224 up
   $> sudo route add 192.168.194.2 dev usb0

The target and the host machine should be connected, run ping command to test the same:

    $ ping -c 3 192.168.194.2
   PING 192.168.194.2 (192.168.194.2) 56(84) bytes of data.
   64 bytes from 192.168.194.2: icmp_seq=1 ttl=64 time=6.08 ms
   64 bytes from 192.168.194.2: icmp_seq=2 ttl=64 time=0.511 ms
   64 bytes from 192.168.194.2: icmp_seq=3 ttl=64 time=0.485 ms
   --- 192.168.194.2 ping statistics ---
   3 packets transmitted, 3 received, 0% packet loss, time 2000ms
   rtt min/avg/max/mdev = 0.485/2.361/6.089/2.636 ms

On the host machine execute following commands to establish adb connection

    $ export ADBHOST=<target's ip address>
   $ adb kill-server
   $ adb start-server

Verify the connection by executing

    $ adb devices 

If connected, device name should be listed as a "emulator"

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

adb over Ethernet

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


    target #> stop adbd
   target #> start adbd
    $> export ADBHOST=<target's ip address>
   $> adb kill-server
   $> adb start-server
   $> adb connect <target_ip_address>:5555
    $> adb devices If connected, you'll see the device name listed as a "emulator"
    $> adb devices
    If connected, find the device name listed as a "emulator"
    List of devices attached
   emulator-5554    device
   $ adb shell 

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

adb over USB on Windows Machine

Follow the below instructions to get ADB over USB work on a Windows PC

(http://developer.android.com/sdk/index.html) and uncompress it in a local folder (i.e. c:\android_sdk).

(https://dl-ssl.google.com/android/repository/usb_driver_r03-windows.zip) and uncompress it in a local folder (i.e. c:\android_sdk\usb_driver)

"%USERPROFILE%\.android\adb_usb.ini":

  echo 0x18D1 > "%USERPROFILE%\.android\adb_usb.ini"

Under [Google.NTx86] section add:

  ;TI EVM
 %SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_9018
 %CompositeAdbInterface%     = USB_Install, USB\VID_18D1&PID_9018&MI_01

Note: Be careful to add it under Google.NTx86 and not under Google.NTamd64 unless your machine is AMD 64 bits. If you skip this step you won't be able to later install the driver as windows will reject it.

Answer "No, not this time" to the question about running Windows Update to search for software.

  adb kill-server
 adb start-server

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

    $> 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

    $> adb uninstall <package>.apk
    Main menu -> Menu -> Settings -> Applications -> Manage applications -> Find the package 
   Tap on it -> Uninstall -> OK -> OK
    $ 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 
   $ 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

    adb pull <remote> <local>
    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: 
   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.

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

  $ ./TI Flash10.3 Android Webkit Plugin-0.80-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 
  #> cd flash10_androidplugin 
 #> ls
 install_flash_player.apk  uninstall

 #> 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;

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.

USB Mass Storage

The Android GingerBread 2.3.4 supports USB Mass storage functionality, however the external storage can be mounted either on SD Card or a USB mass storage device. The user is allowed to choose one of the two options.

By default the TI Android DevKit chooses SD card as the external storage device.

If a user is interested to use storage over USB (USB mass storage) then following changes have to be done in the default root filesystem

1)Create some directory on Android Filesystem via adb shell or console

   # mkdir /partition

2) Insert the usb mass storage device, Assume the device node created at /dev/block/sda1 and the device has fat partition.

   #mount –t vfat /dev/block/sda1 /partition

3) Now usb mass storage device is mounted at /partition. You can careate browse the filr

Limitations

SD Card Recommendations

Some brands or models of SD cards are observed with poor performance on AM37x 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

This is Release DevKit-V2.3 The release is available from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/TI_Android_DevKit/TI_Android_GingerBread_2_3_4_DevKit_2_1/index_FDS.html
The release notes is available at http://processors.wiki.ti.com/index.php/TI-Android-GingerBread-2.3.4-DevKit-2.1_ReleaseNotes

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 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

Comments

Comments on TI-Android-GingerBread-2.3.4-DevKit-2.1 UserGuide


Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox