Android Getting Started

=Intent= This page contains information on how to download and build android for ICS and Jelly Bean using TI repository.

=Setup=

Configuring the Target Device (Blaze/Panda)
For instructions on how to setup the blaze hardware, refer to Platform Configuration

Connect the Target board to PC
To setup Blaze / Panda to display debug messages via Teraterm/Hyperterm on a PC, connect and configure the below.

Connect a USB cable (mini-B connector) to the J12 receptacle and the other side to the USB port on PC. Windows PC should recognize the USB to serial device connection as "USB Serial Converter A".

For instructions on how to configure this, refer Platform to PC

Linux Distribution
Ubuntu is the recommended Linux distribution for this setup. Other distributions are available, however the configurations listed in this wiki currently only covers Ubuntu.

Ubuntu is available for download at: https://help.ubuntu.com/community/Installation

Note: Around 10GB of hard disk space is required to build one release of Android.

Working behind a firewall
Refer to OMAP Platform Support Tools for more information on setting up Ubuntu's Firewall.

ARM Cross Compiler
CodeSourcery ARM Compiler should be used for building different kernel distribution and software releases on OMAP platforms. Visit www.codesourcery.com for more info.

Note: For L24x, L27x kernel builds, Codesourcery tool chain 2009-q1 release should be used. Quick Link - CodeSourcery G++ Lite 2009q1-203 for ARM GNU/Linux

Steps

export PATH=//bin:$PATH export CROSS_COMPILE=arm-none-linux-gnueabi-
 * Download .tar from above link and untar to a host pc directory.
 * Add Compiler directory to PATH, and cross compiler prefix before build

Additional packages required for building
To uninstall “sun-java6-jdk” please type:
 * Intrepid (8.10) users may need a newer version of libreadline:


 * Ubuntu 9.10 users may need to install a newer version of standard C++ library


 * Ubuntu 9.10 and 10.x users need to follow below steps to install sun-java5-jdk


 * Ubuntu Intrepid (8.10) users need to roll back on the gcc to the 4.2 version (Intrepid comes with 4.3).

For Ubuntu® users, who previously had java6 installed might run into the following error:

Try to change the default java version with the following command: This will show you the options you have for selecting which java version you want by default. You will have to do this for all java binaries that come with the java jdk (javac, javadoc, javah, etc).


 * Libiconv

This can be downloaded from http://www.gnu.org/software/libiconv/ Follow the instructions and install to the standard location. like:

After installing GNU libiconv for the first time, it is recommended to recompile and reinstall GNU gettext, so that it can take advantage of libiconv. On systems other than GNU/Linux, the iconv program will be internationalized only if GNU gettext has been built and installed before GNU libiconv. This means that the first time GNU libiconv is installed, we have a circular dependency between the GNU libiconv and GNU gettext packages, which can be resolved by building and installing either

first libiconv, then gettext, then libiconv again

for further information refer to the link http://www.gnu.org/software/libiconv/

64-bit Host

On a 64-bit host, you need to force creation of 32-bit code and use the 32-bit version of libiconv. You can do the native 64-bit build and install as described above first. Then to build a 32-bit version:

Note: You may also need to install ia32-libs.

=Working with pre-built binaries= For those who're looking to quickly get started with Android on a Zoom2 device may download and install the following pre-built binaries to quickly boot the device.

Image taken from the git tree (on 5/15/09):

Uboot MLO uImage File System

Image taken from the git tree (on 6/29/09):

Uboot MLO uImage File System Readme

The latest L25.12 binaries (Oct 2009) have been released as RLS25.12 Package

Please refer to the Build instructions section of L25.12 Release Notes for details to work with them

For installation you may directly jump to the Installing Android section.

=Accessing Source Code= TI's official releases usually contain additional licensed content (including 3rd party software) in addition to the content in open source. Licensed content such as Hardware Accelerated MP3, H264 Encoder,720p Video codecs can be obtained via the official releases by license holders through TI.

Setting Environment
Create the following directories:

$ cd ~/ $ mkdir bin $ mkdir mydroid

Export tool chain path:

$ export PATH=$PATH:/home//bin $ export MYDROID=/home//mydroid

Installing repo
For detail information regarding repo visit: Using Repo and Git

Other reference links on Git can be found in Techincal References page

Download repo to environment: $ cd ~/bin $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo

=Source Versions= Two different versions of source code are available for the community. The "Latest Code" provides up to the minute release. This version of source code is considered unstable. "Stable Release" source code has been tested and is considered to be rather stable.

Latest Code
Initialize the project to use the latest manifest

Gingerbread
Then just run:

To download a particular project, run:

Stable Release
The stable tested release version will provide a tested, verified stable point in the release. Download these versions if you want a point of known functionality. These stable versions are tested by TI test team, and both test results and release notes have been produced. All the Open Sourced code will be accessible via this method. Apart from this you can access certain HW accelerated codecs, such as WLAN/BT firmware for Zoom-II platform. There will be additional HW accelerated codecs, 3rd part content & features that may be available from releases obtained through TI. To obtain licenses for additional content, contact your TI representative.

To access these releases:


 * obtain the correct manifest file from omapmanifest
 * initialize your project with the manifest you have chosen
 * obtain the source code for the release

Obtain Correct Manifest
Create a directory to store your manifest, thus: $ cd $MYDROID $ mkdir my_manifest $ cd my_manifest

Obtain Source Code for Release
Clone manifest project and reviewing current available tags $ git clone git://git.omapzoom.org/platform/omapmanifest.git $ cd omapmanifest $ export MANIFEST=`pwd` $ git tag

Manifest Tags
Example of git tag print out: RLS25.INC2.5rc2 RLS25.12RC0 RLS25.6rc4 RLS25.6rc7 RLS25.6rc8 RLS25.7rc0 RLS25.7rc1 RLS25.7rc2 . . . RLS25.9rc4 android-1.0


 * RLS25.x

Indicate official released software versions. These versions will have published Release Notes and Product Test results associated with them. For example: RLS25.6 indicates the official 25.6 release version.


 * RLS25.xrcy

Indicate an intermediate build between official releases. These intermediate builds are called "release candidates". They should be considered unstable intermediate builds. They are used to provide a stable compilation point at which testing can begin between releases. The test results for these builds will not be published externally.

For example: RLS25.7rc1 is a point used for testing between the 25.6 release and the 25.7 release.


 * RLS25.INC2.x

Indicate official released software versions for OMAP3630. These versions will have published Release Notes and Product Test Results associated with them. ''For example: RLS25.INC2.6 indicates the official 25.6inc2 release version. ''
 * RLS25.INC2.xrcy

Indicate an intermediate build between official releases for OMAP3630. These intermediate builds are called "release candidates". They should be considered unstable intermediate builds. They are used to provide a stable compilation point at which testing can begin between releases. The test results for these builds will not be published externally. For example: RLS25.INC2.7rc1 is a point used for testing between the 25inc2.6 release and the 25inc2.7 release.

For example: RLS25E.16 indicates an Eclair (rather than Donut) build.

Select a release git tag and use a hard rest command:

$ git reset --hard RLS25.6

Initialize Project
Initialize project based on manifest chosen $ cd $MYDROID $ repo init -u $MANIFEST $ repo sync

This process takes about an hour.

Note: You might see the following error when you try to initialize repo:

Error: IOError: [Errno 2] No such file or directory: '/home// mydroid/.repo/manifests/.git/HEAD'

Following instructions may solve the above error:

$ touch ~/.gitconfig $ rm -rf .repo

DOWNLOADING PARTIAL CODE
If a user wants to download partial code instead of complete android source, the user can follow the below steps:

After "repo init" execute the below command:

$ repo sync

For example: If the user wants latest omx code from eclair branch:

$ repo init -u git://git.omapzoom.org/platform/omapmanifest.git -b eclair

$ repo sync hardware/ti/omx

=Building Android=

Building uboot
$ cd $MYDROID/bootable/bootloader/u-boot $ make distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3630zoom3_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- $ cp $MYDROID/bootable/bootloader/u-boot/tools/mkimage ~/bin/ Note (for latest release at least): By default the toolchain (arm-none-linux-gnueabi-) is not in your path, you either have to sym link it to /usr/bin (ie ln -s $HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-gcc /usr/bin/arm-none-linux-gnueabi-gcc -- and do that for each tool), or, more easily, specify the full path in the CROSS_COMPILE flag (ie CROSS_COMPILE=$HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-) for each of the above make commands.
 * For Eclair 3630 releases starting L25.INC2.5

$ cd $MYDROID/bootable/bootloader/u-boot $ make distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- $ cp $MYDROID/bootable/bootloader/u-boot/tools/mkimage ~/bin/ Note (for latest release at least): By default the toolchain (arm-none-linux-gnueabi-) is not in your path, you either have to sym link it to /usr/bin (ie ln -s $HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-gcc /usr/bin/arm-none-linux-gnueabi-gcc -- and do that for each tool), or, more easily, specify the full path in the CROSS_COMPILE flag (ie CROSS_COMPILE=$HOME/mydroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin/arm-eabi-) for each of the above make commands.
 * For releases starting L25.10

$ cd $MYDROID/bootloader/u-boot $ make distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- $ cp $MYDROID/bootable/bootloader/u-boot/tools/mkimage ~/bin/
 * For releases prior to L25.10 release

''Note: Configuration option varies by platform. Above is an example for building Zoom2. Change "omap3430zoom2_config" to "omap3430labrador_config" for Zoom1(LDP) or "omap3430sdp_config" to enable a build for SDP or "omap3630zoom3_config" for Zoom3.''

Note: If you get "cmd_voltage.c:27: error: inline function 'voltage_info' cannot be declared weak" try an older GCC (CSL 2008q3-72 seems ok)

"uboot" is available at: $MYDROID/bootable/bootloader/u-boot/u-boot.bin $MYDROID/bootloader/u-boot/u-boot.bin
 * For releases L25.10 and higher
 * For releases prior to L25.10

Building xloader
$ cd $MYDROID/bootable/bootloader/x-loader $ make distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom3_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- ift
 * For Eclair 3630 releases starting L25.INC2.5

$ cd $MYDROID/bootable/bootloader/x-loader $ make distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- ift
 * For releases starting L25.10

$ cd $MYDROID/bootloader/x-loader $ make distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap3430zoom2_config $ make CROSS_COMPILE=arm-none-linux-gnueabi- ift
 * For releases prior to L25.10 release

''Note: Configuration option varies by platform. Above is an example for building zoom2. Change "omap3430zoom2_config" to "omap3430labrador_config" or "omap3430zoom2_config" or "omap3630zoom3_config " to enable a build for zoom1 (LDP) or SDP respectively or Zoom3.''

"MLO" is available at: $MYDROID/bootable/bootloader/x-loader/MLO $MYDROID/bootloader/x-loader/MLO
 * For releases L25.10 and higher
 * For releases prior to L25.10

Building kernel

 * For Froyo 3630 releases starting on L25.INC3.1

Kernel directory disappears from the $MYDROID/kernel/ directory. A reference file has been created instead $ cd $MYDROID $ cat README.kernel

For kernel 2.6.29 the instructions might look like:
 * 1) git clone git://git.omapzoom.org/kernel/omap.git android-2.6.29
 * 2) cd android-2.6.29
 * 3) git checkout -b p-android-omap-2.6.29 --track origin/p-android-omap-2.6.29

For kernel 2.6.32 the instructions might look like:
 * 1) git clone git://git.omapzoom.org/kernel/omap.git android-2.6.32
 * 2) cd android-2.6.32
 * 3) git checkout -b p-android-omap-2.6.32 --track origin/p-android-omap-2.6.32

Refer to the mentioned file for updated information.

The kernel can be cloned even outside $MYDROID

$ cd $MYKERNELS/ $ git clone git://git.omapzoom.org/kernel/omap.git $ cd omap/ $ git checkout --track -b omap3-2.6.32 origin/omap3-2.6.32 $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- android_zoom3_defconfig $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage

$ cd $MYDROID/kernel/android-2.6.29 $ make CROSS_COMPILE= /arm-none-linux-gnueabi- distclean $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zoom3_defconfig $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage To build the kernel modules: $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
 * For Eclair 3630 releases starting L25.INC2.5

$ cd $MYDROID/kernel/android-2.6.29 $ make CROSS_COMPILE= /arm-none-linux-gnueabi- distclean $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- zoom2_defconfig $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- uImage To build the kernel modules: $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
 * For releases L25.10 and higher

The output module for USB gadget is at: $MYDROID/kernel/android-2.6.29/drivers/usb/gadget/

$ cd $MYDROID/kernel $ make CROSS_COMPILE= /arm-none-linux-gnueabi- distclean $ make CROSS_COMPILE=arm-none-linux-gnueabi- omap_zoom2_android_defconfig $ make CROSS_COMPILE=arm-none-linux-gnueabi- uImage
 * For releases prior to L25.10

''Note: Configuration option varies by platform. Above is an example for building zoom2. Change "omap3430zoom2_config" to "omap_ldp_android_defconfig" to enable a build for zoom1 (LDP). Change "omap3430zoom2_config" to "zoom3_defconfig" enable a build for Zoom3 (OMAP3630).''

For USB modules: $ make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules

The output modules are at: $MYDROID/kernel/drivers/usb/gadget/

$MYDROID/kernel/android-2.6.29/arch/arm/boot/
 * "uImage" is available at:
 * For releases L25.10 and higher

$MYDROID/kernel/arch/arm/boot/
 * For releases prior to L25.10

Building Filesystem
Copy the board buildspec.mk. default file found under the vendor/ti/ directory to buildspec.mk at the top of your android root folder. This should setup a reasonable default for the board. Check and edit the file for additional options.

Example for zoom1(ldp) board [eclair] cp -Rfp vendor/ti/ldp1/buildspec.mk.default buildspec.mk

Example for Zoom2 or Zoom3 boards (same command) cd $MYDROID cp -Rfp device/ti/zoom2/buildspec.mk.default buildspec.mk

Example for OMAP4 Blaze or 4430SDP boards (same command) cd $MYDROID cp -Rfp device/ti/blaze/buildspec.mk.default buildspec.mk

Build Android $ make -j2

''Note: On x86_64 if you get a "/usr/bin/ld: skipping incompatible ... libstdc++.a" error you may need to create two symlinks -- "ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so" and "ln -s /usr/lib32/libgcc_s.so.1 /usr/lib32/libgcc_s.so". See. I also found that I needed lib32z1-dev and lib32ncurses5-dev.''

Note: This make step can be speed up by using make’s -j option to enable parallel execution. Recommended settings are: make -j8 for 2 x Quad Core CPU, make -j4 for either a Quad Core CPU or a 2 x Dual Core, make -j2 for a Dual Core CPU and make for a Single Core CPU.

Actually the -j# is creating the number of threads so the CPU can handle. Each thread will require about 1 GB of RAM. If your CPU is capable of handle 4 threads but you have 2 GB of RAM, the compile time will rise since your box will use Swapfile memory.

If you are not sure how many cores your system has type the following command: $ cat /proc/cpuinfo

That will list the number of cores that your system has. Use -j* where * is the number of cores listed on /proc/cpuinfo.

Adding System Sounds
By default, many UI sounds are disabled To enable keyclicks: 1. Navigate to the Settings widget and open it. 2. Select "Sound & Display" 3. Select "Audible touch tones" to toggle on. 4. Select "Audible selection" to toggle on. You can also select the default notification sound from this same menu. This should be heard at bootup and other system events.The current default is "Look At Me".

Arm Only Build Option
Note: If you wouldn't use TI's HW Accelerated codecs and would want to perform only an ARM build, please follow the below instructions

After repo sync perform the following steps:

Edit: “vendor/ti/zoom2/BoardConfig.mk”:

Uncomment “USE_CAMERA_STUB := true” Comment “BOARD_USES_TI_CAMERA_HAL := true” Comment "HARDWARE_OMX := true” Doing so will not build the TI OMX components and Opencore will choose it’s own codecs instead.

SD media Support Option
Note: This only applies to releases L25.9 and lower

All media files (mp3, mp4, aac, etc...) should be loaded onto the boot partition of the SD card. The fix below allows Android to detect the media files that are located on the boot section of the SD. Without this fix Android will not be able to detect media files and will give an error "unable to find media content".

Edit the following file: mydroid/system/core/mountd/ AutoMount.c

--- a/system/core/mountd/ AutoMount.c +++ b/system/core/mountd/ AutoMount.c

if (mp->state != kMounted && mp->state != kMounting &&           access(mp->device, R_OK) == 0) {

-       if (DoMountDevice(mp->device, mp->mountPoint) == 0 || -            MountPartition(mp->device, mp->mountPoint) == 0) +       if (MountPartition(mp->device, mp->mountPoint) == 0) {                         SetState(mp, kMounted); } = Prepare Filesystem=

For Zoom3
$ cd ~/ $ mkdir myfs $ cd myfs $ cp -Rfp $MYDROID/kernel/android-2.6.29/drivers/usb/gadget/*.ko $MYDROID/out/target/product/zoom2/root $ cp -Rfp $MYDROID/kernel/android-2.6.29/drivers/misc/ti-st/*.ko $MYDROID/out/target/product/zoom2/root $ cp -Rfp $MYDROID/out/target/product/zoom2/root/*. $ cp -Rfp $MYDROID/out/target/product/zoom2/system/. $ cp -Rfp $MYDROID/out/target/product/zoom2/data/. $ mv init.rc init.rc.bak $ cp -Rfp $MYDROID/device/ti/zoom2/omapzoom2-mmc.rc init.rc

Note: For older Eclair releases (that support Zoom3), the final step above will have a difference in the source directory: "cp -Rfp $MYDROID/vendor/ti/zoom2/omapzoom2-mmc.rc init.rc"

For Zoom2
$ cd ~/ $ mkdir myfs $ cd myfs $ cp -Rfp $MYDROID/out/target/product/zoom2/root/*. $ cp -Rfp $MYDROID/kernel/android-2.6.29/drivers/usb/gadget/*.ko. $ cp -Rfp $MYDROID/out/target/product/zoom2/system/. $ cp -Rfp $MYDROID/out/target/product/zoom2/data/. $ mv init.rc init.rc.bak $ cp -Rfp init.omapzoom2.rc init.rc

$ cd myfs $ sudo cp -Rfp * /media/FS $ sudo chmod 777 -R /media/FS/*
 * Once 'myfs' directory is prepared, copy it to sdcard ext2 or ext3 partition (say mounted as /media/FS)

Note: For LDP, the folder is out/target/product/ldp1; For init.rc, copy omapldpboard.rc

Creating Android's File System for NAND
$ cd $MYDROID/out/target/product $ cp -Rfp zoom2 zoom2.bak $ cd zoom2 $ rm -rf *.img $ rm -rf obj/PACKAGING/systemimage_unopt_intermediates/system.img $ cp ~/myfs/* $MYDROID/out/target/product/zoom2/root Note: Ok to see warnings here. Above step is only to copy files and not folders $ cp -Rfp ~/myfs/system/* $MYDROID/out/target/product/zoom2/system $ cp -Rfp ~/myfs/data/* $MYDROID/out/target/product/zoom2/data $ pico $MYDROID/out/target/product/zoom2/root/init.rc (And uncomment out the following lines (by removing the # sign): “# mount yaffs2 mtd@system /system” “# mount yaffs2 mtd@userdata /data nosuid nodev” “# mount yaffs2 mtd@cache /cache nosuid nodev”

$ cd $MYDROID $ make -j4 $ cd ~/ $ mkdir myfs_NAND $ cd myfs_NAND $ cp $MYDROID/bootable/bootloader/u-boot/tools/mkimage. $ cp $MYDROID/kernel/android-2.6.29/arch/arm/boot/zImage. $ cp $MYDROID/out/target/product/zoom2/*.img. $ cp $MYDROID/bootable/bootloader/u-boot/u-boot.bin. $ cp $MYDROID/bootable/bootloader/x-loader/MLO.

You should create a txt file called /home//myfs_NAND/env.txt with the following text inside: bootdelay 5 bootargs console=ttyS3,115200n8 rootdelay=1 mem=256M init=/init videoout=omap24xxvout omap_vout.vid1_static_vrfb_alloc=y bootcmd nand unlock; nand read.i 81c00000 ${kernel_nand_offset} ${kernel_nand_size}; bootm 81c00000

Create an uMulti image by doing: $ cd ~/myfs_NAND $ sudo ./mkimage -A arm -O linux -T multi -C none -a 0x80008000 -e 0x80008000 -n 'L25.11' -d ./zImage:./ramdisk.img uMulti-2

Opening and changing files in ramdisk.img for debugging
A ramdisk is basically a small filesystem containing the core files needed to initialize the system. It includes the critical init process, as well as init.rc, which is where you can set many system-wide properties. If you really want to know more about it, here is the documentation. Here's a list of files on a typical ramdisk: data default.prop dev env.txt init init.goldfish.rc init.omapzoom2.rc init.rc proc sbin\ sbin\adbd sbin\hotplug

Here are the steps to open, edit and create a new ramdisk.img

# cp ramdisk.img ramdisk.img.bkup # mkdir tmp && cd tmp
 * Copy the ramdisk.img to your UBuntu (Linux) machine
 * Back up ramdisk.img and Create a temporary folder, say tmp

# gunzip -c ../ramdisk.img | cpio -i Modify the contents of file in tmp folder eg. init.rc
 * Extract the ramdisk using the command below
 * Modify the contents of tmp folder. The contents of tmp folder will get into the ramdisk.img

# find. | cpio -o -H newc | gzip > ../ramdisk.img
 * Recreate the ramdisk.cpio with command:

Opening system.img for debugging using UNYAFFS tool
Using unyaffs

'''Note: This is valid for OMAP3. OMAP4 onwards we have moved to EXT4 file system, and this is no longer valid.'''

The Android OS makes use of a yaffs file system. You can download the unyaffs tool to extract the content of an Android image. There is a prebuildversion available at the Downloads section. Place the unyaffs tool inside the ~/bin directory so that the tool can be found because it is inside the PATH definition

When the unyaffs is downloaded, make sure it can be executed # cd ~/bin # chmod a+x unyaffs

To open the system.img you can use the command below # mkdir tmp # cd tmp # sudo ~/bin/unyaffs 

Once you do this you will see the files/folders below app bin build.prop etc fonts framework lib media usr xbin

=Installing Busybox Command Line Tools (Optional)= This article describes how to install the busybox command line tools in the Android file-system. Please note that a pre-built version of busybox has been attached to this article if you would prefer not to build busybox yourself. Skip to Installing Busybox to filesystem if you select to use the prebuilt version. For the more information on the latest busybox environment visit: www.busybox.net


 * Prebuilt busybox_1.13.3

Configure and Build
Download busybox-1.13.3.tar.bz2 from www.busybox.net.

Extract the busybox source $ tar jxf busybox-1.13.3.tar.bz2

Configure busybox $ cd busybox-1.13.3/ $ make menuconfig

In menuconfig set the following options $ Busybox Settings --> Build Options --> Build Busybox as a static binary (no shared libs) -  Enable this option by pressing "Y" $ Busybox Settings --> Build Options --> Cross compiler prefix -  Set this option equal to "arm-none-linux-gnueabi-" $ Busybox Settings --> Installation Options (General Configuration in >= 1.9) --> Don't use /usr -  Enable this option by pressing "Y"

Export path to where the cross-compiler is located on the host. For more information on setting up cross-compiler in environment visit: Cross Compilers $ export PATH=$PATH://bin/

Build busybox $ make

Installing Busybox to filesystem
Create a /bin directory in the target file-system. For example: $ mkdir //bin

Copy the busybox binary to the /bin directory in the target file-system $ cp busybox //bin

Install the busybox command line tools on the target by executing the following commands: $ cd /bin $ ./busybox --install

Make the Busybox shell the default shell
Edit the console service so that it runs the busybox shell and not the default shell by replacing: $ vim init.rc -service console /system/bin/sh +service console /bin/sh

Add the path of the busybox command line tools to the system path variable by replacing: $ export PATH /sbin:/system/sbin:/system/bin:/system/xbin $ export PATH /bin:/sbin:/system/sbin:/system/bin:/system/xbin
 * 1) with

=Installing Android= This section helps with flashing the software and instructions to boot the system

Flashing Android
There are several flashing methods such as to SD, NAND and NFS

Flashing to SD
Prior to proceeding with these steps, review how to setup and format a SD card under Omap Platform Support Tools. This will provide instructions on creating the two paritions needed to copy the files.

$ sudo cp -rf /tmp/mmc1 $ sudo cp -rf /tmp/mmc1 $ sudo cp -rf /tmp/mmc1
 * Copying Bootloader (uboot.bin, MLO) and kernel to SD Card into boot partition

$ sudo cp –Rfp ~/myfs/* /tmp/mmc2 $ sudo chmod –R 777 /tmp/mmc2/*
 * Copying Android Filesystem to the SD card into the secondary partition

/media/boot and /media/disk
 * Once the Android Filesystem and the Bootloader are copied, remove and replace the card back into card reader and you should see two new media devices,

$ sudo umount /media/boot $ sudo umount /media/disk
 * Now remove the card from the card reader

Flashing to NAND using Fastboot
For a quick and fast way to flash Android into NAND refer to Android Fastboot

Other ways to flash Android
Refer to Omap Platform Support Tools for more ways to flash a zoom2.

Booting Android (Boot Args)
If the target device is not setup, refer to Configuring the target device.

Insert the SD card into Zoom2 and reboot or hit the reset button. From Hyperterminal/Teraterm on the PC, you should see a boot prompt. Please type the following commands to boot the Zoom2:

Note: If the device does not boot up with your SDHC card, try partitioning the same SDHC card again. If still the device does not boot up try another SDHC card. Many times changing the SDHC card solves the boot up problems.

Below are boot args for SD card (see the list lower to find the specific boot args that match your release)

#nand unlock #nand ecc sw #setenv bootargs 'console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init' #setenv bootcmd 'mmcinit 0; fatload mmc 0 0x80c00000 uImage; bootm 0x80c00000' #saveenv #bootm

Now, you should see Android booting on Zoom2....Congratulations!

For releases after L25.9, please note the below changes in boot args (replace them for the above).

L25.9 - Addition of videoout=omap24xxvout ...
 * 1) setenv bootargs ‘console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 init=/init mem=256M videoout=omap24xxvout’

L25.10 - Change in memory location
 * 1) setenv bootcmd 'mmcinit; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'

L25.11 - Inclusion of boot arg for Frame Buffer

videoout=omap24xxvout omap_vout.vid1_static_vrfb_alloc=y
 * 1) setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init \
 * 1) setenv bootcmd 'mmcinit; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'

L25.12 - New bootarg to enable video

videoout=omap24xxvout omap_vout.video1_numbuffers=4 omap_vout.vid1_static_vrfb_alloc=y
 * 1) setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init \
 * 1) setenv bootcmd 'mmcinit; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'

L25.13, L25.14 & L25.14M1- New bootarg to enable video

videoout=omap24xxvout omap_vout.video1_numbuffers=6 omap_vout.vid1_static_vrfb_alloc=y
 * 1) setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init \
 * 1) setenv bootcmd 'mmcinit; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'

L25E.16, L25E.17

videoout=omap24xxvout omap_vout.video1_numbuffers=6 omap_vout.vid1_static_vrfb_alloc=y omapfb.vram=“0:4M”
 * 1) setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init \
 * 1) setenv bootcmd 'mmcinit 0; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'

L25inc2.2:

videoout=omap24xxvout omap_vout.video1_numbuffers=6 omap_vout.vid1_static_vrfb_alloc=y omapfb.vram=“0:4M”
 * 1) setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init \
 * 1) setenv bootcmd 'mmcinit; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'

L25inc2.3 - Change in bootcmd and ecc: * mmcinit is now "mmcinit 0" or "mmc init 0" * we are now using hw ecc for all partitions

videoout=omap24xxvout omap_vout.video1_numbuffers=6 omap_vout.vid1_static_vrfb_alloc=y omapfb.vram=“0:4M”
 * 1) nand unlock
 * 2) nand ecc hw
 * 3) setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init \
 * 1) setenv bootcmd 'mmcinit 0; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'
 * 2) saveenv
 * 3) boot

L25inc2.5 - Change in bootargs: * Frame buffer size removed for 3630. For 3430 add mem=256M in bootargs

videoout=omap24xxvout omap_vout.video1_numbuffers=6 omap_vout.vid1_static_vrfb_alloc=y omapfb.vram=“0:4M”
 * 1) nand unlock
 * 2) nand ecc hw
 * 3) setenv bootargs console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 init=/init \
 * 1) setenv bootcmd 'mmcinit 0; fatload mmc 0 0x81c00000 uImage; bootm 0x81c00000'
 * 2) saveenv
 * 3) boot

L23.I3x - mmcinit command requires parameter '0' stdin=serial stdout=serial stderr=serial omap_vout.vid1_static_vrfb_alloc=y omapfb.vram="0:4M" '
 * 1) set bootargs 'console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M init=/init \
 * 1) set bootcmd 'mmcinit 0;fatload mmc 0 0x80300000 uImage;bootm 0x80300000'

For NFS Boot, root=/dev/mmcblk0p2 option would change to  root=/dev/nfs rw nfsroot= :/,nolock,wsize=1024,rsize=1024 ip=dhcp e.g. root=/dev/nfs rw nfsroot=128.247.77.43:/home/user/l25.7/myfs/,nolock,wsize=1024,rsize=1024 ip=dhcp

Note 1: All the other changes listed above apply depending on the release Note 2: On Zoom2, if there is a debug board installed, to see the console output, change ttyS2 to ttyS3. Note 3: Android boots slowly when running over NFS. Expect to wait for the system to boot.

=Debugging=

http://www.omappedia.org/wiki/Android_Debugging

=Enabling TI Hardware Accelerated Codecs=

Since all OpenMax components are available in the public git trees, hardware accelerator binaries have been released that corresponds to certain Android releases. For accessing the Android git trees, please refer to Accessing the Sources link above. To download the hardware accelerator package, look for the "Android_DSP_Binaries" link in the Files section of this project.

See OpenMAX_Project for the list of publically available codecs.

Please drop all of the hardware accelerator binaries from the DSP directory (from the downloaded installation above) in to your /system/lib/dsp directory in your target file system. Please note that if the "dsp" directory is not present in your target file system it will need to be created.

For more detailed information refer to Android DSP Codecs wiki.

=Installing WLAN and Bluetooth in Android=

Refer to Wilink Connectivity page on how to obtain the firmwarre and setup the system for WLAN and BT to work on Android

=Enabling Ethernet Port for Browsing=

Checking the Kernel
Ethernet support is already built into the default Kernel configuration provided by Texas Instruments. To double check if ethernet is set in the kernel configuration, look in the .config file in the Kernel root directory and check that the following is set to "y":

CONFIG_INET IP_PNP CONFIG_IP_PNP_DHCP CONFIG_NET_ETHERNET CONFIG_MII CONFIG_SMC911X

If Ethernet and networking configurations are not enabled properly, then use the menu config to enable it. To enter menu config, type "make menuconfig" in the Kernel root directory. Follow the following to enable:

Networking supportàNetworking optionsà TCP/IP networking IP: kernel level autoconfiguration IP: DHCP support

Device DriversàNetwork device supportàEthernet (10 or 100Mbit)à Generic Media Independent Interface device support SMSC LAN9115678 support

Checking the Bootargs
Once you have a proper kernel image, ethernet and TCP/IP should be operational. To get a valid DHCP add "ip=dhcp" to the u-boot bootargs environment variable, i.e.  setenv bootargs 'console=ttyS3,115200n8 root=/dev/mmcblk0p2 rw rootdelay=1 mem=256M ip=dhcp init=/init'

With the ip variable set in the bootargs, the kernel will use DHCP during boot-up to grab IP address from the DHCP server. Once this variable is set, the kernel will block until it detects a valid connection.

Checking the Android Properties
To get the Android browser to resolve address names, set the DNS server property. In either the ADB or COM shell, give the following command: “setprop net.dns1 xxx.xxx.xxx.xxx” where xxx.xxx.xxx.xxx is the IP address to your DNS server.

Note: If you are behind a proxy, then at the time this article was written we have NOT found a method to set the proxy server for the Android browser to use. We have 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.

=Installing an Application on Android=

How to install an App using Android Debug Bridge (ADB)

ADB is located in \out\host\linux-x86\bin\adb

On the linux host type the following command assuming target is connected on same network via Ethernet


 * 1) Killall –a adb
 * 2) export ADBHOST=
 * 3) adb shell

Then once you get ADB shell you can use various ADB command like ‘install’ to install apk file. For details refer ADB documentation

You may also install an application directly without the shell by typing


 * 1) adb install appName.apk

=Discuss=

If you run into an issue there is a active community around this project to help you out. Firstly, be sure to search this website to see if you issues is already addressed in other pages.

Mailing List

The project mailing list is omapandroid-discussion@gforge.ti.com. You should first subscribe to this list from omapandroid-discussion

IRC Chat

The community around the Zoom platform is typically on #linux-omap channel on irc.freenode.net. You should be able to chat and ask your questions. If you are new to IRC chat checkout the IRC Setup page.