Difference between revisions of "RowboatAndroid"
(→Build a Kernel) |
(→Install) |
||
Line 94: | Line 94: | ||
$ cd ~/rowboat-android | $ cd ~/rowboat-android | ||
$ cp kernel/arch/arm/boot/uImage /media/boot | $ cp kernel/arch/arm/boot/uImage /media/boot | ||
− | $ sudo tar xaf out/product/overo/rootfs.tar.bz2 --numeric-owner -C /media/rootfs | + | $ sudo tar xaf out/target/product/overo/rootfs.tar.bz2 --numeric-owner -C /media/rootfs |
</code> | </code> | ||
NOTE: this assumes the FAT partition of your bootable microSD card is mounted at /media/boot and that the EXT3 partition is mounted at /media/rootfs---adjust as appropriate. | NOTE: this assumes the FAT partition of your bootable microSD card is mounted at /media/boot and that the EXT3 partition is mounted at /media/rootfs---adjust as appropriate. |
Revision as of 20:21, 16 February 2011
Contents
Android on Overo
There are several ports of Android to Overo; one port is based off the Rowboat-Android project. This project is focused on creating a port of Android for the TI OMAP processors such as the OMAP3503 and OMAP3530 used on the Gumstix Overo boards. The steps described below explain how to get Android Froyo (2.2) running on an Overo. At the current time, there is no support for the DSP but the SGX drivers are supported.
Setup
This section explains how to download the required code and build a kernel and root file system.
Checkout Sources
Repo is a tool to manage multiple Git repositories. You can install it wherever you like but if you have administrator rights, you might find this convenient:
$ sudo curl http://android.git.kernel.org/repo > repo $ sudo chmod a+x repo $ sudo mv repo /usr/bin/repo
With Repo installed, grab the manifest file that describes all the git repositories we wish to fetch and then use 'repo sync' to get the latest and greatest source:
$ mkdir ~/rowboat-android $ cd ~/rowboat-android $ repo init -u git://gitorious.org/~ashcharles/rowboat/gumstix-manifest.git $ repo sync
This (default) manifest pulls most of the repositories directly from the rowboat-android project but a few specific repositories (ahem, the kernel) have been cloned from this project and tweaked for the Overo.
Build a Kernel
This would be a good time to apply any kernel patches.
$ cd ~/rowboat-android/kernel $ patch -p1 < ~/0001-added-palo43-pushbutton-and-led-support.patch $ patch -p1 < ~/0001-Enable-ADB-on-IGEPv2-board.patch
To build a kernel, follow these steps; you can use overo_android_defconfig to configure the kernel. E.g.
$ cd ~/rowboat-android $ export PATH=${PWD}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin:$PATH $ cd kernel $ make ARCH=arm overo_android_defconfig $ make ARCH=arm CROSS_COMPILE=arm-eabi- uImage -j8
You should now have a shiny new 2.6.32 Overo kernel here arch/arm/boot/uImage.
Build a Root File System
Follow these instructions to build a root file system using TARGET_PRODUCT=overo as the argument for make. E.g.
$ cd ~/rowboat-android $ make TARGET_PRODUCT=overo -j8
After a bit of a wait (read: an hour or two depending on your machine), you should have the root and system directories in the out/target/product/overo directory; we can combine these to make our final root file system:
$ cd ~/rowboat-android/out/target/product/overo $ mkdir android_rootfs $ cp -r root/* android_rootfs $ cp -r system android_rootfs
NOTE: Users wanting support for SGX hardware should skip to that section now before packaging their root file system.
We use the built-in mktarball.sh utility to package our android_rootfs directory into a tarball wherein the files have appropriate (i.e. root) permissions; this means you need root permissions for this next step:
$ cd ~/rowboat-android/out/target/product/overo $ sudo ../../../../build/tools/mktarball.sh ../../../host/linux-x86/bin/fs_get_stats android_rootfs . rootfs rootfs.tar.bz2
You should now have a root file system tarball sitting here ~/rowboat-android/out/target/product/overo/rootfs.tar.bz2.
Getting SGX (Optional)
The PowerVR SGX hardware found on Overo boards with a OMAP3530 processor (FE, Fire, Water) provides integrated graphics support; in particular, it seems to reduce flicker on displays attached to the Overo. It is necessary to add some extra libraries and drivers to the root file system to make use of this hardware. Grab the required code and build it:
$ cd ~/rowboat-android $ git clone git://gitorious.org/rowboat/ti_android_sgx_sdk.git $ cd ti_android_sgx_sdk $ ./OMAP35x_Android_Graphics_SDK_setuplinux_3_01_00_03.bin
At this point, you will be prompted to agree to the software license and asked where to unpack the source files (something like ~/rowboat-android/ is probably appropriate). Now navigate to this directory and edit the user-modifiable fields in the Rules.make file. Here are some suggested values:
HOME=/home/<username>/rowboat-android/out/target/product/overo GRAPHICS_INSTALL_DIR=/home/<username>/rowboat-android/OMAP35x_Android_Graphics_SDK_3_01_00_03 ANDROID_ROOT=$(HOME)/android_rootfs CSTOOL_DIR=/home/<username>/rowboat-android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/ KERNEL_INSTALL_DIR=/home/<username>/rowboat-android/kernel
Finally, we can build and install this code (N.B. these command are issued from the directory where we unpacked the source):
$ make -j8 $ make install OMAPES=3.x
More complete instructions are available here.
DSP Support
Currently, this version does not support the C64+ DSP found on Overo boards with a OMAP3530 processor (FE, Fire, Water). To get this working, these two pages may be helpful:
Install
It is easiest to boot Android from a microSD card. Follow the instructions here to create a bootable microSD card with a recent MLO and U-boot from gumstix. Also copy over the Android kernel and untar the root file system (requires root permissions) you have created:
$ cd ~/rowboat-android $ cp kernel/arch/arm/boot/uImage /media/boot $ sudo tar xaf out/target/product/overo/rootfs.tar.bz2 --numeric-owner -C /media/rootfs
NOTE: this assumes the FAT partition of your bootable microSD card is mounted at /media/boot and that the EXT3 partition is mounted at /media/rootfs---adjust as appropriate.
HINT: The commands to package the root file system, install the SGX (if desired), and copy these over to a microSD card are readily script-able; if you plan on doing this more than once...
Boot
The Android kernel requires some special parameters on boot. I have set these up in u-boot as follows (though this is certainly not the only way to do it):
# setenv anddisplay 'vram=8M omapfb.mode=dvi:1024x768MR-16@60 omapdss.def_disp=lcd43' # setenv andconsole 'console=ttyS2,115200n8 console=tty0 androidboot.console=ttyS2' # setenv androot 'root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait init=/init' # setenv andbootargs 'setenv bootargs mpurate=500 ${andconsole} ${androot} ${anddisplay}' # setenv andbootcmd 'mmc init; fatload mmc 0 ${loadaddr} uImage; run andbootargs; bootm ${loadaddr}' # saveenv
To boot Android, just type run andbootcmd at the u-boot prompt.
If you always want to boot into android, set and save ${andbootcmd} as your boot command i.e.
# setenv bootcmd ${andbootcmd} # saveenv
NOTE: If you are using a 4.3" LCD panel (Chestnut43, Palo43), use defaultdisplay=lcd43; for a 3.5" LCD panel (Palo35), use defaultdisplay=lcd35; for an external DVI monitor (Tobi, Summit), use defaultdisplay=dvi. Even if you are using an LCD panel, it is not necessary to change the omapfb.mode as this just sets up the framebuffer in the case that an external DVI monitor is used.
Using Android
For touchscreen displays, you might like to replace the pointercal file found in ~/rowboat-android/devices/gumstix/overo with one specific to the display you are using. To do this, boot your Gumstix + touchscreen with the standard Angstrom build, do the touchscreen calibration step, and then grab the /etc/pointercal file from the root file system.
A mouse with a scroll-wheel can be attached to the USB Host port via a USB hub and used as buttons:
- Right-click---back to home screen
- Middle(scroll)-click---options
- Scroll---scrolls
Note that the mouse doesn't function like a regular pointer.
Please help out by listing features that are not (and, equally important, are working):
Known Working
Known Failing
Help and Help Out
These steps have mostly been taken from (and would hopefully be integrated with :)) the [rowboat-android] wiki; look here for additional information. Other useful links include:
The mailing list for this project is quite valuable; check the archives for rowboat@googlegroups.com.
Patches, suggestions and improvements are most welcome---please send to ash (at) gumstix.com.