[an error occurred while processing this directive] build v4l2 drivers [an error occurred while processing this directive]

build v4l2 drivers

Please check the v4l wiki for most recent informations about video4linux and the drivers. As I don't maintain v4l any more the informations below will bitrot over time. I'll keep them online for now, but at some point in the future the pages will likely disappear.

about this document

This is a mini howto for compiling and installing v4l2 drivers, namely bttv 0.9.x, saa7134 and cx88.

It is not a general introduction into kernel patching and building, if you are looking for this (or if you don't understand what this page is about ...) check out the Kernel Howto.

v4l2 on 2.4.x kernels

You need a patched kernel. Patches for 2.4.26 which already include the drivers are available. They should work fine with newer kernels as well.

I've stopped maintaining the drivers for 2.4 kernels. Current cvs drivers don't build on 2.4 kernels any more. I will keep the old stuff available for download of course, but don't expect any updates. If you have trouble with the 2.4 drivers or very new hardware which isn't supported yet I strongly suggest to update to 2.6 kernels.

v4l2 on 2.6.x kernels

kernel 2.6.x already has everything included. Just enable the config options you need (i2c, video4linux and the actual driver), compile your kernel and you are done.

If you run into trouble you can check if there are updates with fixes in the patch directory.

You can also fetch a snapshot and build that one (they tend to be updated more often than the patchkits). To build and use the current drivers you need 2.6.2 or newer.

building the driver tarballs

This is pretty simple:

mkdir <workdir>
cd <workdir>
tar xzf /path/to/driver-version.tar.gz
cd driver-version
make KDIR=/path/to/kernel/source/tree
make install

Usually the correct path to the kernel source tree is picked automagically, you only need the KDIR argument for make if this doesn't work for some reason.

The driver tarballs install into another path than the kernels driver, so you should take care that really the correct modules get loaded. Make sure you don't mix the kernels and snapshots modules, there might be incompatibilies.

[an error occurred while processing this directive]