Install Android ICS on PandaBoard with Touch Screen Support

Introduction

In this tutorial I will be covering the setup of PandaBoard ES and 10" LCD/LVDS bundle from the Chalkboard Electronics website. Also you will need a 20 position 1.27mm pitch female connector. I used the FCI part number 609-3759-ND which you can buy from Digi-Key. You will to need buy at least 2 connectors and solder them to PandaBoard jumpers J1 and J4.

The build was done on Ubuntu 12.04 using the AOSP master branch. Android source documentation states that building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master. For up to date information on PandaBoard build status go to the Android build page.

Installing required packages (Ubuntu 12.04)

Before we start building Android source we need to install following required dependecies.

Installing JDK 6

Download JDK 6 from the Oracle website and install the package to your favorite location. Make sure that you set JAVA_HOME and JDK_HOME environment variables, and add java binary to your PATH. For example, if you install java binaries to the /user/local/java location you can add following variables to your ~/.bashrc file.

Configuring USB access for Pandaboard

Add following lines to the /etc/udev/rules.d/51-android.rules file and change permission of the file to chmod a+x /etc/udev/rules.d/51-android.rules. Restart udev service with the sudo service udev restart command. This step is neccessery so you can later connect to your board with fastboot and adb commands.

Downloading Android source

First step will be to download repo tool that will make work with Android source a lot easier. You can follow detailed instructions from the Android Downloading the Source Tree page, or just run commands below. Cloning the Android repositories will take very long time.

Downloading and compiling OMAP kernel

Now you have a complete source code and you can start building custom kernel. To start the process, go to the ~/projects/android/device/ti/panda directory and check what omap kernel corresponds to the current source tree.

After you have PandaBoard specific kernel you can checkout version that corresponds to the SHA1 commit (ebb6cb6) from the ~/projects/android/device/ti/panda directory. In order to compile arm kernel on x86 host you will need a cross-compiling toolchain. We can just use the one from the Android source tree located in the prebuilt/linux-x86/toolchain directory. If you want to read more about cross-compiling toolchains you can download an excellent PDF slides from the Free Electrons website.

Before you compile custom kernel make sure you enable touch screen support and initialize correct screen resolution. The touch screen I'm using has 1024x600 resulution, so you have to pass arguments to notify omap frame buffer driver to set correct resolution for DVI output. You can do this by editing default kernel configuration file. You need to set the CONFIG_INPUT_TOUCHSCREEN param to y, and append the "omapfb.mode=dvi:1024x600MR-24@60 consoleblank=0" arguments to the CONFIG_CMDLINE configuration parameter. The other way to pass boot arguments would be to use U-Boot bootloader, but for that we would need to compile the bootloader source. For more information see the Appendix - Building U-Boot bootloader section.

Compiling Android

Finally you can proceed with building Android source. The first step is to initialize environment and with the lunch command choose what target you want to build. This will take around 30 min on i7 860 @2.80GHz with SSD drive.

source build/envsetup.sh
lunch full_panda-eng
make -j8

Installing to PandaBoard

These instructions are derived from the ~/projects/android/device/ti/panda/README file.

After you completed build process you can start installation. In the first step you will have to bootstrap your PandaBoard using the usbboot command. Before you start installation make sure you connect PandaBoard to PC USB port. Also, make sure that you don't insert your SD card before you load bootloader to your board.

The next step is to format and initialize SD card with xloader and bootloader files. Now you can insert your SD card into PandaBoard SD slot. Make sure that your SD card is equal or greater then 4GB. To complete this process just run following commands.

Finalizing installation

The last step left is to load vendor IDC (Input Device Configuration) file to the SD card. We need this step in order to set correct resolution for the touch screen. The LCD panel and touch screen that I have been using to create this tutorial can be purchased from Chalkboard Electronics website. You can download the file from their website, or for your convenience the IDC file is included here. To read more about IDC file format go to the Android IDC page.

AOSP compiles without problems, but I cant compile the kernel.
They removed the ./prebuilt folder, there is a ./prebuilts folder now which contains all the toolchain stuff. Environmental variable are written with the lunch command, so the omap kernel should find all he needs.

OK, the error is not dependent on the compiler or something. I copied my old "omap" folder to /tmp and linked via PATH to the old compiler:
export PATH=$HOME/Dokumente/WORKING_DIRECTORY/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin:$PATH