How to Obtain, Build and Install V4L-DVB Device Drivers: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
m (typo: changed video4linx to video4linux)
 
(Include information about using merge-trees.sh script to include latest frontend code from dvb-kernel & more updated info.)
Line 21: Line 21:
2) Follow your normal procedure for recompiling and installing your kernel if you changed anything with menuconfig in step 1.
2) Follow your normal procedure for recompiling and installing your kernel if you changed anything with menuconfig in step 1.


3) Check out the CVS files following the instructions at linuxtv.org [Repeated here].
3a) Check out video4linux CVS files following the instructions at linuxtv.org [Repeated here].
cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/video4linux login
cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/video4linux login
cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/video4linux co video4linux
cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/video4linux co video4linux
3b) (optional) If you would like to include latest DVB frontend module support within your build, check out dvb-kernel CVS files following the instructions at linuxtv.org [Repeated here]. If you choose to complete this step, you will also have to complete step 4b as well.
You can later update your sources by running:
cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv login
cvs -z3 -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv co -P dvb-kernel
3c) (optional) You can later update your sources by running:
cvs -z3 up -dP
cvs -z3 up -dP


4) As root in the video4linux directory from CVS do:
4a) Change into the video4linux directory:
cd video4linux
4b) If you followed step 3b above for DVB frontends to be built, then you will need to patch the Makefile and symlink the frontend code using the merge-trees script. The script does everything you need in order to merge the required frontend code into the video4linux tree. It assumes that both cvs trees are located in the same directory level, and that it is being called from within /video4linux:
scripts/merge-trees.sh

5) Compile the modules:
make
make


5) After they compile you can make them available to the OS with:
6a) As root, after compiling the modules you can make them available to the OS with:
make install
make install
6b) (optional) If, for any reason, the above doesn't work with your setup, there is another option:
make v4l_install


6) Now you can install the driver you need into the OS. All of them in CVS were built.
7) Now you can install the driver you need into the OS. Each driver from within CVS has been built.


My particular driver needs:
My particular driver needs:
modprobe -v cx8800
modprobe -v cx8800
modprobe -v cx88-dvb
modprobe -v cx88-dvb
The -v option is handy for checking where the driver module actually was found.
The -v option is handy for checking where the driver module actually was found. If your startup scripts are configured correctly, these modules can be set up to load automatically on system boot.

Revision as of 08:19, 23 July 2005

An outline of the procedure used to successfully build the drivers in video4linux CVS. If you want the drivers already working properly in the kernel these are not the instructions to follow.

I did this on linux-2.6.12-gentoo and tested the lgdt3302 driver for a card I own. It should be applicable to the other drivers in CVS as well. CVS is usually only going to work on recent linux kernels.

1) Configure your kernel. If multimedia drivers in addition to those specified here are selected, you may end up loading an old copy of a module compiled by the kernel rather than the new version just compiled from CVS.

Run:

   make menuconfig

in the Linux source directory and set things like this:

   Device Driver --->
       Multimedia Devices --->
           <M> Video for Linux
               Digital Video Broadcasting Devices --->
                   [*] DVB for Linux
                   <M> DVB Core

If you don't need any of the digital drivers do not select DVB Core.

                   < > DVB Core

No other drivers or options should be selected under Multimedia Devices ---> or any lower level.

2) Follow your normal procedure for recompiling and installing your kernel if you changed anything with menuconfig in step 1.

3a) Check out video4linux CVS files following the instructions at linuxtv.org [Repeated here].

   cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/video4linux login
   cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/video4linux co video4linux

3b) (optional) If you would like to include latest DVB frontend module support within your build, check out dvb-kernel CVS files following the instructions at linuxtv.org [Repeated here]. If you choose to complete this step, you will also have to complete step 4b as well.

   cvs -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv login
   cvs -z3 -d :pserver:anonymous@cvs.linuxtv.org:/cvs/linuxtv co -P dvb-kernel

3c) (optional) You can later update your sources by running:

   cvs -z3 up -dP

4a) Change into the video4linux directory:

   cd video4linux

4b) If you followed step 3b above for DVB frontends to be built, then you will need to patch the Makefile and symlink the frontend code using the merge-trees script. The script does everything you need in order to merge the required frontend code into the video4linux tree. It assumes that both cvs trees are located in the same directory level, and that it is being called from within /video4linux:

   scripts/merge-trees.sh

5) Compile the modules:

   make

6a) As root, after compiling the modules you can make them available to the OS with:

   make install

6b) (optional) If, for any reason, the above doesn't work with your setup, there is another option:

   make v4l_install

7) Now you can install the driver you need into the OS. Each driver from within CVS has been built.

My particular driver needs:

   modprobe -v cx8800
   modprobe -v cx88-dvb

The -v option is handy for checking where the driver module actually was found. If your startup scripts are configured correctly, these modules can be set up to load automatically on system boot.