Check kernel version

First of all, you need a quite recent kernel.
The v4l-dvb tree is backwards compatible with recent vanilla kernels.
Kernel version 2.6.10 or later is required to build the dvb modules, and version 2.6.12 or later is required to build support for hybrid devices.
If you configured the kernel manually, please note that some capabilities should be enabled like EVDEV.
Stock kernels usually have everything required.
You also need to install the kernel-source package to have kernel headers.

Install Mercurial

V4L and DVB kernel modules are available via Mercurial.

To acquire the latest sources, you must first have mercurial installed (which requires python 2.3).
Some Linux distributions already include it. In Debian, just do "apt-get install mercurial".

Load and Unload the modules

To remove (rmmod) all modules at once from the running kernel (in memory):

make unload

To insert (insmod) all modules at once into the running kernel, without the need to install them:

make load

To perform the two commands above in a single step:

make reload

Usually correctly installed modules will show some info in dmesg, errors will appear in dmesg also.

Errata - Compilation

If compilation fails on v4l-dvb/v4l/dvb_net.c with errors (kernel 2.6.17):

error: 'struct net_device' has no member named 'xmit_lock'

Then edit the v4l-dvb/v4l/dvb_net.c file, go to the error lines and replace this text:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)

by this one:

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)

The compilation should now continue.

At this point, check to see if your device is working. Usually, the make install will install the modules in the kernel module folder, which will autoload the drivers on boot. I ran the below commands and it locked up my box and caused problems. For example, do...

If this comes back with your card name to something other than "UNKNOWN", then you on on the right track and do not have to do what is listed below.

Errata - Compilation - Kernels before 2.6.22

On old kernels (2.6.22 and older) there is a set of device drivers which will not compile as they require later kernel for the devices to be supported, and this will result in compilation errors. These can be fixed by disabling the compilation of unneeded (ones that require newer kernel) modules

make allmodconfig

Still it seems that for kernels older than 2.6.20 the compatibility may have been broken. ( If you figure out a way to compile on 2.6.17 put it here. I updated my kernel to 2.6.20 after trying a while)

Errata - Loading Modules

After running the "make install" command, you might end up with *.ko files and their older compressed version *.ko.gz in the same directory. In this case, the modprobe command might fail (example with the saa7134 module):

All conflicting *.ko.gz files must be removed. The following command line can help you locate these conflicting files in all your installed kernels:

for file in `find /lib/modules -name "*.ko"`; do if -e $file.gz ; then echo "$file.gz should be removed"; fi; done

Usually all conflicting module files resulting of v4l-dvb installation will be located in:

/lib/modules/[your kernel version]/kernel/drivers/media

Once the conflicting *.ko.gz have been moved elsewhere or renamed (to *.ko.gz.disabled for example), use the v4l-dvb reload command (I usually add a depmod for safety in order to rebuild modules dependencies):

make reload
depmod -a

Your modules should now be loaded correctly.

More Errata

Comment April 06
A kernel 2.6.12 wouldn't build the modules but 2.6.16 worked well.
I would suggest cd /usr/src/linux before retrieving the mercurial patches - the scripts couldn't find the kernel headers otherwise.

After following the steps above and getting down all needed sources I get the following output does this mean this driver does support 64bit kernels?

Note: On Ubuntu 8.04 (Hardy Heron), installation had the same error as above but was solved somewhat differently.
First you must install the linux-headers and the linux kernel source. To do so, type the following (and those are back ticks, not single quotes, people!)

sudo apt-get install linux-headers-`uname -r` linux-source

You'll notice that the source code is installed as a tar file in the /usr/src directory. This is not particularly useful. Let's untar it, do so by typing:

sudo tar xjf /usr/src/linux-source-`uname -r`.tar.bz2 -C /usr/src

And then create a symbolic link to the source (if there isn't already one) by typing:

Finally, let's make sure we have the /lib/modules/`uname -r`/build directory pointing to THE HEADERS... NOT THE KERNEL SOURCE. This is the million dollar hurdle, and it bears repeating. The /lib/modules/<your kernel version>/build should point to the correct linux-headers, not the source code of the kernel. (Yes, weird, I know)
Type: