[mythtv-users] TBS6981 DVB-S2 - compile just my drivers not all of them?

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Sep 23 09:25:42 UTC 2013


On Mon, 23 Sep 2013 09:02:43 +0100, you wrote:

>On 22/09/13 10:31, nospam312 wrote:
>> Does anyone know how to compile just the drivers for a single card 
>> instead of compiling for all cards that TBS release?
>>
>> Before the make && make install is there a configuration I can change 
>> to set to my card only to save time compiling?
>
>I would be interested on how you get on.
>I have one of those and never got it to work. More accurately it broke 
>my other cards, it does not play nice with existing hardware.
>Did not get much help from the suppliers and would not have purchased 
>had I known it was close source.
>So it now sits on top of my BE gathering dust.

It is not closed source - just the opposite!  They provide the full
source code for you to compile!  The problem is that they provide what
appears to be a full V4L driver set to compile, so you get all the
drivers for all V4L supported cards.  In my case, that works fine with
my other cards, but you seem to have a situation where the standard
driver for your other card works and the one compiled from their
modified V4L code does not.  So what are the other cards that do not
work with their drivers?

As far as I can tell, their code does not have any options to just
install the drivers for one card.  And there may be supporting
libraries or drivers that are needed to make a card work, not just the
specific drivers for the card.  But you can certainly look at the
source code and find the directory that your particular card's code is
in and see what driver file(s) it compiles to, then just manually copy
them and see if they work.

I have a TBS 5922 DVB-S2 USB tuner and it works well for me with their
drivers, alongside my Hauppauge PVR-500, TeVii S470, two Pinnacle PCTV
nano sticks and an AverMedia AverTV DVB-T Volar.  In fact, their
providing a full V4L is actually beneficial for me as I have a patch
that I need to apply to the V4L code to make some other software work
properly, so I would have needed to compile it anyway from the
standard V4L source.

The first thing to do is to try with their drivers and their standard
install procedure and see if it causes any problems with your other
cards.  The way I did that the first time was to back up my entire
Mythbuntu partition using a Clonezilla Live CD to boot from.  It made
a compressed image copy of the boot partition to another drive.  Then
I rebooted to Mythbuntu and went through the TBS driver install
procedure.  In my case, that worked fine, but if you have problems,
you could then just reboot to Clonezilla Live and restore the old
version of your boot partition.  I have used Clonezilla to backup and
restore a number of times and it has been very reliable for me.

That backup may well be overkill - if you just uninstall and reinstall
your current kernel that should restore the standard drivers.  But a
full backup guarantees that you will be able to get back to exactly
what you had before the TBS driver install.

I am also surprised that TBS did not help with any problems you
encountered, as they have active Linux support forums where they do
seem to help lots of people.

Clonezilla:
  http://clonezilla.org

TBS forums:
  http://www.tbsdtv.com/forum

If you want to try to install just specific drivers from their
compile, follow their install instructions up to the point where you
run make to do the compile, but do not run make install.  Then go to
the linux-tbs-drivers/v4l directory below where you unzipped their
drivers.  That is where the driver *.ko files are compiled to.  Find
the drivers you want for your card (eg mine is tbs5922fe.ko) and copy
them to the right directory for your kernel and Linux version.  For me
with my current kernel, that is:

  /lib/modules/3.2.0-53-generic/kernel/drivers/media/dvb/frontends/

Then reboot or try a modprobe command eg modprobe tbs5922fe and see if
it works - you should get messages in dmesg showing your card starting
up, and a new /dev/dvb device should appear.

Note that you have to recompile and install the TBS drivers every time
you install a new kernel.  It is possible to write a dkms script to
automate that, but I have not bothered as I have another compile and
install I have to do for new kernels as well.  So what I did was to
just write myself a simple script that runs through the TBS install
procedure and I have to remember to run it after each new kernel
install.  I have it in the top level directory where I unzipped the
TBS drivers, and I run it from root.  It should work as an sudo
command too.

build-and-install-TBS5922-drivers.sh:

#!/bin/bash

cp dvb-usb-tbsqbox-id5922.fw /lib/firmware || exit 2

if [ -d "linux-tbs-drivers" ]; then
    rm -r linux-tbs-drivers || exit 3
fi

tar xjf linux-tbs-drivers.tar.bz2 || exit 4

cd linux-tbs-drivers || exit 5
./v4l/tbs-x86_64.sh || exit 6
cd linux || exit 7
#cp -a /root/archives/linux-2.6.38-dvb-mutex.patch . || exit 8
#patch -p1 <linux-2.6.38-dvb-mutex.patch || exit 9
cd .. || exit 10

make -j5 || exit 11

make install


Note that I have a quad core CPU, so I use make -j5 to use all cores
for the make.  The -j parameter should be one more than the number of
cores you have.  I have commented out the two lines that do the patch
I need.  You will need to modify the first cp line to copy the correct
firmware for your card, if any, as documented in their README files.


More information about the mythtv-users mailing list