Talk:How to Obtain, Build and Install V4L-DVB Device Drivers
I am a linux end user and have been using linux for some years now.
However with all consideration given to all the statements, procedures and words written on the title page, I believe the heading should read instead:- "This page contains information to help developers, programmers and hardware experts install these device drivers in a GNU/Linux system. " "If you are an "end user" you must understand the following in the yellow box"
Also the yellow box titled "Note: This article assumes that:"
should include the dot points:-
You are familiar with linux programming You know what you are doing when compiling a program You are aware that different distrubitions have their own idiosynchronies You know what to do when the compile doesnt work You are fully aware what git,hg,kernel tree,build,source,compile,patch,sendmail mean and how to use them
PLEASE NOTE I'm not being smart. My wife and 16yo son are linux endusers, we also like our TV on the PCs do you really think that I could direct them to this page so that they can install their own DVB card? and what on earth would they know about setting up sendmail correctly to submit a patch?????
What about this statement :-
"Note: If you are having build failures like "implicit declaration of function 'mfd_get_data'" try editing v4l/Makefile.media, and just comment out anything related to CONFIG_*_TIMBERALE. [Source] "
Ok I'll comment it out, but first where do I find it???
So basically one has to know programming pretty well to understand what to do according to this page.
Please you guys get real, this page is not for an "end user."
I fully appreciate and respect the hard work, effort, skill and your own time spent on these projects, but is it possible to have something in plain language about how to install the software, and what to do when something goes wrong.
Comment April 23/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.
I get a bunch of conflicts when I tried to do this. I run a custom 2.6 kernel, built from 2.6.18.
I don't understand how the V4L tree jibes with the drivers from the kernel source. I suspect that if you are going to install drivers from a V4L tree, you should *not* configure the modules in the kernel tree (which modules should you not configure?).
There seems to be a big gap in the howtos, between those for newbies who have never set up any dvb card for linux, and those intended for developers.
Mrdemeanour 16:46, 17 October 2006 (CEST)
Apr 2007:
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?
root@1[v4l-dvb]# make make -C /usr/local/src/v4l-dvb/v4l make[1]: Entering directory `/usr/local/src/v4l-dvb/v4l' scripts/make_makefile.pl No version yet. Updating/Creating .config File not found: /lib/modules/2.6.15-27-desktop64-smp/build/.config at ./scripts/make_kconfig.pl line 30. make[1]: Leaving directory `/usr/local/src/v4l-dvb/v4l' make[1]: Entering directory `/usr/local/src/v4l-dvb/v4l' Updating/Creating .config File not found: /lib/modules/2.6.15-27-desktop64-smp/build/.config at ./scripts/make_kconfig.pl line 30. make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'. Stop. make[1]: Leaving directory `/usr/local/src/v4l-dvb/v4l' make: *** [all] Error 2
or do I move my sources?
- First, try this step
cd /var/v4l-dvb (or wherever you put the download)
make distclean
make clean
- Another reason for this issue is because your symbolic link for /lib/modules/<kernel-version>/build is broken. Before running make, remove the link and create a new pointing to the right location.
- For your example above,
rm /lib/modules/2.6.15-27-desktop64-smp/build
ln -s /usr/src/kernels/2.6.15-27-desktop64-smp/build /lib/modules/2.6.15-27-desktop64-smp/build
- and then, the remaining steps should work fine.
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:
cd /usr/src sudo rm linux sudo ln -s /usr/src/linux-source-`uname -r` linux
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:
cd /lib/modules/`uname -r` sudo rm build sudo ln -s /usr/src/linux-headers-`uname -r` build
Now you can go to your v4l source directory that you downloaded using hg, and do a
rm v4l/.version make
and all should be good with the world. This was a supreme PITA, so I am hopeful that this will save somebody their sanity.
If you are having problems with a module not compiling, and it is not important to you, do a
find . -name my_bad_module_name.c -print
Then go to the directory that contains it. You will find a Makefile. Edit it and put a # at the start of the line that has the module name.
May 2007:
Kernel 2.6.17 Compilation Errors
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.
Jan 2008 comments:
Compilation for 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.)
Mar 2008 Comments:
I need help! I'm getting the issue as stated at the bottom of the page (more errata was it?). I can follow the instructions given but I dont have all of the paths/folders as described and dont know enough to help myself.
I the v4l-dvb package is in my home directory. I get the message saying "file not found: /lib/modules/2.6.22-14-server/build/.config" I dont have a folder called "build" at this path (or anywhere else I can see) so dont expect the symbolic link instructions pasted below to work.
What information can I give so that you can help me? I'm using ubuntu server 7.10.
- "If you see the issue above, it is because your symbolic link for /lib/modules/<kernel-version>/build is broken. Before running make, remove the link and create a new pointing to the right location.
- For your example above,
rm /lib/modules/2.6.15-27-desktop64-smp/build
ln -s /usr/src/kernels/2.6.15-27-desktop64-smp/build /lib/modules/2.6.15-27-desktop64-smp/build"