Howto:Debian

From IVTV

Jump to: navigation, search

This Howto is aimed at ivtv on a debian system, hopefully any version. For Debian/Etch (act. stable Release) please look at the apt-cache for ivtv. All necessary packages are there ready for installing through apt-get/dselect/aptitude

I recommend that you use the 2.6 kernel, as the drivers and support are moving in that direction, and this howto is specific to 2.6.

Contents

Configure apt

There is now a debian apt repository for the ivtv source, so you can automagically build all required ivtv modules with module-assistant. Choose the appropriate ivtv version for your kernel. See the Main Page for this information (if you do not choose the correct version, you will get errors and be unable to create the kernel module). The rest of these instructions assume you are using ivtv0.4; replace 0.4 with 0.2, 0.6, 0.7, 0.8, 0.9 or 0.10 as needed.

Add the following line to your sources.list:

deb     http://www.hellion.org.uk/debian sid main
deb-src http://www.hellion.org.uk/debian sid main

The package is built with module-assistant so get that and the utils needed for ivtv first:

apt-get update
apt-get install ivtv0.4-utils ivtv0.4-source module-assistant debian-builder
  • You may get the following error after the update: The following signatures couldn't be verified because the public key is not available. This will fix the error message:
wget http://www.hellion.org.uk/public_key.asc
apt-key add public_key.asc
  • If you compiled your own kernel, make sure you enable CONFIG_FW_LOADER, which you can find under Device Drivers -> Generic Driver Options -> Hotplug firmware loading support (required for the ivtv-make-fwpkg utility, and cx25840 cards).
  • It should be noted that ivtv0.4-utils and ivtv0.4-source in the apt-get install command should be modified to the correct ivtv version. For instance for ivtv0.8 you should install ivtv0.8-utils and ivtv0.8-source.

Module assistant

If you didn't compile your own kernel you'll first need to get the kernel headers for module assistant to work:

module-assistant prepare

module-assistant bug

There might be a bug in the current kernel header packages, where building external modules puts the module in the wrong location. This is only a problem with older module-assistant packages; look here to see if it applies to you.

If you need to work around this problem:

  • Overwrite the symlink /usr/src/{linux|kernel}-headers-`uname -r`/Makefile with the actual file (older kernels use kernel-headers, newer versions use linux-headers, use the correct version accordingly). Assuming you are running 2.6.12:
cp -f /usr/src/linux-headers-2.6.12/Makefile \
  /usr/src/linux-headers-`uname -r`/Makefile
  • Edit /usr/src/{linux|kernel}-headers-`uname -r`/Makefile, and edit the EXTRAVERSION information with your actual extraversion (eg: EXTRAVERSION = -2-686)

build the module

Let module-assistant take care of building and installing the modules for you:

module-assistant auto-install ivtv0.4

This will build a .deb file ivtv0.4-modules-`uname -r`_version, and install it. If you just want to build the deb (without installing it), run:

module-assistant auto-build ivtv0.4

If you want you can build modules for both stable and old stable branches, so you've always got a usable package to fall back on if one breaks. Make sure you only install one version at a time, and that the one you install is appropriate for your kernel version!

Module options

In almost all cases now you won't need any module options. In the rare case that you do, keep all ivtv related options together in a file:

/etc/modprobe.d/ivtv

The final step is to get the firmware. The utils packages contains a util called ivtv-make-fwpkg which will make a .deb package of the firmware. To use this, you must first install the devtools package. Then download the latest .zip or .exe that is appropriate for your ivtv version from here. Then:

ivtv-make-fwpkg <the file you downloaded>

You should now see a new .deb file such as "ivtv-firmware_1.18.21.22254_all.deb". Install this:

dpkg -i ivtv-firmware_1.18.21.22254_all.deb

More information about firmware can be found here. If you need further documentation on ivtv-make-fwpkg, see /usr/share/doc/ivtv0.4-utils/README.Debian.

Comment (PVR-150 or PVR-500): After extracting the firmware, I tested the software using "cat /dev/video0 | xine stdin://mpeg2 &". I got a perfect picture but no audio. Also "ivtv-ctrl -Y" showed Mute=1 all the time, no matter what was tried. After looking at logs, I notice "v4l-cx25840.fw" firmware was not loaded or found. Going to the /lib/firmware directory there was indeed, no "v4l-cx25840.fw" file present. To remedy this I extracted a copy of the "HcwMakoA.ROM" firmware file (you can get this directly off of the Hauppauge CD), renamed it to "v4l-cx25840.fw", and copied it (as root) to the /lib/firmware directory on my system. (Note: this is where the firmware was installed following the above direction). Shut down the system for >30 secs and restarted. The test above was rerun and I had both a picture and sound. Note: Make sure your audio output is 0 (tuner 1), to do this - ivtv-ctrl -p 0. I could also use kmplayer to see and hear TV, but not using their TV configuration. I had to select "Source->Open pipe" and entered "cat /dev/video0"

To load the modules, it should now just be a matter of:

depmod -a
modprobe ivtv

Check /var/log/kern.log for errors. If all is well, there will now be a /dev/video0 which is your video output device. Once everything is working correctly, you may want to put the word ivtv on a new line in /etc/modules, so ivtv will automatically load on boot.

Ivtv includes some utilities like ivtvctl for controlling the card and setting inputs, which is included in the utils package. If you want to test the tuner, you can use ivtv-tune. These are also included in the utils package. You will need perl-tk to run ptune-ui (apt-get install perl-tk).

Comment: did this a gazzilion times. "firmware failed to load" in syslog. in /etc/hotplug/firmware.agent there is some stuff for dir /lib/firmware. so.... i mkdir /lib/firmware and put firmware in there. works now.

You also have to take care about the correct firmware-filenames. The different versions of ivtv use different names for loading. 0.4.1 for example uses files with the ".fw" ending. The firmware.zip only contains ".rom" files. For me the only way to get it to work was changing these filenames into the correct ones mentioned in the syslog. For a closer look at the names see the Firmware-Sektion

Personal tools
development