Installation of TBS5980 driver on Vero2!

I am trying to install the newly released opensource driver for the “TBS5980 QBOX CI DVB-S2 TV Tuner USB” on to my Vero2. OSMC updated to latest version.
uname -r
3.10.101-16-osmc

http://www.tbsdtv.com/forum/viewtopic.php?f=86&t=9960

I have done as it says in the FAQ there and installed the required dependencies ->
sudo apt-get install patchutils
sudo apt-get install libproc-processtable-perl
also installed
sudo apt-get install build-essentials
I have also installed the kernel headers with this command according to this post
https://discourse.osmc.tv/t/dvb-sticks-compatibility-for-vero-2/16952/5
sudo apt-get update set -- $(cat /proc/cmdline) && for x in "$@"; do case "$x" in osmcdev=*) sudo apt-get update && sudo apt-get install -y "${x#osmcdev=}-headers-$(uname -r)"; ;; esac; done

I have copied over the firmware “dvb-usb-tbsqbox-id5980.fw” to “/lib/firmware” directory.

When reaching ->
sudo make -j4
I get this failure in the end, look for error “file not found” ->
make -C /home/osmc/tbsdriver/media_build/v4l make[1]: Entering directory '/home/osmc/tbsdriver/media_build/v4l' scripts/make_makefile.pl Updating/Creating .config make[2]: Entering directory '/home/osmc/tbsdriver/media_build/linux' make[2]: Entering directory '/home/osmc/tbsdriver/media_build/linux' Syncing with dir ../../media Syncing with dir ../../media Patches for 3.10.101-16-osmc already applied. make[2]: Leaving directory '/home/osmc/tbsdriver/media_build/linux' Preparing to compile for kernel version 3.10.101 File not found: /lib/modules/3.10.101-16-osmc/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4. make[1]: INTERNAL: Exiting with 1 jobserver tokens (should be 0)! Patches for 3.10.101-16-osmc already applied. make[2]: Leaving directory '/home/osmc/tbsdriver/media_build/linux' Updating/Creating .config make[2]: Entering directory '/home/osmc/tbsdriver/media_build/linux' make[2]: Entering directory '/home/osmc/tbsdriver/media_build/linux' Syncing with dir ../../media Syncing with dir ../../media Patches for 3.10.101-16-osmc already applied. make[2]: Leaving directory '/home/osmc/tbsdriver/media_build/linux' Patches for 3.10.101-16-osmc already applied. make[2]: Leaving directory '/home/osmc/tbsdriver/media_build/linux' ./scripts/make_kconfig.pl /lib/modules/3.10.101-16-osmc/build /lib/modules/3.10.101-16-osmc/build Preparing to compile for kernel version 3.10.101 File not found: /lib/modules/3.10.101-16-osmc/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4. Preparing to compile for kernel version 3.10.101 File not found: /lib/modules/3.10.101-16-osmc/build/.config at ./scripts/make_kconfig.pl line 33, <IN> line 4. make[1]: *** No rule to make target '.config', needed by '.myconfig'. Stop. make[1]: Leaving directory '/home/osmc/tbsdriver/media_build/v4l' Makefile:26: recipe for target 'all' failed make: *** [all] Error 2
If I copy the .config file from /boot to /lib/modules/3.10.101-7/osmc/build/.config and run the make command then I will see something like I do not have full kernel sources installed and further down this message->
V4L2_FLASH_LED_CLASS: Requires at least kernel 3.18.0 IR_NUVOTON: Requires at least kernel 3.12.0 RC_ST: Requires at least kernel 3.15.0 VIDEO_FB_IVTV: Requires at least kernel 3.11.0 DVB_PT3: Requires at least kernel 3.11.0 VIDEO_XILINX: Requires at least kernel 3.17.0 RADIO_SI4713: Requires at least kernel 3.13.0 I2C_SI4713: Requires at least kernel 3.17.0 VIDEO_ADV7604: Requires at least kernel 3.17.0 VIDEO_TC358743: Requires at least kernel 3.17.0 VIDEO_TVP5150: Requires at least kernel 3.17.0 VIDEO_MT9P031: Requires at least kernel 3.17.0 VIDEO_MT9V032: Requires at least kernel 3.19.0 VIDEO_SMIAPP: Requires at least kernel 4.0.0 VIDEO_ADP1653: Requires at least kernel 3.17.0 SOC_CAMERA_OV2640: Requires at least kernel 3.17.0
This means that OSMC kernel on Vero2 is to old?
How do I upgrade to newer kernel on OSMC? Why this old kernel on Vero2?
Then in the linked post Sam says “then you will likely need to symlink the build/ directory to the headers”. How do I do that?

How can I get this tuner working on Vero2? Any help that can push me further would be very appreciated.

I have also tried with ijalves build from here that what I understand for sure should work with ARM
https://github.com/ljalves/linux_media/wiki/Installating

Also tried the proprietary build, but all is pretty much giving me the same problem.
http://www.tbsdtv.com/download/document/common/tbs-linux-sources_v151229.zip

Hi

3.10.101 is quite a recent kernel, although it’s based on 3.10 for stability and because it’s an LTS kernel that the SoC vendor provided us with.

I think TBS drivers can be a nightmare. I can’t find much about this device. What does dmesg show?

Hi,

Thank you for your reply.
dmesg | grep usb
gives me this output ->
[ 0.068768] usbcore: registered new interface driver usbfs [ 0.068834] usbcore: registered new interface driver hub [ 0.068933] usbcore: registered new device driver usb [ 0.781780] usbcore: registered new interface driver smsc95xx [ 0.781967] usbcore: registered new interface driver usb-storage [ 0.784638] usbcore: registered new interface driver usbhid [ 0.784649] usbhid: USB HID core driver [ 0.946528] usb1: type: 1, speed: 0, config: 0, dma: 0, id: 1, phy: fe108820, ctrl: fe080000 [ 0.988296] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 0.988310] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 0.988323] usb usb1: Product: DWC OTG Controller [ 0.988334] usb usb1: Manufacturer: Linux 3.10.101-16-osmc dwc_otg_hcd [ 0.988345] usb usb1: SerialNumber: lm1 [ 0.989145] usb0: type: 0, speed: 0, config: 0, dma: 0, id: 0, phy: fe108800, ctrl: fe040000 [ 1.070771] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 [ 1.070786] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 1.070797] usb usb2: Product: DWC OTG Controller [ 1.070809] usb usb2: Manufacturer: Linux 3.10.101-16-osmc dwc_otg_hcd [ 1.070821] usb usb2: SerialNumber: lm0 [ 1.362733] usb 1-1: new high-speed USB device number 2 using dwc_otg [ 1.564034] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608 [ 1.564050] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0 [ 1.564062] usb 1-1: Product: USB2.0 Hub [ 61.584146] usb 1-1.1: new high-speed USB device number 3 using dwc_otg [ 61.684615] usb 1-1.1: New USB device found, idVendor=734c, idProduct=5980 [ 61.684629] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
or do you want the full long list from only dmesg command?

sudo apt-get install usbutils
lsusb

will help

lsusb
gives ->
Bus 001 Device 003: ID 734c:5980 TBS Technologies China Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Hi

I just had a look and found the driver using the VID/PID. I wanted to see if I could add support to our kernel so that it would stay supported through OSMC updates. We have 3.16’s V4L kernel drivers backported, so despite the 3.10 version, we have reasonable DVB support for popular adapters.

I think I have read about issues with TBS. I know my TBS PCI card was problematic on Linux 3.5 some years ago. The warnings about ‘requires at least kernel’ mean that some devices can’t be built for our kernel. However you don’t need to build (from a quick look) any of the above options. I think you can use make menuconfig to disable these and just select the TBS.

Sam

Hi,

If I use this command->
osmc@osmc:~/tbsdriver/media_build$ make menuconfig
This will give me->
make -C /home/osmc/tbsdriver/media_build/v4l menuconfig make[1]: Entering directory '/home/osmc/tbsdriver/media_build/v4l' make -C /lib/modules/3.10.101-16-osmc/build -f /home/osmc/tbsdriver/media_build/v4l/Makefile.kernel config-targets=1 mixed-targets=0 dot-config=0 SRCDIR=/lib/modules/3.10.101-16-osmc/build v4l-mconf make[2]: Entering directory '/home/osmc/tbsdriver/media_build/v4l' make[2]: *** /lib/modules/3.10.101-16-osmc/build: No such file or directory. Stop. make[2]: Leaving directory '/home/osmc/tbsdriver/media_build/v4l' Makefile:381: recipe for target '/lib/modules/3.10.101-16-osmc/build/scripts/kconfig/mconf' failed make[1]: *** [/lib/modules/3.10.101-16-osmc/build/scripts/kconfig/mconf] Error 2 make[1]: Leaving directory '/home/osmc/tbsdriver/media_build/v4l' Makefile:26: recipe for target 'menuconfig' failed make: *** [menuconfig] Error 2
It is pointing to this directory ->
/lib/modules/3.10.101-16-osmc/build
If have no build directory there?
What can I do/change to fix this?

Just for information, if it helps for maybe a future implementation into OSMC. Think it is a great feature.
I found this thread over at LibreELEC with image of additional DVB cards including TBS.
https://forum.libreelec.tv/thread-130.html

This tuner TBS5980 is really a very handy tuner if you want to watch scrambled channels since it has a CI slot. It is working very good on my laptop with manjaro installed together with TVheadend.

Hi again,

Or did you wanted me to configure the Kernel?

if I do this command->
osmc@osmc:/usr/src/vero2-headers-3.10.101-16-osmc$ sudo make menuconfig
I will get this screen->

What exactly will I disable and where and then just select TBS?
I really appreciate your help and would be really grateful if I can get this working with Vero2.
I really want this working since I have it with me as a portable media center when I am at work for a month at a time together with my portable projector.

If I cannot get this working with my Vero2, then I will have to go back to my RaspberryPi and run LibreELEC instead. That would be a shame since I thought this device I bought directly from you must have the best support.
I believe this is good for OSMC also to have as many tuners as possible working with Vero2.

Kind regards

Hi – we are committed to supporting as much hardware as possible, but it’s not possible to guarantee support for every peripheral. TBS has always been a bit problematic. The fact that there is a separate LE build, i.e., it’s not merged in the normal version of LE confirms this.

I would suggest:

sudo apt-get install git build-essential
git clone GitHub - osmc/osmc: OSMC (Open Source Media Center) is a free and open source media center distribution
cd osmc/package/kernel-osmc
make vero2

Now after a couple of hours you will have a Vero 2 kernel with a working source tree.

Then clone the V4L drivers, run make menuconfig in the V4L directory. You may need to edit the Makefile and edit KSRC: or whichever variable holds the kernel source path.

From a quick glance at the Wiki page you linked me to however, it seems you will need to patch the V4L software to add support for the TBS hardware.

I’m keen to support more DVB hardware. Until I get access to this stick however, I can’t reliably test things. I can’t test hardware that I do not have, but I’m happy to help you try and get it running. I suspect we’ll add support in the future. TBS should really upstream their drivers, or do a better job of them like Sundtek, a DVB manufacturer that approach things well.

Thanks

Sam

Hi Sam,
I did run your suggested commands running over the night.

But as you can see below, it ends with an error
scripts/Makefile.build:308: recipe for target '/mnt/package/kernel-osmc/src/vero2-linux-master/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.o' failed make[2]: *** [/mnt/package/kernel-osmc/src/vero2-linux-master/drivers/net/wireless/rtl8812au/os_dep/linux/ioctl_cfg80211.o] Error 1 make[2]: *** Waiting for unfinished jobs.... Makefile:1238: recipe for target '_module_/mnt/package/kernel-osmc/src/vero2-linux-master/drivers/net/wireless/rtl8812au' failed make[1]: *** [_module_/mnt/package/kernel-osmc/src/vero2-linux-master/drivers/net/wireless/rtl8812au] Error 2 make[1]: Leaving directory '/mnt/package/kernel-osmc/src/vero2-linux-master' Makefile:1041: recipe for target 'modules' failed make: *** [modules] Error 2 Building kernel module failed Makefile:14: recipe for target 'vero2' failed make: *** [vero2] Error 1 make: Leaving directory '/mnt/package/kernel-osmc' Makefile:14: recipe for target 'vero2' failed make: *** [vero2] Error 2
I even tried this also with a full fresh reinstall of the Vero2.
What can I do now?
Thanks

Hi

Don’t checkout master of osmc git, as that’s in flux. Checkout 1fbf4ace9505be53d4485414f3b8fb8f61ba1a98

Hi,

I only did as you said, cloned the git and started building the package? ->

sudo apt-get install git build-essential git clone https://github.com/osmc/osmc cd osmc/package/kernel-osmc sudo make vero2

I am not sure what you want me to do?
How do I checkout 1fbf4ace9505be53d4485414f3b8fb8f61ba1a98

git checkout 1fbf4ace9505be53d4485414f3b8fb8f61ba1a98 (after you cd osmc/package/kernel-osmc).

This may not be a task for someone not familiar with these steps. Unfortunately even after some years the TBS drivers haven’t been upstreamed or really maintained.

Sam

Hi Sam,

I did run another fresh install and new building according to your advice, here is the result, it ends with a error of the wireless drivers->
/mnt/package/kernel-osmc strip: 'drivers/net/wireless/rtl8812au/8812au.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8812au/8812au.ko': No such file or directory build.sh: line 161: pushd: drivers/net/wireless/rtl8192cu: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 164: popd: directory stack empty strip: 'drivers/net/wireless/rtl8192cu/8192cu.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8192cu/8192cu.ko': No such file or directory build.sh: line 172: pushd: drivers/net/wireless/rtl8192du: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 175: popd: directory stack empty strip: 'drivers/net/wireless/rtl8192du/8192du.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8192du/8192du.ko': No such file or directory build.sh: line 183: pushd: drivers/net/wireless/rtl8192eu: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 186: popd: directory stack empty strip: 'drivers/net/wireless/rtl8192eu/8192eu.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8192eu/8192eu.ko': No such file or directory build.sh: line 194: pushd: drivers/net/wireless/mt7610u: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 197: popd: directory stack empty strip: 'drivers/net/wireless/mt7610u/os/linux/mt7610u_sta.ko': No such file cp: cannot stat 'drivers/net/wireless/mt7610u/os/linux/mt7610u_sta.ko': No such file or directory build.sh: line 227: popd: directory stack empty dpkg-deb: building package vero2-image-3.10.102-17-osmc’ in vero2-image-3.10.101-17-osmc.deb'. cp: cannot create directory 'files-headers/usr/src/*-headers-3.10.101-17-osmc/include': No such file or directory dpkg-deb: building package vero2-headers-3.10.102-17-osmc’ in vero2-headers-3.10.101-17-osmc.deb'. dpkg-deb: building package vero2-kernel-osmc’ in vero2-kernel-3.10.101-17-osmc.deb'. make: Leaving directory '/mnt/package/kernel-osmc'

Kind regards

Hi

I built the kernel last night, and fixed the 8812au error, so you should be able to just git clone, without checking out a specific revision and run make vero2 now.

Sam

Hi Sam,

I did run another run on a fresh OS install over night again, this time without the git checkout as you said.
Here is the result, no wireless drivers?
/mnt/package/kernel-osmc strip: 'drivers/net/wireless/rtl8812au/8812au.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8812au/8812au.ko': No such file or directory build.sh: line 161: pushd: drivers/net/wireless/rtl8192cu: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 164: popd: directory stack empty strip: 'drivers/net/wireless/rtl8192cu/8192cu.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8192cu/8192cu.ko': No such file or directory build.sh: line 172: pushd: drivers/net/wireless/rtl8192du: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 175: popd: directory stack empty strip: 'drivers/net/wireless/rtl8192du/8192du.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8192du/8192du.ko': No such file or directory build.sh: line 183: pushd: drivers/net/wireless/rtl8192eu: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 186: popd: directory stack empty strip: 'drivers/net/wireless/rtl8192eu/8192eu.ko': No such file cp: cannot stat 'drivers/net/wireless/rtl8192eu/8192eu.ko': No such file or directory build.sh: line 194: pushd: drivers/net/wireless/mt7610u: No such file or directory Specify a target: make rbp1 make rbp2 make vero make atv build.sh: line 197: popd: directory stack empty strip: 'drivers/net/wireless/mt7610u/os/linux/mt7610u_sta.ko': No such file cp: cannot stat 'drivers/net/wireless/mt7610u/os/linux/mt7610u_sta.ko': No such file or directory build.sh: line 227: popd: directory stack empty dpkg-deb: building package vero2-image-3.10.102-1-osmc’ in vero2-image-3.10.102-1-osmc.deb'. dpkg-deb: building package vero2-headers-3.10.102-1-osmc’ in vero2-headers-3.10.102-1-osmc.deb'. dpkg-deb: building package vero2-kernel-osmc’ in vero2-kernel-3.10.102-1-osmc.deb'. make: Leaving directory '/mnt/package/kernel-osmc'
Kind regards

That’s okay. The Vero 2 kernel is being built off master so there is always small breakage. But those drivers are for external WiFi adapters, the internal will still work fine.

You should now have kernel Debs and source in src/ which you can use to build modules against.

Hi Sam,

osmc@osmc:/usr/src$ ls osmc@osmc:/usr/src$
is empty, nothing in there anymore?

Your source will be in kernel-osmc/src