OpenMoko Webcam

Rask Ingemann Lambertsen rask at
Wed Jan 14 00:27:03 CET 2009

On Sun, Jan 11, 2009 at 02:51:07PM +0100, Neil Benn wrote:
> Hello,
>           I am trying to enable support on my OpenMoko for Webcams.  I have
> followed the instructions to install debian by using the installation script
> described at :  I then followed
> the instructions for openmoko and webcam at :

   I found that those instructions don't work, presumably because they are
outdated. Here's how I got it to work:

--- begin HOWTO ---

This is a description of how to use
a USB webcam on a Neo Freerunner running the Debian distribution as of
2009-01-01. There are three parts to it:

1) Compiling the necessary kernel modules,
2) Installing utilities for changing USB mode (host/device).
3) Installing a video program.

Throughout, commands prefixed with # should be run as root while commands
prefixed with $ should be run as a normal user.

1. Compiling the necessary kernel modules,

# echo 'deb-src unstable main' >>/etc/apt/sources.list.d/pkg-fso.list
# apt-get update

# apt-get install dpkg-dev bzip2 gcc make xutils-dev libc6-dev libncurses5-dev

$ cd ~
$ mkdir download source build
$ cd source
$ dpkg --list | grep -F -e linux-image-
ii  linux-image-2.6.24-openmoko-gta02                       20081[...]
$ apt-get source linux-image-2.6.24-openmoko-gta02

You should now have an unpacked linux kernel tree. Make note of the extra version
string in the directory name, which in this particular case it is
'-20081103.git7172ec57'. For example, use your terminal's copy/paste facility to
make a copy of it before the 'make menuconfig' command below.

$ cd ~/build && mkdir linux-2.6-openmoko-20081103.git7172ec57 && cd linux-2.6-openmoko-20081103.git7172ec57
(making use of TAB-completion to save some typing)
$ lndir -silent ../../source/linux-2.6-openmoko-20081103.git7172ec57
$ cp /boot/config-2.6.24-20081103.git7172ec57 .config
$ make menuconfig

In 'General setup', 'Local version' enter the version string from above.
Nothing bad will happen to your Neo if you get it wrong, you'll just be sorry
in an hour or so when your modules won't load.

Most new USB cameras comply with the USB Video Class standard, for which no
driver was included in the 2.6.24 kernel, and the other drivers have since
been updated. We'll download and compile the camera drivers separately.

Some cameras include a microphone as a standard USB audio device. Enable it here:

Device Drivers -> Sound -> Advanced Linux Sound Architecture -> USB devices -> USB Audio/MIDI driver (type m)

Exit the menus all the way back to the shell, saving your new kernel configuration.

$ make M=sound modules
(10 minutes go by)

Install the sound modules:
$ su root
# make M=sound modules_install
# exit

Now we'll build the camera drivers.

$ cd ~
$ su root
# ln -sf ${PWD}/source/linux-2.6-openmoko-20081103.git7172ec57 /lib/modules/2.6.24-20081103.git7172ec57/source
# ln -sf ${PWD}/build/linux-2.6-openmoko-20081103.git7172ec57  /lib/modules/2.6.24-20081103.git7172ec57/build
# exit
$ cd ~/source
$ wget -O - | tee ~/download/uvcvideo-tip.tar.bz2 | tar -jxf -
$ sed -i -e 's/-type/-xtype/' uvcvideo-bb383c9099da/v4l/Makefile
$ cd ~/build && mkdir uvcvideo-bb383c9099da && cd uvcvideo-bb383c9099da
$ lndir -silent ../../source/uvcvideo-bb383c9099da
$ make menuconfig

Disable (type n) all the radio, tuner, DVB and DAB support unless you
have devices which use it. Under 'Video capture adaptors', you can disable the
teletext and debug options. Under 'V4L USB devices' leave all the drivers
enabled unless you already know which one(s) you'll need. Exit, saving your

$ make
(may take as much as 45 minutes)
# su root
# make install
# exit

2. Installing utilities for changing USB mode (host/device).

Starting with version 0.7, openmoko-panel-plugin can do this for you.
You can also install the usbmode tool found here (dpkg --force-architecture ...):

Usbmode needs to run as root, however. Either you know how to make a sudo
setup for it, or you'll make it setuid root:
# chmod u+s /usr/bin/

3. Installing a video program (UNDER CONSTRUCTION).


And all of this without needing to reboot.

--- end HOWTO ---

   I tried it with a Logitech Quickcam Pro for Notebooks (2007 version) and
guvcview as packaged by Debian. The USB Video Class driver appear to work fine, but
there are two issues:

1) Guvcview on Debian/armel has problems. It saves a corrupt config file,
preventing it from starting again unless you delete the config file. It also
saves a corrupt AVI capture file. It works fine on Fedora/x86. I haven't yet
tried other video programs.

2) The Logitech Quickcam Pro for Notebooks (2007 version) camera isn't very
useful on a USB 1.1 bus. The highest resolutions offered are about 176x144
uncompressed and 800x600 MJPEG compressed. Suggestions are welcome, since I
would like to be able to capture still images of higher resolution,
preferably uncompressed.

Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year

More information about the support mailing list