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

From OMAPpedia

(Difference between revisions)
Jump to: navigation, search
(Initial page submission)
(Add helper scripts reference.)
 
(3 intermediate revisions not shown)
Line 9: Line 9:
* PandaBoard Rev A2 (w/OMAP4430 ES2.1)
* PandaBoard Rev A2 (w/OMAP4430 ES2.1)
* Logitech Webcam C250 (http://www.logitech.com/en-us/38/5864)
* 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:
 +
 +
[[File:PandaUSBCam_for27.IS.2.M1_HelperScripts.tar.gz]]
 +
 +
Extract it in any location you want, and do the following:
 +
 +
For Downloading/building:
 +
<pre>
 +
./27.IS.2.M1_pandausbcam_android_build_cmds.sh
 +
</pre>
 +
 +
For flashing SD card through fastboot in Panda:
 +
<pre>
 +
./27.IS.2.M1_pandausbcam_android_flash_cmds.sh
 +
</pre>
 +
 +
And that's it! Enjoy! ;-)
= Steps =
= Steps =
Line 16: Line 41:
First, download this file:
First, download this file:
-
[[File:PandaUSBCam_for27.IS.2.M1_v1.tar.gz]]
+
[[File:PandaUSBCam_for27.IS.2.M1_v2.tar.gz]]
Next, take as a base these release notes:
Next, take as a base these release notes:
Line 63: Line 88:
0001-Enable-Multimedia-features.patch
0001-Enable-Multimedia-features.patch
0002-Add-Camera-app-and-USB-camera-support-for-panda.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
 +
</pre>
 +
 +
Finally, go to:
 +
<pre>
 +
cd ${MYDROID}/device/ti/proprietary-open
 +
</pre>
 +
 +
And apply respective patches:
 +
<pre>
 +
git am -3 <path-to-extracted-gzip-folder>/patches/mydroid/device/ti/proprietary-open/*.patch
 +
</pre>
 +
 +
Which should only apply the following patch:
 +
<pre>
 +
0001-Ducati-binary-fw-for-Panda.patch
 +
</pre>
 +
 +
And finally, execute this, to reuse blaze tablet ducati image for now:
 +
 +
<pre>
 +
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/
</pre>
</pre>
Line 69: Line 121:
Apply these patches on top of the release's kernel base commit-id.
Apply these patches on top of the release's kernel base commit-id.
<pre>
<pre>
-
git checkout 8524c061c9bf47daf683a439e1daf5ba9e599dcd
+
git checkout 6925ea33846858fb0bcd427912a9508b79c0bac3
git am -3 <path-to-extracted-gzip-folder>/patches/kernel/*.patch
git am -3 <path-to-extracted-gzip-folder>/patches/kernel/*.patch
</pre>
</pre>
Line 83: Line 135:
==== Building U-BOOT ====
==== Building U-BOOT ====
-
Use:  
+
Don't build it. Use the prebuilt binary included in the repo:
 +
 
<pre>
<pre>
-
make ARCH=arm omap4430panda_config
+
device/ti/panda/bootloader.bin
</pre>
</pre>
 +
 +
Which get's flashed through fastboot in a step below.
==== Building X-LOADER ====
==== Building X-LOADER ====
-
Use:
+
Don't build it. Use the prebuilt binary included in the repo:
 +
 
<pre>
<pre>
-
make ARCH=arm omap4430panda_config
+
device/ti/panda/xloader.bin
</pre>
</pre>
-
NOTE: Skip section "Signing X-LOADER for HS devices", as pandaboard is a GP
+
Which get's flashed through fastboot in a step below.
-
device. Means no MShield security protection, so it doesn't require signed
+
-
binaries.
+
==== Building Kernel ====
==== Building Kernel ====
Line 125: Line 179:
make CC=gcc-4.4 CXX=g++-4.4 -j4
make CC=gcc-4.4 CXX=g++-4.4 -j4
</pre>
</pre>
-
 
-
IMPORTANT: Build Camera.apk manually, since it doesn't seem to build with the main makefile, by doing:
 
-
<pre>
 
-
cd $MYDROID
 
-
source build/envsetup.sh
 
-
cd packages/apps/Camera
 
-
mm
 
-
</pre>
 
-
 
-
Then, repeat main make command shown above, to regenerate .img files.
 
== Preparing target ==
== Preparing target ==
Line 144: Line 188:
= Known Issues =
= Known Issues =
-
== Missing Camera App ==
+
== WiFi ==
-
Camera.apk is not built by default, needs manual build. See instructions above.
+
Needs someone expert in the matter to look at it. Anyone?
-
== Missing ducati_full_panda.tgz file ==
+
== USB camera ==
-
Release doesn't have any ducati images for panda, so you'll see this messages on lunch command:
+
* Image capture crashes. Support code not added yet.
-
<pre>
+
* Switching to Camcorder mode crashes. Support code not added yet.
-
tar (child): device/ti/proprietary-open/omap4/ducati_full_panda.tgz:
+
-
Cannot open: No such file or directory
+
-
tar (child): Error is not recoverable: exiting now
+
-
tar: Child returned status 2
+
-
tar: Error is not recoverable: exiting now
+
-
</pre>
+
-
Ignore for now... Maybe we should try copying blaze_tablet's Ducati? (Untested)
+

Latest revision as of 20:04, 16 April 2012

Contents

[edit] 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.

[edit] Tested Environment

[edit] 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:

File:PandaUSBCam for27.IS.2.M1 HelperScripts.tar.gz

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! ;-)

[edit] Steps

[edit] Prerequisites

First, download this file:

File:PandaUSBCam for27.IS.2.M1 v2.tar.gz

Next, take as a base these release notes:

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

[edit] L27.IS.2.M1 Release note changes

[edit] Downloading Release Software

[edit] Android Filesystem Sources

After the repo sync step, do the following steps:

cd ${MYDROID}/hardware/ti/omap4xxx
git am -3 <path-to-extracted-gzip-folder>/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 <path-to-extracted-gzip-folder>/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 <path-to-extracted-gzip-folder>/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/

[edit] Kernel & Driver Sources

Apply these patches on top of the release's kernel base commit-id.

git checkout 6925ea33846858fb0bcd427912a9508b79c0bac3
git am -3 <path-to-extracted-gzip-folder>/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

[edit] Build Instructions

[edit] 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.

[edit] 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.

[edit] 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.

[edit] Building Android Filesystem (AFS) with TI Codecs enabled

Use:

lunch full_panda-eng

And build with:

# For host with 4 CPUs:
make CC=gcc-4.4 CXX=g++-4.4 -j4

[edit] 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.

[edit] Known Issues

[edit] WiFi

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

[edit] USB camera

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox