CM-T3730: Android

From Compulab Mediawiki
Revision as of 14:23, 22 January 2013 by Grinberg (talk | contribs) (See also)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

Preparation steps

  • Obtain a Linux PC workstation.
  • 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 Default MMC/SD Card mapping article, or create a new one.
  • 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 /dev/sdc.
  • Download the preliminary Android Demo package for CM-T3730 from CompuLab website. Unzip the package to a directory on your host workstation.
  • All image files mentioned below can be found in images subdirectory of the Demo package.

Booting X-Loader and U-Boot

  • Create two partitions (FAT32 partition for X-Loader, U-Boot and Linux kernel and ext4 partition for root filesystem) as described in the Default MMC/SD Card mapping article:
Disk /dev/sdc: 8035 MB, 8035237888 bytes
32 heads, 32 sectors/track, 15326 cylinders, total 15693824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x710ab397

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *        2048      242959      120456    c  W95 FAT32 (LBA)
/dev/sdc2          243712    15693823     7725056   83  Linux
  • 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 section.
  • Format for FAT32 partition:
sudo mkfs.vfat -F 32 -n boot /dev/sdc1
  • Mount the partition under /media/boot location:
sudo mkdir -p /media/boot
sudo mount /dev/sdc1 /media/boot
  • Copy the X-Loader binary on to the boot partition and rename it as MLO. It is essential that the MLO will be the first file created on the MMC/SD card.
cp /path/to/cm-t3730-android-demo/images/x-loader.bin /media/boot/MLO
  • Copy U-Boot and Linux kernel images on to the boot partition:
cp /path/to/cm-t3730-android-demo/images/u-boot.bin /media/boot/
cp /path/to/cm-t3730-android-demo/images/uImage /media/boot/

Booting Android

  • Format ext4 partition:
sudo mkfs.ext4 -L rootfs /dev/sdc2
  • Mount the partition under /media/boot location:
sudo mkdir -p /media/rootfs
sudo mount /dev/sdc2 /media/rootfs
  • Extract the preliminary Android Demo root filesystem on to that partition:
sudo tar -xpf /path/to/cm-t3730-android-demo/images/Android-Demo-image-cm-t3730.tar.bz2 -C /media/rootfs && sync
  • Unmount all micro SD card partitions:
sudo umount /dev/sdc1; sudo umount /dev/sdc2
  • 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 section.

After Installation

  • Connect the host PC to the SB-T35 base-board (connector P12) via the serial cable supplied with the evaluation kit.
  • 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.
  • Turn on the CM-T3730 evaluation system. The U-Boot boot-loader will start and you will get a command prompt.
  • Set the bootargs environment variable:
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"
  • To boot preliminary Android Demo image type:
CM-T3x # setenv bootdelay 3
CM-T3x # setenv bootcmd "mmc rescan; fatload mmc 0 82000000 uImage; bootm"
CM-T3x # saveenv
CM-T3x # boot

See also