LinHES Forums http://forum.linhes.org/ |
|
How to add DVB support into KnoppMyth R4V3 and V4 http://forum.linhes.org/viewtopic.php?f=6&t=1357 |
Page 1 of 6 |
Author: | nigelpearson [ Mon May 03, 2004 2:27 am ] |
Post subject: | How to add DVB support into KnoppMyth R4V3 and V4 |
0. Plug a DVB card into your PC. I have used an AVerTV DVB-T, and a Twinhan VisionPlus DVB-T 1. Install KnoppMythR4V3 or V4 Some commands need to be done as root. Instead of logging as root, use the sudo command. To allow sudo access, though, you need to be root for a while: Code: su visudo [add a line for your username, like nigel ALL=(ALL) ALL] exit 2. Install DVB drivers ** Option 1: Keep 2.4 kernel, compile and load DVB modules The DVB kernel drivers need the kernel source code before they will compile. Code: cd /usr/src sudo bzcat linux-2.4.25-chw.tar.bz2 | tar -xvf - cp linux/.config linux-2.4.25-chw [type y] sudo rm linux ln -s linux-2.4.25-chw linux cd linux-2.4.25-chw make oldconfig dep Now, on KnoppMythR4V3, there is one error that needs correcting: Code: sudo rm /lib/modules/2.4.25-chw/build sudo ln -sf /usr/src/linux-2.4.25-chw /lib/modules/2.4.25-chw/build Get a tarball of the DVB drivers, and if necessary, the firmware for your card: Code: linuxtv-dvb-1.1.0.tar.bz2 linuxtv-dvb-apps-1.1.0.tar.bz2 sc_main.mc Start with the drivers: Code: bzcat linuxtv-dvb-1.1.0.tar.bz2 | tar -xvf - cd linuxtv-dvb-1.1.0/build-2.4 make Assuming this builds cleanly (in my case it did, but output an error about not having firmware for an av7110), you can try loading the modules: Code: sudo ./insmod.sh load In my case, there were errors from four modules (probably because the devices that are trying to talk to are not plugged into my computer), but the other fifteen or so did load. The lsmod command will list them, and the dmesg command may list extra information. However, this script does not load all of the modules that were compiled, and in my case, didn't load the one for my AverTV DVB-T card, so I had to: Code: sudo ./insmod.sh unload sudo rmmod evdev sudo rmmod input sudo mkdir /usr/lib/hotplug/firmware sudo cp sc_main.mc /usr/lib/hotplug/firmware sudo insmod dvb-core.o sudo insmod bt878.o sudo insmod dvb-bt8xx.o sudo insmod sp887x.o Once you are satisfied that the drivers can talk to your card, you can install them: Code: sudo make install Note that with linuxtv-dvb-1.1.1, you will also need to do: Code: cd .. sudo ./MAKEDEV-DVB.sh This creates the directory /dev/dvb/adapter0 containing some device nodes, which the device drivers use as their interface to DVB client software like MythTV. ** Option 2: Manually upgrade to a 2.6 kernel (which already contains DVB drivers) Get a tarball of a 2.6 kernel (e.g. linux-2.6.3.tar.bz2) Code: cd /usr/src bzcat linux-2.6.3.tar.bz2 | tar -xvf - Copy config from current kernel: Code: cp linux/.config linux-2.6.3/.config sudo rm linux ln -s linux-2.6.3.tar.bz2 linux cd linux Use as basis for new kernel: Code: make oldconfig make menuconfig (be sure to turn on DVB support - both the core and drivers for your card) Code: make bzImage modules sudo make install modules_install Get new version of module tools, copy somewhere Code: bzcat module-init-tools-3.0.tar.bz2 | tar -xvf - cd module-init-tools-3.0 ./configure --prefix=/ sudo make moveold make sudo make install sudo ./generate-modprobe.conf /etc/modprobe.conf Change /proc/ksyms to /proc/kallsyms in these files?: /etc/init.d/modutils /etc/init.d/nfs-common Code: sudo vi /etc/lilo.conf [add a new "image" section for your new kernel, and add a line "prompt" somewhere before the sections] sudo /sbin/lilo [watch carefully for errors] sudo reboot ; exit (select your newly built kernel in LILO, and then watch the boot continue?) After reboot (if your DVB driver was built as a module): Code: sudo modprobe dvb-bt8xx sudo modprobe sp887x [or dst for the VisionPlus] should load the drivers (lsmod and dmesg will tell you what did and didn't work). Note that the first module is used to talk to the card, and the second is for the frontend (the little tin can that actually does the tuning). Many DVB cards are like this. If your card and driver needs firmware, you might need to do something like: Code: sudo mkdir /usr/lib/hotplug/firmware sudo cp sc_main.mc /usr/lib/hotplug/firmware and reboot ** Option 3: Automatically upgrade to a 2.6 kernel You need to be networked for this (I wasn't, which is why I documented the other two options first). There are some kernels that you can get from the Debian upgrade servers which _may_ support DVB devices. I have not been able to successfully download these yet, so they may not work, but this is how to do it. Code: sudo vi /etc/apt/sources.list [enable the sites to download testing packages] sudo apt-get update sudo apt-get install kernel-image-2.6-686 3. [optional] Test the card To test the card, we need the dvb-apps. Copy a tarball somewhere, then: Code: bzcat linuxtv-dvb-apps-1.1.0.tar.bz2 | tar -xvf - cd linuxtv-dvb-apps-1.1.0 make util/scan/scan util/scan/dvb-t/au-sydney_north_shore If it finds any channels, it is probably working ![]() 4. [if DVB drivers built as modules] Add modules to startup Code: sudo vi /etc/modules [add two lines; dvb-bt8xx sp887x for an AverMedia, or dvb-bt8xx dst for a VisionPlus] 5. Add DVB to MythTV. Running mythtv-setup and adding a DVB card helpfully says "Recompile with DVB-Support" Untar the mythtv src tarball that cesman has so usefully included: Code: bzcat /usr/src/r4v3_src/mythtv-0.14/src/mythtv-0.14.tar.bz2 | tar -xvf - cd mythtv-0.14 or, on R4V4: Code: sudo bzcat /usr/src/r4v4_src/mythtv-0.15/src/mythtv-0.15.1.tar.bz2 | tar -xvf - cd mythtv-0.15.1 Code: vi settings.pro [Change PREFIX to /usr, find the DVB section, uncomment the CONFIG, DEFINES & INCLUDEPATH lines, and change the INCLUDEPATH there to /usr/include] export QTDIR=/usr/share/qt3 ./configure qmake mythtv.pro make cd libs/libmythtv sudo make install After that, MythTV knows about DVB cards. mythtv-setup should list info about the DVB card you have added, and after it exits should say: 2004-03-05 10:13:42 DVB#0 StatusMonitor Starting __________________________________________________________________________________ Note: errors in the DVB stream will cause problems in mythtv, so make sure your signal is good and strong. The backend will eventually crash when viewing a bad DVB stream. This patch (from Kenneth) should stop these crashes: Code: Index: transform.c
=================================================================== RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/dvbdev/transform.c,v retrieving revision 1.7 diff -u -r1.7 transform.c --- transform.c 1 Jan 2004 19:07:34 -0000 1.7 +++ transform.c 9 Jul 2004 06:28:31 -0000 @@ -2121,7 +2121,7 @@ p->count += rest; // fprintf(stderr,"count: %d \n",p->count); send_ipack(p); - if (count - rest > 0) + if (rest > 0 && count - rest > 0) write_ipack(p, data+rest, count-rest); } } |
Author: | red3211 [ Sat May 08, 2004 1:56 pm ] |
Post subject: | |
![]() Nigel; thought I would reply incase you thought all your hardwork had gone unnnoticed. I had previously tried and failed both the approaches you describe, and it was great (but frustrating) to see from your how to why it haddnt worked for me. Your HOW-To made it clear where I had gone wrong; 2.4 ) The need to change the link to the build directory to build the drivers 2.6) I didnt know how to "make" the mythtv source (hadnt come across qmake), so had to go for a standard apt-get mythtv install. That got me a a working 2.6 install, but tried your 2.4 procedure for intrest and it worked for me ! I have a twinhan card, so I needed dvb-bt8xx.o and dst.o Thanks for writing up what you did. ![]() |
Author: | DaSurpha [ Sun May 09, 2004 3:10 pm ] |
Post subject: | |
Thanks for the great guide! I'm trying to install Technotrend DVB-C, but the module building fails. sudo ./insmod.sh debug gives the following message: "./dvb-ttpci.o: unresolved symbol crc32_le" Holger @ linuxtv.org commented to a similar problem followingly: "hmmm, look as if your kernel config in /usr/src/linux/.config does not matches the running kernel." I'm total newbie with linux, but sounds like a dead end here. Any insight? Gotta try 2.6 tomorrow... |
Author: | cesman [ Sun May 09, 2004 3:53 pm ] |
Post subject: | |
Perhaps copying config-2.4.25-chw in /boot to /usr/src/linux/.config... |
Author: | DaSurpha [ Mon May 10, 2004 12:39 am ] |
Post subject: | |
Thanks, I'll try that tonite! |
Author: | nigelpearson [ Mon May 10, 2004 12:49 am ] |
Post subject: | |
I didn't get any errors relating to crc32_le, but you may be trying to compile a different version of the DVB drivers (I tried 1.1.0 and 1.1.1). The .config that cesman refers to has this line near the end: CONFIG_CRC32=m which says the kernel was built with this code as a module. If you look at your install, /lib/modules/2.4.25-chw/kernel/lib contains crc32.o, so that does in fact match reality. I suspect this is a problem in the DVB Makefiles. It is trying to pull that crc code in from a library instead of a loaded kernel module. You said the module building fails. What was the actual error? |
Author: | DaSurpha [ Mon May 10, 2004 4:28 am ] |
Post subject: | |
I tried both 1.1.0 and 1.1.1, same problem occured with both. I had the corresponding firmware file from linuxtv.org in /build_2.4 -subfolder, other than that I've followed the instructions to the letter. Edit: I'd guess, that you probably did not get the error message while loading, the firmware was not in the subfolder, and thus the building of dvb-ttpci fails alltogether. I was unclear, module building does not fail, the module just fails to load with the mentioned error message. Drivers for some other cards load/unload without a problem. I have also the CI-module+Conax CAM in my HTPC, if that matters (I doubt it does). |
Author: | DaSurpha [ Mon May 10, 2004 11:33 am ] |
Post subject: | |
(empty post) |
Author: | DaSurpha [ Mon May 10, 2004 12:51 pm ] |
Post subject: | |
I decided to give a shot to the Metzlerbros driver (http://www.metzlerbros.org/dvb/), and make doesn't give any error messages, and the modules are loaded! I just hope I added the right modules to /etc/modules (ttpci-eeprom saa7146_vv saa7146 dvb-core video-buf v412-common v411-compat videodev) but I think I'll find out after I have finished recompiling MythTV. Edit: No luck... |
Author: | nigelpearson [ Mon May 10, 2004 8:54 pm ] |
Post subject: | |
OK. If modules complain at load time, I think it is because their source code does not list the dependency on the module. You could try "modprobe crc32" before loading the ttpci module to see if that resolves the mossing symbol. |
Author: | DaSurpha [ Mon May 10, 2004 10:26 pm ] |
Post subject: | |
nigelpearson wrote: You could try "modprobe crc32" before loading the ttpci module to see if that resolves the mossing symbol.
Yes! This did the trick! ![]() One step forward... After adding DVB support to MythTV the card is not visible in mythtv-setup. Lsmod lists the corresponding module loaded - though (unused). |
Author: | nigelpearson [ Tue May 11, 2004 6:13 am ] |
Post subject: | |
If lsmod and dmesg show that the modules loaded OK, then try compiling linuxtv-dvb-apps and running the scan utility. If it can open and use the DVB drivers (i.e. if it finds channels), then a DVB-enabled libmythtv library should find the card, too. A thought - does the directory /dev/dvb/adapter0 exist? If not, you forgot to do a "make install" in the DVB drivers directory (as a last step, it makes those device directories) P.S. You mentioned the lists of modules in /etc/modules. I think your list is a little bit long! Loading ttpci-eeprom will also load the modules that it depends on (in my case, loading sp887x also loads dvb-core, which I think loads bttv, loading dvb-bt8xx loads bt878, which in turn loads dvb-core, et cetera). |
Author: | DaSurpha [ Tue May 11, 2004 8:45 am ] |
Post subject: | |
nigelpearson wrote: If lsmod and dmesg show that the modules loaded OK, then try compiling linuxtv-dvb-apps and running the scan utility. If it can open and use the DVB drivers (i.e. if it finds channels), then a DVB-enabled libmythtv library should find the card, too.
A thought - does the directory /dev/dvb/adapter0 exist? If not, you forgot to do a "make install" in the DVB drivers directory (as a last step, it makes those device directories) P.S. You mentioned the lists of modules in /etc/modules. I think your list is a little bit long! Loading ttpci-eeprom will also load the modules that it depends on (in my case, loading sp887x also loads dvb-core, which I think loads bttv, loading dvb-bt8xx loads bt878, which in turn loads dvb-core, et cetera). Yes, I noticed now dvb-ttpci loads successfully all the other modules are loaded automatically. I did do "sudo make install" in "/usr/src/linuxtv-dvb-1.1.1/build-2.4", modules are copied to /lib/modules/2.4.24-chw/misc/" but there is no directory dvb under /dev/... Edit: I got /dev/dvb/adapter0 by manually running MAKEDEV-DVB.sh but still no adapter found in mythtv-setup... |
Author: | Camelot [ Tue May 11, 2004 10:26 am ] |
Post subject: | |
Silly question maybe, but if I go for option 2 from where should I download the kernel? linux-2.6.3.tar.bz2? /Regards /Henrik |
Author: | DaSurpha [ Tue May 11, 2004 10:33 am ] |
Post subject: | |
http://www.kernel.org/pub/linux/kernel/v2.6/ |
Page 1 of 6 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |