Difference between revisions of "CM-T3730: Android"

From Compulab Mediawiki
Jump to: navigation, search
(See also)
 
(Keypad)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
The preliminary Android Demo filesystem image for CM-T3730 is based on Android 4.1.1 Jelly Bean. The CompuLab preliminary Android Demo package for CM-T3730 includes ready to run Demo Android filesystem image and Linux kernel based on 2.6.37 version.
+
The Android Demo filesystem image for CM-T3730 is based on [http://code.google.com/p/rowboat/ Rowboat] [http://code.google.com/p/rowboat/wiki/JellybeanOnBeagleboard_WithSGX Android 4.1.2 Jelly Bean] support for TI's AM37x platform.  
 +
The [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres CompuLab Android Demo package for CM-T3730] includes ready to run Demo Android filesystem image and [[CM-T3730: Android: Kernel|Linux kernel]] based on 2.6.37 version.
  
== Preparation steps ==
+
The Android Demo image for CM-T3730 includes following software components:
* Obtain a Linux PC workstation.
+
* Android Jelly Bean 4.1.2 release from Google
* Get a USB Card reader and a micro SD Card. You can either use the micro SD card, supplied with the CM-T3730 Evaluation kit, that has already been pre-partitioned as described in the [[CM-T3x: U-Boot: Firmware_Overview#Default MMC.2FSD card mapping | Default MMC/SD Card mapping]] article, or create a new one.
+
* Android Linux Kernel v2.6.37
* Plug the USB SD Card reader to your host Linux PC. Insert the micro SD Card into the USB Card reader. From now we assume the device name of the MMC/SD card on your Linux PC is {{filename|/dev/sdc}}.
+
* SGX OpenGL ES Driver & Libraries DDK v1.10
* Download the [http://compulab.co.il/products/computer-on-modules/cm-t3730/#devres preliminary Android Demo package for CM-T3730] from CompuLab website. Unzip the package to a directory on your host workstation.
+
* Built-in Applications and Demos
* All image files mentioned below can be found in {{filename|images}} subdirectory of the Demo package.
+
** Browser, Calculator, Clock, Contacts, Music, Search, File Manager, etc.
 +
* Peripherals drivers
 +
** MMC/SD, UART, Ethernet, Matrix Keypad, LCD, Touchscreen, etc.
  
== Booting X-Loader and U-Boot ==
+
The [[CM-T3730: Android: Getting started|Getting started with Android on CM-T3730]] page provides a brief introduction on how to install and boot the Android Demo image.
* Create two partitions (FAT32 partition for X-Loader, U-Boot and Linux kernel and ext4 partition for root filesystem) as described in the [[CM-T3x: U-Boot: Firmware_Overview#Default MMC.2FSD card mapping | Default MMC/SD Card mapping]] article:
+
This article describes package structure and peripheral device options specific to the CM-T3730.
<pre>
+
 
Disk /dev/sdc: 8035 MB, 8035237888 bytes
+
= Package contents =
32 heads, 32 sectors/track, 15326 cylinders, total 15693824 sectors
+
 
Units = sectors of 1 * 512 = 512 bytes
+
== version.txt ==
Sector size (logical/physical): 512 bytes / 512 bytes
+
The contents of the {{filename|version.txt}} identifies the package version.
I/O size (minimum/optimal): 512 bytes / 512 bytes
+
 
Disk identifier: 0x710ab397
+
== images ==
 +
* {{filename|uImage-cm-t3730.bin}} - ready to run Linux kernel image binary for CM-T3730
 +
* {{filename|Android-image-cm-t3730.tar.bz2}} - Android root file system archive
 +
 
 +
== development ==
 +
The {{filename|development}} directory contains a collection of patches with support for CM-T3730.
 +
The directory structure preserves the Rowboat Android Source tree structure.
 +
It contains patches for several Android sub-projects including Linux kernel.
 +
* {{filename|build}} - contains a collection of patches that determine build specification for CM-T3730
 +
* {{filename|device/compulab/cm_t3730}} - contains a collection of patches that introduce CM-T3730 support
 +
* {{filename|hardware}} - contains hardware specific patches
 +
** {{filename|devmem2}} - provides {{filename|devmem2}} utility
 +
** {{filename|ti}} - TI platform specific patches
 +
*** {{filename|omap3}} - patches for CM-T3730 audio
 +
*** {{filename|sgx}} - patches for Graphics SDK
 +
* {{filename|kernel}} - contains a collection of patches for Linux kernel with support for CM-T3730 peripherals
 +
* {{filename|system/core}} - patches that provide additional system functionality
 +
 
 +
== kernel ==
 +
* {{filename|uImage-2.6.37-cm-t3730-1.bin}} - ready to run Linux kernel 2.6.37-cm-t3730-1 for CM-T3730 can be used with either Android or Linux root filesystem
 +
* {{filename|linux-2.6.37-cm-t3730-1.config}} - Linux kernel 2.6.37-cm-t3730-1 configuration file
 +
* {{filename|linux-2.6.37-cm-t3730-1.patch}} - patch vs. [http://gitorious.org/rowboat/kernel/commit/c83d5f31dd92832fd83db48c073d82546c23eeab rowboat-jb-am37x-4.1.2] tag with support for CM-T3730 peripherals
 +
* {{filename|patches}} - ordered collection of patches, that form the single patch above ({{filename|linux-2.6.37-cm-t3730-1.patch}})
 +
 
 +
== utilities ==
 +
The {{filename|utilities}} directory contains miscellaneous utilities useful for development
 +
* {{filename|eeprom-util}} - CompuLab EEPROM utility for reading information found inside the EEPROM on CompuLab boards
 +
 
 +
= Keypad =
 +
The matrix keypad is supplied with the CM-T3730 Evaluation Kit.
 +
Connect the keypad to the SB-T35 base-board (connector P10) via 20-pin flat cable supplied with the evaluation kit.
  
  Device Boot      Start        End      Blocks  Id  System
+
== Kernel Keypad Configuration ==
/dev/sdc1  *        2048      242959      120456    c  W95 FAT32 (LBA)
+
The default Linux Kernel keypad configuration is defined in the CM-T3530/CM-T3730 board file {{filename|kernel/arch/arm/mach-omap2/board-cm-t35.c}} as follows:
/dev/sdc2          243712    15693823    7725056  83  Linux
 
</pre>
 
* If you use the micro SD card, supplied with the CM-T3730 Evaluation kit, that has already been pre-partitioned as required, proceed to the [[#Booting Android | Booting Android]] section.
 
* Format for FAT32 partition:
 
<pre>
 
sudo mkfs.vfat -F 32 -n boot /dev/sdc1
 
</pre>
 
* Mount the partition under {{filename|/media/boot}} location:
 
<pre>
 
sudo mkdir -p /media/boot
 
sudo mount /dev/sdc1 /media/boot
 
</pre>
 
* Copy the X-Loader binary on to the boot partition and rename it as {{filename|MLO}}. It is essential that the {{filename|MLO}} will be the first file created on the MMC/SD card.
 
<pre>
 
cp /path/to/cm-t3730-android-demo/images/x-loader.bin /media/boot/MLO
 
</pre>
 
* Copy U-Boot and Linux kernel images on to the boot partition:
 
 
<pre>
 
<pre>
cp /path/to/cm-t3730-android-demo/images/u-boot.bin /media/boot/
+
static uint32_t cm_t35_keymap[] = {
cp /path/to/cm-t3730-android-demo/images/uImage /media/boot/
+
KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT),
 +
KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN),
 +
KEY(2, 0, KEY_RIGHT), KEY(2, 1, KEY_C), KEY(2, 2, KEY_D),
 +
};
 
</pre>
 
</pre>
  
== Booting Android ==
+
The keypad is supported by the {{parameter|TWL4030 Keypad}} driver {{filename|kernel/drivers/input/keyboard/twl4030_keypad.c}}.
* Format ext4 partition:
 
<pre>
 
sudo mkfs.ext4 -L rootfs /dev/sdc2
 
</pre>
 
* Mount the partition under {{filename|/media/boot}} location:
 
<pre>
 
sudo mkdir -p /media/rootfs
 
sudo mount /dev/sdc2 /media/rootfs
 
</pre>
 
* Extract the preliminary Android Demo root filesystem on to that partition:
 
<pre>
 
sudo tar -xpf /path/to/cm-t3730-android-demo/images/Android-Demo-image-cm-t3730.tar.bz2 -C /media/rootfs && sync
 
</pre>
 
* Unmount all micro SD card partitions:
 
<pre>
 
sudo umount /dev/sdc1; sudo umount /dev/sdc2
 
</pre>
 
* Remove the micro SD card from the SD card reader and install it in the CM-T3730 micro SD card socket (P5).
 
* Continue to the [[#After Installation | After Installation]] section.
 
  
== After Installation ==
+
== Android Keypad Configuration ==
* Connect the host PC to the SB-T35 base-board (connector P12) via the serial cable supplied with the evaluation kit.
+
The default Android keypad configuration is determined by the Android Key layout file {{filename|/system/usr/keylayout/TWL4030_Keypad.kl}}.  
* Start terminal emulation software on your PC. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
+
This file is responsible for mapping Linux key and axis codes to Android key and axis codes and specifying associated policy flags.
* Turn on the CM-T3730 evaluation system. The U-Boot boot-loader will start and you will get a command prompt.
+
The {{filename|TWL4030_Keypad.kl}} for CM-T3730 looks as follows:
* Set the {{parameter|bootargs}} environment variable:
 
<pre>
 
setenv bootargs "console=ttyO2,115200n8 androidboot.console=ttyO2 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait init=/init ip=dhcp \
 
omap_vout.vid1_static_vrfb_alloc=y vram=8M omapfb.vram=0:8M omapdss.def_disp=dvi omapfb.mode=dvi:1024x768-16"
 
</pre>
 
* To boot preliminary Android Demo image type:
 
 
<pre>
 
<pre>
CM-T3x # setenv bootdelay 3
+
# CM-T3730 TWL4030 KEYPAD keylayout
CM-T3x # setenv bootcmd "mmc rescan; fatload mmc 0 82000000 uImage; bootm"
+
key 30    BACK              WAKE_DROPPED
CM-T3x # saveenv
+
key 48    HOME              WAKE
CM-T3x # boot
+
key 46    MENU              WAKE_DROPPED
 +
key 32    SEARCH            WAKE
 +
key 28    POWER              WAKE
 
</pre>
 
</pre>
  
 
= See also =
 
= See also =
* [[CM-T3x: U-Boot: Firmware_Overview]]
+
* [[CM-T3730: Android: Getting started]]
* [[CM-T3x: Linux: Booting from MMC/SD card]]
+
* [[CM-T3730: Android: Building images]]
 
* [http://source.android.com Android Open Source Project]
 
* [http://source.android.com Android Open Source Project]
 
* [http://code.google.com/p/rowboat Android for Texas Instruments devices]
 
* [http://code.google.com/p/rowboat Android for Texas Instruments devices]
 
+
* [http://code.google.com/p/rowboat/wiki/JellybeanOnBeagleboard_WithSGX Android 4.1.2 Jelly Bean with SGX for AM37x platform]
  
 
[[Category:Android]]
 
[[Category:Android]]
 
[[Category:CM-T3730]]
 
[[Category:CM-T3730]]

Revision as of 09:05, 14 March 2013

Introduction

The Android Demo filesystem image for CM-T3730 is based on Rowboat Android 4.1.2 Jelly Bean support for TI's AM37x platform. The CompuLab Android Demo package for CM-T3730 includes ready to run Demo Android filesystem image and Linux kernel based on 2.6.37 version.

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

  • Android Jelly Bean 4.1.2 release from Google
  • Android Linux Kernel v2.6.37
  • 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, Matrix Keypad, LCD, Touchscreen, etc.

The Getting started with Android on CM-T3730 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-T3730.

Package contents

version.txt

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

images

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

development

The development directory contains a collection of patches with support for CM-T3730. The directory structure preserves the Rowboat Android 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-T3730
  • device/compulab/cm_t3730 - contains a collection of patches that introduce CM-T3730 support
  • hardware - contains hardware specific patches
    • devmem2 - provides devmem2 utility
    • ti - TI platform specific patches
      • omap3 - patches for CM-T3730 audio
      • sgx - patches for Graphics SDK
  • kernel - contains a collection of patches for Linux kernel with support for CM-T3730 peripherals
  • system/core - patches that provide additional system functionality

kernel

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

utilities

The utilities directory contains miscellaneous utilities useful for development

  • eeprom-util - CompuLab EEPROM utility for reading information found inside the EEPROM on CompuLab boards

Keypad

The matrix keypad is supplied with the CM-T3730 Evaluation Kit. Connect the keypad to the SB-T35 base-board (connector P10) via 20-pin flat cable supplied with the evaluation kit.

Kernel Keypad Configuration

The default Linux Kernel keypad configuration is defined in the CM-T3530/CM-T3730 board file kernel/arch/arm/mach-omap2/board-cm-t35.c as follows:

static uint32_t cm_t35_keymap[] = {
	KEY(0, 0, KEY_A),	KEY(0, 1, KEY_B),	KEY(0, 2, KEY_LEFT),
	KEY(1, 0, KEY_UP),	KEY(1, 1, KEY_ENTER),	KEY(1, 2, KEY_DOWN),
	KEY(2, 0, KEY_RIGHT),	KEY(2, 1, KEY_C),	KEY(2, 2, KEY_D),
};

The keypad is supported by the TWL4030 Keypad driver kernel/drivers/input/keyboard/twl4030_keypad.c.

Android Keypad Configuration

The default Android keypad configuration is determined by the Android Key layout file /system/usr/keylayout/TWL4030_Keypad.kl. This file is responsible for mapping Linux key and axis codes to Android key and axis codes and specifying associated policy flags. The TWL4030_Keypad.kl for CM-T3730 looks as follows:

# CM-T3730 TWL4030 KEYPAD keylayout
key 30    BACK               WAKE_DROPPED
key 48    HOME               WAKE
key 46    MENU               WAKE_DROPPED
key 32    SEARCH             WAKE
key 28    POWER              WAKE

See also