CM-T335: Android

From Compulab Mediawiki
Revision as of 08:32, 9 September 2013 by Grinberg (talk | contribs) (Introduction)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

The Android Demo filesystem image for CM-T335 is based on Android Jelly Bean 4.1.2 distribution for TI's Sitara(TM) AM335x ARM Cortex(TM) A8 Processors. The CompuLab Android Demo package for CM-T335 includes ready to run Demo Android filesystem image and Linux kernel based on 3.2.0 version.

The Android Demo image for CM-T335 includes following software components:

  • Android Jelly Bean 4.1.2 release from Google
  • Android Linux Kernel v3.2.0
  • SGX OpenGL ES Driver & Libraries DDK v1.10
  • Built-in Applications and Demos
    • Browser, Calculator, Clock, Contacts, Music, Search, File Manager, etc.
  • Peripherals drivers
    • MMC/SD, UART, Ethernet, etc.
    • USB OTG and USB Host

The Getting started with Android on CM-T335 page provides a brief introduction on how to install and boot the Android Demo image. This article describes package structure and peripheral device options specific to the CM-T335.

Package contents

version.txt

The contents of the version.txt identifies the package version.

images

  • uImage-cm-t335 - ready to run Linux kernel image binary for CM-T335
  • Android-image-cm-t335.tar.bz2 - Android root file system image archive

development

The development directory contains a collection of patches with support for CM-T335. The directory structure preserves the original TI Android JB 4.1.2 source tree structure. It contains patches for several Android sub-projects including Linux kernel.

  • build - contains a collection of patches that determine build specification for CM-T335
  • device/compulab/cm_t335 - contains a collection of patches that introduce CM-T335 support
  • hardware/ti/omap3 - patches for CM-T335 audio
  • kernel - contains a collection of patches for Linux kernel with support for CM-T335 peripherals

kernel

  • uImage-3.2.0-cm-t335-1.bin - ready to run Linux kernel 3.2.0-cm-t335-1 for CM-T335 can be used with either Android or Linux root filesystem
  • linux-3.2.0-cm-t335-1.config - Linux kernel 3.2.0-cm-t335-1 configuration file
  • linux-3.2.0-cm-t335-1.patch - patch vs. rowboat-jb-am335x-4.1.2 tag with support for CM-T335 peripherals
  • patches - ordered collection of patches, that form the single patch above (linux-3.2.0-cm-t335-1.patch)

utilities

The utilities directory contains miscellaneous utilities useful for development

  • adb - prebuilt adb binary for Linux host
  • busybox - prebuilt busybox binary v1.19.4
  • eeprom-util - CompuLab EEPROM utility for reading information found inside the EEPROM on CompuLab boards

Using Android on CM-T335

USB Gadget

Introduction

There are two options for USB configuration available for the CM-T335:

  • with single USB OTG port (U1 option)
  • with four USB host ports (U4 option)

The CM-T335 Android Demo image supports both USB host and USB device ports in single binary image. USB host can be used to connect Keyboard/Mouse, Mass storage device, etc. The USB device port is used for connecting to a PC workstation.

Android USB Gadget Configuration

The Android USB gadget driver is configured via the sysfs entries. The sysfs settings depend on the features required to be enabled. By default only the adb and mtp mode is configured. The adb mode is configured by default. Please refer to the device/compulab/cm_t335/init.cm-t335.rc for more details.

Android Mass Storage USB Gadgets

To enable Android Mass Storage USB Gadgets follow the instruction below:

  • Set the Android Gadget to the Mass Storage mode:
root@android:/ # echo 0 > /sys/class/android_usb/android0/enable
root@android:/ # echo mass_storage > /sys/class/android_usb/android0/functions
root@android:/ # echo 1 > /sys/class/android_usb/android0/enable
  • Make sure the external storage device you want to use (SD/MMC card partition) is plugged/installed into the CM-T335 and has a proper partition:
root@android:/ # ls -l /dev/block/
...
brw------- root     root     179,   0 2010-11-01 22:08 mmcblk0
brw------- root     root     179,   1 2010-11-01 22:08 mmcblk0p1
brw------- root     root     179,   2 2010-11-01 22:08 mmcblk0p2
...
root@android:/ # cat /proc/partitions
major minor  #blocks  name

  31        0       2048 mtdblock0
  31        1       1024 mtdblock1
  31        2       1024 mtdblock2
  31        3       1024 mtdblock3
  31        4       4096 mtdblock4
  31        5       6144 mtdblock5
  31        6     508928 mtdblock6
 179        0    7830528 mmcblk0
 179        1     120456 mmcblk0p1
 179        2    7709048 mmcblk0p2
  • Make sure the partition you're going to share is not mounted. Otherwise unmount it.
  • Share the partition:
root@android:/ # echo /dev/block/mmcblk0p1 > /sys/class/android_usb/f_mass_storage/lun/file
  • Finally, connect the CM-T335 to your host via USB OTG port.

ADB over USB

Please refer to the Android: ADB setup article for more information about the ADB over USB.

See also