Linux 2000 Logo Top Right Graphic
DVB Setup on Mandriva 2007
Hack, compile, test...rinse, repeat...

Here's the process I went through to get my DVB-T stick working under Mandriva 2007. Just for completenes, you should note that this is based on starting with a clean, fresh install of Mandriva 2007, followed by application of all the latest patches, including updating to the kernel that was current at the time

  1. Install kernel-source-2.6.17-6mdv - this will almost certainly also work with the 2.6.17-5mdv kernel that you get after a fresh install, but I'd already appplied all the latest patches before I started playing.

  2. Grab a copy of the latest DVB source tarball (v4l-dvb-20060717.tar.gz at the timie of writing) and save this in your home directory.

  3. Create a directory called 'dvb-stuff' and do 'cd dvb-stuff'

  4. Unpack the tarball with the command 'tar -zxvf ../v4l-dvb-20060717.tar.gz' - this will give you a bunch of directories and files under /home/yourusername/dvb-stuff.

  5. Become root with 'su -' and 'cd /usr/src/linux-2.6.17-6mdv'

  6. Do 'make menuconfig'

  7. When you have the kernel config menu appear, press the right-arrow cursor key to highlight the '<exit>' option and press return. Ensure that '<yes>' is highlighted in response to the question 'Do you wish to save your kernel configuration?' and press return.

  8. You should be back at a shell prompt at this point.

  9. Open up 'Makefile' in your favourite text editor, e.g 'vi Makefile'.

  10. Find the line which says 'EXTRAVERSION = -6mdvcustom' and change it to read 'EXTRAVERSION = -6mdv'. Save the amended file. This step avoids the possibility of compiling the DVB kernel modules with a version string which is different to the stock kernel. It probably isn't (if you know much about building your own kernels) the best way to go about this, but it worked for me!

  11. Do a 'make clean', followed by 'make'.

  12. Watch the output from the 'make' command carefully - when you see it get to the point where it says something like 'CC init/main.o', you can press Ctrl-C to break out of the 'make' process. All we've done up to this point is ensured that all of the kernel compile preprocessor macros have been run, giving you a sporting chance of getting the DVB bits to compile properly.

  13. Do 'cd /home/yourusername/dvb-stuff'

  14. Open up './linux/drivers/media/dvb/dvb-core/dvb_net.c' in your text editor and go to line 1140. Change this block of code:
    dvb_net_feed_stop(dev);
            priv->rx_mode = RX_MODE_UNI;
    #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
            spin_lock_bh(&dev->xmit_lock);
    #else
            netif_tx_lock_bh(dev);
    #endif
    
            if (dev->flags & IFF_PROMISC) {
                    dprintk("%s: promiscuous mode\n", dev->name);
    
    so that it looks like this instead:
    dvb_net_feed_stop(dev);
            priv->rx_mode = RX_MODE_UNI;
    /* #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
            spin_lock_bh(&dev->xmit_lock);
    #else */
            netif_tx_lock_bh(dev);
    /* #endif */
    
            if (dev->flags & IFF_PROMISC) {
                    dprintk("%s: promiscuous mode\n", dev->name);
    
    This hack *really* shouldn't be necessary, but I don't understand enough about the way Mandriva build their distro kernels to be able to offer anything other than this 'brute force' solution to the problem. If you don't make this change, the build of the DVB modules fails with an error message which suggests to me that something somewhere has been patched in the kernel source tree, such that trying to compile the 'spin_lock_bh' function fails completely.

  15. Make the exact same change slightly further down the code at line 1169 and save the modified file.

  16. Now do 'make' and wait for the build process to finish. You will probably see the odd warning here and there as the build progresses, but this doesn't appear to cause any problems in the resulting compiled modules.

  17. When the compile has finished, type 'make install' to copy the new modules over to the right place on your system.

  18. Next, you will need a copy of the revision 3 firmware for the Freecom DVB stick. You can download this from here - save this file in /lib/firmware

  19. Now do 'tail -f /var/log/messages'. This monitors the system log file in real time so you can see what's going on. Plug your Freecom DVB stick in. You should see something like this get written to the log:
    kernel: usb 4-6: new high speed USB device using ehci_hcd and address 3
    kernel: usb 4-6: configuration #1 chosen from 1 choice
    kernel: dvb-usb: found a 'WideView WT-220U PenType Receiver (Typhoon/Freecom)'
            in cold state, will try to load a firmware
    kernel: dvb-usb: downloading firmware from file 'dvb-usb-wt220u-fc03.fw'
    kernel: usbcore: registered new driver dvb_usb_dtt200u
    kernel: usb 4-6: USB disconnect, address 3
    kernel: dvb-usb: generic DVB-USB module successfully deinitialized and disconnected.
    kernel: usb 4-6: new high speed USB device using ehci_hcd and address 4
    kernel: usb 4-6: configuration #1 chosen from 1 choice
    kernel: dvb-usb: found a 'WideView WT-220U PenType Receiver (Typhoon/Freecom)' in
            warm state.
    kernel: dvb-usb: will use the device's hardware PID filter (table count: 15).
    kernel: DVB: registering new adapter (WideView WT-220U PenType Receiver (Typhoon/Freecom)).
    kernel: DVB: registering frontend 0 (WideView USB DVB-T)...
    kernel: input: IR-receiver inside an USB DVB receiver as /class/input/input3
    kernel: dvb-usb: schedule remote query interval to 300 msecs.
    kernel: dvb-usb: WideView WT-220U PenType Receiver (Typhoon/Freecom) successfully
            initialized and connected.
    kernel: dvb-usb: recv bulk message failed: -110
    udevd-event[3312]: wait_for_sysfs: waiting for '/sys/devices/pci0000:00/0000:00:1d.7/
            usb4/4-6/4-6:1.1/bus' failed
    kernel: drivers/usb/input/hid-core.c: timeout initializing reports
    kernel: input: Digital TV Receiver Digital TV Receiver as /class/input/input4
    kernel: input: USB HID v1.10 Keyboard [Digital TV Receiver Digital TV Receiver] on
            usb-0000:00:1d.7-6
  20. The next step is to ensure that you have the stuff you need to actually be able to watch TV. For me, I installed the following using urpmi:

    • dvb-apps
    • dvbsnoop
    • dvbstream
    • dvbtune
    • libdvb
    • kaffeine
    • mplayer
    • mplayer-gui
    • mplayer-fonts
    • win32-codecs (from the PLF site, http://easyurpmi.zarb.org/)


  21. Fire up kaffeine and you should get prompted to select your local TV transmitter, after which you can follow through the channel search wizard. Don't know the name of your local TV transmitter? No problem, just click here - enter your UK postcode and the site will tell you which is your nearest transmitter.

Right Side Graphic
Mandrake Linux
Made With Bluefish
Made With WML
W3C XHTML1.0
W3C CSS1 & CSS2

Linux user
#287730

 
Bottom Left Graphic  

I've done my best to ensure that the information given on this site is accurate. If you make any use of this information, however, you do so entirely at your own risk. If you lose your job, your house blows up or your dog dies, it's not my fault, okay? All trademarks and copyrights are owned by their respective companies. Linux is a trademark of Linus Torvalds. HTML coding done using Bluefish-0.7, together with wml-2.0.9 (18-Oct-2002) and graphics by The Gimp.
 
Copyright © 2004 Phil Edwards mailto: webmaster (at) linux2000.com
Last updated Wed Feb 14 17:06:40 2007