Building L27.IS.2.M1 for PandaBoard, with USB camera support

= Introduction =

These instructions complement the official release notes, but with a set of patches needed to get it running on PandaBoard, with a Logitech USB webcam.

= Tested Environment =


 * Host PC: Ubuntu 11.10
 * PandaBoard Rev A2 (w/OMAP4430 ES2.1)
 * Logitech Webcam C250 (http://www.logitech.com/en-us/38/5864)

= Helper scripts =

This scripts should help you get all setup exactly as intended by below steps.

Easier if you want to leave it downloading/building for a couple of hours in an almost unattended manner.

Get this Tarball:



Extract it in any location you want, and do the following:

For Downloading/building: ./27.IS.2.M1_pandausbcam_android_build_cmds.sh

For flashing SD card through fastboot in Panda: ./27.IS.2.M1_pandausbcam_android_flash_cmds.sh

And that's it! Enjoy! ;-)

= Steps =

Prerequisites
First, download this file:



Next, take as a base these release notes:

http://omappedia.org/wiki/L27.IS.2.M1_OMAP4_Icecream_Sandwich_Release_Notes

Android Filesystem Sources
After the repo sync step, do the following steps: cd ${MYDROID}/hardware/ti/omap4xxx git am -3 /patches/mydroid/hardware/ti/omap4xxx/*.patch

Which should apply the following patches: 0001-CameraHAL-V4LCameraAdapter-Enables-USB-camera-basic-.patch 0002-CameraHAL-V4LCameraAdapter-co-exists-with-OMXCameraA.patch 0003-CameraHAL-V4LCameraAdapter-adding-capabilities.patch 0004-camera-SensorListener-Protect-from-NULL-pointer-dere.patch 0005-camera-V4LCameraAdapter-Remove-unneeded-ErrorUtils.h.patch 0006-HACK-camera-Just-enable-USB-camera-usecase.patch

Now, go to: cd ${MYDROID}/device/ti/panda

Checkout this commit: git checkout 83c631f431d69becbb9458d1d9a10e4fe8381415

And apply respective patches: git am -3 /patches/mydroid/device/ti/panda/*.patch

Which should apply the following patches: 0001-Enable-Multimedia-features.patch 0002-Add-Camera-app-and-USB-camera-support-for-panda.patch 0003-Fix-bad-PRODUCT_PACKAGES.patch 0004-Try-to-match-.mk-files-to-Blaze-Tablet.patch 0005-Sync-file-permissions-like-tablet-does.patch

Finally, go to: cd ${MYDROID}/device/ti/proprietary-open

And apply respective patches: git am -3 /patches/mydroid/device/ti/proprietary-open/*.patch

Which should only apply the following patch: 0001-Ducati-binary-fw-for-Panda.patch

And finally, execute this, to reuse blaze tablet ducati image for now:

cd ${MYDROID}/device/ti/proprietary-open/omap4 tar zxf ducati_blaze_tablet.tgz -C /tmp/ mv /tmp/ducati_blaze_tablet ducati_full_panda tar zcf ducati_full_panda.tgz ducati_full_panda/

Kernel & Driver Sources
Apply these patches on top of the release's kernel base commit-id. git checkout 6925ea33846858fb0bcd427912a9508b79c0bac3 git am -3 /patches/kernel/*.patch

Which should apply cleanly these 2 patches: 0001-panda_defconfig-Build-WLAN-as-module.patch 0002-panda_defconfig-Enable-V4L2-and-USB-UVC-camera.patch

Building U-BOOT
Don't build it. Use the prebuilt binary included in the repo:

device/ti/panda/bootloader.bin

Which get's flashed through fastboot in a step below.

Building X-LOADER
Don't build it. Use the prebuilt binary included in the repo:

device/ti/panda/xloader.bin

Which get's flashed through fastboot in a step below.

Building Kernel
Use: make ARCH=arm panda_defconfig

And after building the kernel, do: cp arch/arm/boot/zImage ${MYDROID}/device/ti/panda/kernel

so it gets used in the .img generation.

Building Android Filesystem (AFS) with TI Codecs enabled
Use: lunch full_panda-eng

And build with: make CC=gcc-4.4 CXX=g++-4.4 -j4
 * 1) For host with 4 CPUs:

Preparing target
Follow file "${MYDROID}/device/ti/panda/README", to prepare your board.

Feel free to share corrections/suggestions about this procedure, so it can be improved.

= Known Issues =

WiFi
Needs someone expert in the matter to look at it. Anyone?

USB camera

 * Image capture crashes. Support code not added yet.
 * Switching to Camcorder mode crashes. Support code not added yet.