Moderator Control Panel ]

TBS6982 Full Install Guide Ubuntu 15.04

TBS6982 Full Install Guide Ubuntu 15.04

Postby WalstonTempest » Sat Sep 12, 2015 9:32 am

This guide will show you how to deal with building the tbs6982 dual tuner linux drivers, creating a .deb package and then using apt/dpkg to install it to your system. Using a .deb package is desirable for Ubuntu as then it can also be uninstalled easily too. The guide will also cover what to do when a kernel upgrade happens and the drivers stop working as a result.

I am not a linux expert but have adapted the Ubuntu How To Compile guide and the instructions given by http://www.havetheknowhow.com/Configure-the-server/Install-Tuner.html plus info from the mess of readme's contained in the driver package (helpfully the 6982 has no specific readme!). Simply copy and paste the code lines below into the terminal and run for success. I think this guide should work for any of the drivers contained in the same driver zip. I am not sure why tbs requires you to choose your specific card from the list as there seems to be a common package for all of them? This guide has many steps, but I have included everything so that new linux users should have no problems.


First off we need to prep our system for building packages.

Code: Select All Code
sudo apt-get install build-essential checkinstall unzip linux-generic linux-headers-generic linux-source


You should then create a common directory for yourself where you'll be building these packages. Ubuntu recommend creating the directory /usr/local/src for compiling tasks.

Code: Select All Code
sudo mkdir /usr/local/src


Make sure this directory is writable by your primary user account.

Code: Select All Code
sudo chown YOURUSERNAME /usr/local/src


And to ensure you have the correct permissions.

Code: Select All Code
sudo chmod u+rwx /usr/local/src


Now go to that directory.

Code: Select All Code
cd /usr/local/src


Now download the driver (When a new driver gets released the following line will need to be changed to the new driver).

Code: Select All Code
wget http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_v150728.zip


Create a directory for unzipping the download to.

Code: Select All Code
mkdir tbs150728


And unzip it to the directory we just created.

Code: Select All Code
unzip tbs-linux-drivers_v150728.zip -d tbs150728


And go to the directory.

Code: Select All Code
cd tbs150728


Please note that the permissions of the unzipped files won't be the same as we set earlier. Each time you unpack a compressed file they would need to be re-established, as I am not going to do this several of the following commands will require sudo to work.

Although firmware is considered optional in all the readme files, in theory the ones supplied by tbs should be best suited to the drivers. As this guide is tentatively for other cards that use this driver package copy all the firmware files to the correct location. You may omit this step if you choose.

Code: Select All Code
sudo cp -i *.fw /lib/firmware


You will be asked if you wish to overwrite two of them, you will be asked if you wish to overwrite all of them when repeating this step after this. Please note this step will need to be repeated when a system update of the 'linux-firmware' package happens. I will explain this further down the page when I cover reinstalling.

Unpack the driver package.

Code: Select All Code
sudo tar xjvf linux-tbs-drivers.tar.bz2


Go to driver package directory.

Code: Select All Code
cd linux-tbs-drivers


When building most packages the command to use at this point would be ./configure, however in this case you need to run one of three potential choices, depending on your system. As this guide is for Ubuntu 15.04 the choice is really between two of these, because 15.04 uses a 3.x kernel.

Code: Select All Code
uname -a


For x86 kernel 3.x

Code: Select All Code
sudo ./v4l/tbs-x86_r3.sh


OR

For x86_64 kernel.

Code: Select All Code
sudo ./v4l/tbs-x86_64.sh


It will report back to you that the driver is configured for your previous choice. I have a x86_64 machine so from now on all the commands will reflect this. Now we can build and install the driver.

Code: Select All Code
sudo make


This process will take a while, make yourself a well earned beverage of your choice. Once completed instead of 'make install' we do.

Code: Select All Code
sudo checkinstall


The first time you build the driver it will complain about no man documentation and ask if generic docs can be created select yes. Then it will ask you to enter a description. I usually put

Code: Select All Code
TBS Linux Drivers


Following this a menu will pop up where you can configure options for the install. I suggest editing the version number. You must start the version number with a numerical value.

Code: Select All Code
150728


When finished let checkinstall continue. Checkinstall will simulate the make install process, bundle all the files up into a .deb for us and try to install it. However as some of the files in our created .deb need to overwrite files from other packages the checkinstall process will error after the creation of our .deb. This means we will have to force dpkg to overwrite those files. The checkinstall process has created a file in the folder we are in called linux-tbs_150728-1_amd64.deb.

Code: Select All Code
sudo dpkg -i --force-overwrite linux-tbs_150728-1_amd64.deb


That completes the install, you can now reboot your computer and should have a working card!


When a system upgrade of the firmware package or the kernel happens these drivers need to be rebuilt. The system update will probably fail, moaning that files belonging to our tbs package need to be overwritten. It is simplest to remove our package.

Code: Select All Code
sudo apt-get purge linux-tbs


Then complete your system update. After this make sure you are in the correct directory.

Code: Select All Code
cd /usr/local/src/tbs150728/linux-tbs-drivers


Remove our created package.

Code: Select All Code
sudo rm linux-tbs_150728-1_amd64.deb


And then reset the driver build.

Code: Select All Code
sudo make distclean


Now return to the step above where we chose our architecture and repeat the rest of the steps again.


That concludes my guide, good luck to you all. If you have any improvements or spot any mistakes please point them out. I believe that checkinstall can pass arguments to dpkg, but I have not mastered this yet. Also dkms, which you might be aware of if you have an nvidia graphics card, could potentially handle automatic rebuilding of a driver when the kernel is updated. At this point this is beyond my skill level.
WalstonTempest
 
Posts: 5
Joined: Mon Aug 31, 2015 1:02 am

Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest