Flashboard-Android-DevKit Guide

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

What is Flashboard

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

http://www.theflashboard.com/

Flashboard2.JPG




Flashboard Features


Feature
Processor
DM3730 1GHz
Display
5” and 7” TFT LCD with Touch screen
Memory
512MB NAND, 256MB mDDR
Wi-Fi
Integrated WLAN 802.11 b/g/n
Bluetooth
BT2.1 with EDR
Video output
HDMI interface
USB
High speed 2.0 OTG
Audio
Stereo audio with auxiliary LINE IN and LINE OUT
Storage
SD\MMC card on SD\MMC interface
Camera
Beagleboard Xm Camera interface
Sensors
Gyrometer and accelerometer on I2C
Wireless communication
NFC enabled
Wireless sensor network
Onboard ZigBee RF transceiver

Android on Flashboard

Objective of this wiki page

This wiki page has mainly two objectives

  1. Quickly evaluate Android using pre-built images
  2. Start develop using sources

Installation and Usage

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

Getting Prebuilt Images

Flashboard Prebuilt SD card image from TI Flashboard Android DevKit uploaded at TI FTP


Preparation of SD card

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_GingerBread_2_3_4_Devkit_Flashboard.tar.bz2
$ cd TI_Android_GingerBread_2_3_4_Devkit_Flashboard
$ 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 GingerBread 2.3.4)
  3. data - Media Clips (Audio, Video and Images)

Now this card can be used to boot the Flashboard

Hardware setup

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

Getting serial console

Serial console is provided via serial cable connection between the Flashboard and the Host. To establish a connection the serial port settings should be 115200 baud rate, 8 data bits, 1 stop bit, and parity none

Verifying Serial Connection

Once you finish setting up serial console, you can test the connection via the below steps

Powering on to Android Terminal

Put the Micro SD card to the slot on the Flashboard. Press the reset button again. See X-loader and Uboot loading. Allow the boot loader to run the boot script 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

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 Flashboard are as follows

 setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait rootdelay=1 init=/init ip=off vram=8M omapfb.vram=0:8M'

Android Display through HDMI port

The flashboard is able to display a DVI signal through the HDMI output port, in order to view the output signal a HDMI to DVI cable like the one shown in the picture is required.

HDMI-DVI cable.jpg


To enable the DVI signal in the HDMI output append the following arguments to the bootargs:

mpurate=1000 omap_vout.vid1_static_vrfb_alloc=y omapdss.def_disp=dvi omapfb.mode=dvi:1280x720MR-16 omap_vout.vid1_static_vrfb_alloc=y
For example when booting from MMC/SD with the HDMI output enabled:
setenv bootargs 'console=ttyO2,115200n8 androidboot.console=ttyO2 mem=256M root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait rootdelay=1 init=/init ip=dhcp mpurate=1000 omap_vout.vid1_static_vrfb_alloc=y omapdss.def_disp=dvi omapfb.mode=dvi:1280x720MR-16 omap_vout.vid1_static_vrfb_alloc=y vram="8M" omapfb.vram=0:8M'

ADB Debugging

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 Flashboard

Running Android Applications

Keypad mappings

The below table lists the keypad mappings to Android UI functionality

Functionality
Keypad Button
Left
SW5
Right
SW6
Select
SW3
Back / Previous screen
SW4


Android Home Screen

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 to Google Search, Tips, Browser or Application Launcher. Click the Application Launcher to see all pre-built applications. Rb main.JPG

Gallery Application

In Gallery, the user can view the images and play videos.

Rb gallery.JPG

Rowboperf and 3D graphics applications

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 Configuration

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

  # netcfg eth0 up
  # 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

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 supports camera sensor mt9t111 for Flashboard

3Mpixel camera board.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

Flashboard 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

Flashboard

Power Management is disabled by default in the release, to enable Power Management:

Once Power Management has been enabled you can change the Power Management settings with sysfs commands, for example

echo 1 > /debug/pm_debug/sleep_while_idle
echo 0 > /debug/pm_debug/enable_off_mode
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Developing with source code

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

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


NOTE: Android Gingerbread (2.3.4) needs Java 6 on ubuntu, whereas the previous version FroYo (2.2) was using Java 5.
Getting Source Code

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-GingerBread-2.3.4-DevKit-Flashboard.xml
$ repo sync


Building Source Code

Tool chain setup

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

To build MLO
  $ cd x-loader
  $ make CROSS_COMPILE=arm-eabi- distclean
  $ make CROSS_COMPILE=arm-eabi- flashboard_config
  $ make CROSS_COMPILE=arm-eabi-  
  $ ./signGP
To build boot loader (u-boot)
  $ cd u-boot
  $ make CROSS_COMPILE=arm-eabi- distclean
  $ make CROSS_COMPILE=arm-eabi- flashboard_config
  $ make CROSS_COMPILE=arm-eabi- 

NOTE: Copy the "mkimage" from "tools" folder to /usr/bin folder on your host machine, this is needed for kernel uImage generation

To build Linux kernel
  $ cd kernel

  $ make ARCH=arm CROSS_COMPILE=arm-eabi- distclean
  $ make ARCH=arm CROSS_COMPILE=arm-eabi- flashboard_android_defconfig
  $ make ARCH=arm CROSS_COMPILE=arm-eabi- uImage
To build Android filesystem

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 -b rowboat-gingerbread git://gitorious.org/rowboat/rowboperf.git 
  $ cd rowboperf

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

  • Have Android SDK in the PATH of the host machine
  • Android filesystem build will take care of the integration of rowboperf applications

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

  $ make TARGET_PRODUCT=flashboard -j8 OMAPES=5.x

The above command will build Android FS, kernel, SGX drivers. After successful build, the kernel image can be found at kernel/arch/arm/uImage. Android rootfs components (root and system folders) will be located in out/target/product/flashboard. SGX drivers and libraries are installed in Android rootfs components.

Create root filesystem tarball

Prepare the root filesystem as follows:

  $ cd out/target/product/flashboard
  $ 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

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.bin image_folder
  $ cp x-loader/MLO image_folder
  $ cp out/target/product/flashboard/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 Flashboard for Booting.

References

  1. More about the AM3730/15 device used on the BeagleBone at http://www.ti.com/dsp/docs/dspcontent.tsp?contentId=72866&DCMP=am37x_060710&HQS=Other+OT+am37x.
  2. AM37x Technical Reference Manual at http://www.ti.com/lit/ug/sprugw9n/sprugw9n.pdf
  3. Android Sources for Flashboard is hosted at www.gitorious.org/rowboat with manifest TI-Android-GingerBread-2.3.4-DevKit-Flashboard.xml


Observations

  1. UI is upside down.
  2. The board hangs when a reboot operation (running reboot from the cmd line or pressing the reset button SW1) is triggered.
  3. Power button (SW2) does not work.
  4. Zigbee and NFC are currently not supported in the release.
Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox