Howto:ct vdr

From IVTV

Jump to: navigation, search

This Howto is aimed at ivtv0.4 on a "c't vdr" system (debian sarge based).

I've testet with ctvdr3 with kernel 2.6.12-ct-1 (comming from ctvdr4-experimental-repository) and vdr from Tobi's c't vdr Repository.

Contents

Why not using the Debian HowTo

The Debian HowTo does not work for this because apt-get ran in some unresolved version conflicts (Nov' 2005, maybe later version conflicts will be solved).

apt-get install ivtv0.4-utils ivtv0.4-source module-assistant --dry-run

with the result:

The following packages heave unresoled dependances:
 ivtv0.4-utils: depends on: libc6 (>= 2.3.5-1) but 2.3.2.ds1-22 is installed.
                depends on: libgcc1 (>= 1:4.0.1) but 1:3.4.3-13 is installed.
                depends on: libstdc++6 (>= 4.0.2) but ist not installed.
E: damaged packages

Configure apt

First of all you must configure your apt, so you can download the packages.

My /etc/apt/sources.list looks like this:

deb http://ftp.de.debian.org/debian stable main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stable main
deb http://ftp2.de.debian.org/debian/ stable main
deb-src http://ftp2.de.debian.org/debian/ stable main
deb http://security.debian.org/ stable/updates main contrib non-free
deb http://www.heise.de/ct/ftp/projekte/vdr4 experimental/
deb http://www.e-tobi.net/vdr-experimental sarge base backports addons vdr-multipatch
deb-src http://www.e-tobi.net/vdr-experimental sarge base backports addons vdr
deb http://www.e-tobi.net/vdrdevel-experimental sarge base backports addons vdr-multipatch
deb-src http://www.e-tobi.net/vdrdevel-experimental sarge base backports addons vdr

My /etc/apt/preferences like this:

Package: *
Pin: release a=stable
Pin-Priority: 500

Package: *
Pin: release a=sarge,o=debian,v=3.1*
Pin-Priority: 991 

Package: *
Pin: release o=ctvdr4
Pin-Priority: 1300

Package: *
Pin: release o=e-tobi.net
Pin-Priority: 1501

Package: *
Pin: release o=ctvdr
Pin-Priority: 1200

Installation of needed Build Tools

First of all you need the build-essentials for debian:

apt-get install build-essential
apt-get install unzip

Installation of kernel 2.6

Normaly ctvdr only kernel 2.4 is used. In prior versions of ivtv i noticed some problme with kernel 2.4 so using kernel 2.6 seems to be prefered.

Installation of kernel 2.6.12-ct-1 (kernel 2.6 also need module-init-tools):

 apt-get install kernel-image-2.6.12-ct-1 kernel-headers-2.6.12-ct-1 kernel-source-2.6.12-ct-1 module-init-tools

After Installtion of kernel 2.6.12-ct-1 you must add it to boot-options (normaly lilo ist used, but I prefer grub, see grub/lilo help), then reboot computer and start new kernel 2.6.12-ct-1. To get DVB-card work with kernel 2.6 you must copy the firmware-files for the DVB-card in /usr/lib/hotplug/firmware (Specific firmeware for your card can be downloaded from www.linuxtv.org

First of all you must unpack kernels source, wich ist located in /usr/src/kernel-source-2.6.12-ct-1.tar.bz2. After untaring kernel-source, i copy information from /usr/src/kernel-headers-2.6.12-ct-1 to /usr/src/kernel-source-2.6.12-ct-1 (just overwrite everthing double in /usr/src/kernel-source-2.6.12-ct-1. For these operations i use "midnight commander", a norton comander clone (Installation: apt-get install mc).

Then we have to add some symbolic links. First change to /usr/src. Then

ln -s kernel-source-2.6.12-ct-1 kernel-source-2.6.12 
ln -s kernel-source-2.6.12 linux-2.6.12
ln -s kernel-source-2.6.12 linux

After this we change to kernel-source-2.6.12-ct-1 and type

cd /usr/src/kernel-source-2.6.12-ct-1
make oldconfig
make prepare 

(otherwise skripts/basics/fixdep does not exits)

Building and Installing ivtv0.4

Then you have to download ivtv0.4.0 (I used wget: apt-get install wget) and untar it do /usr/src/modules/ivtv-0.4.0. Change to /driver-subdirectory

make clean
(delete files from prior tries)
make 
(some Warnings can be ignored)
make install
(read messages carefully)

After make install you musst check messages form "make install" run and normally after first installtion of ivtv you have to remove some kernel-modules, wich conflicts with ivtv. Normally you have to do this:

mv /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/msp3400.ko /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/msp3400.ko.HIDE
mv /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/tda9887.ko /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/tda9887.ko.HIDE
mv /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/tveeprom.ko /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/tveeprom.ko.HIDE
mv /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/tuner.ko /lib/modules/2.6.12-ct-1/kernel/drivers/media/video/tuner.ko.HIDE

You can check if it's OK thru another "make install" of ivtv. There schould be no errors of conflicting files left.

Files are installed in /lib/modules/2.6.12/ivtv/ Now you have to copy the kernel-modules to /lib/modules/2.6.12-ct-1/misc

cp /lib/modules/2.6.12/ivtv/* /lib/modules/2.6.12-ct-1/misc

Now run depmod

depmod -a

Firmware

The firmware is dynamically loaded every time the driver loads, and needs to be extracted from the windows driver. See firmware.

For the PVR150 you need to extract HcwFalcn.rom and HcwMakoA.ROM out of ftp://ftp.shspvr.com/download/wintv-pvr_150-500/inf/pvr_2.0.24.23035.zip. Then you have to copy them to /lib/modules

cp HcwFalcn.rom /lib/modules/HcwFalcn.rom
cp HcwMakoA.ROM /lib/modules/HcwMakoA.ROM

The Encoder-Firmware for the PVR150 ist the HcwFalcn.rom. For ivtv you can copy or link it to ivtv-fw-enc.bin. Before you do this you must remove old ivtv-fw-files.

mv /lib/modules/ivtv-fw-enc.bin /lib/modules/ivtv-fw-enc.bin.OLD
mv /lib/modules/ivtv-fw-dec.bin /lib/modules/ivtv-fw-dec.bin.OLD
ln -s //lib/modules/HcwFalcn.rom /lib/modules/ivtv-fw-enc.bin

Load the modules

First of all you must add

alias char-major-81-0 ivtv

to your modules.conf. This tells the kernel where to find the first card, if you have more than one card (or a PVR500, which looks like two cards), you will need to add an extra line for each card.

alias char-major-81-x ivtv

For every card you have add a new line, incrementing x by 1 .

To do this you can ad this line to /etc/modules.d/alias. After you have done this you must update your modules.conf. Run

update-modules


If you have and older version of ivtv loaded, you need to remove the modules.

rmmod ivtv cx25840 tuner tveeprom msp3400 wm8775 tda9887 saa7115 saa7127

Once this is done, you should be able to load the module with

modprobe ivtv

Known Problems

see troubleshooting

Links

Personal tools
development