Installation of TBS5980 driver on Vero2!

Hi Sam,

osmc@osmc:/$ cd kernel-osmc/src -bash: cd: kernel-osmc/src: No such file or directory
No folder there?

Did you delete the source after building? It should be under wherever you cloned OSMC under package/kernel-osmc/src

Hi Sam,

I built it in this folder
osmc@osmc:/$ cd osmc/package/kernel-osmc -bash: cd: osmc/package/kernel-osmc: No such file or directory
But the folder is not there anymore, will it disappear after a reboot, that is the only thing I have done?

Summer time and not always in front of the computer :slight_smile:

Kind regards


Where did you build it? If you build it, it will surely remain :slight_smile:


Hi Sam,

Of course it is there, I was too fast to reply, I built it in my /home/osmc/ folder.
This is what I have in that folder now->
~/osmc/package/kernel-osmc/src$ ls vero2-linux-master vero2-source-3.10.102-1-osmc_1_all.deb

What is the next step? Shall I try to git clone the drivers and before I make the build I will need to edit the Makefile to edit the path to kernel source? -> ~/osmc/package/kernel-osmc/src ?

Which one of these two drivers do you recommend me to try out first, if you have any input for me that is?

I don’t know. I don’t have the dongle.

You just need to clone the driver and adjust Ksrc in the makefile to the src/ directory :slight_smile:


Hi Sam,

After cloning the git according to TBS instructions->
mkdir tbsdriver cd tbsdriver git clone git clone --depth=1 -b latest ./media cd media_build
I stop here and will edit the Makefile. Below only reference of how to continiue after edit the Makefile.
make dir DIR=../media make distclean make -j4 make install reboot

I will have these two folders after cloning->
~/tbsdriver$ ls media media_build

Will I edit the Makefile in folder media_build or media.
This is my Makefile in media_build folder after cloning the git tbsdriver->

BUILD_DIR := $(shell pwd)/v4l
TMP ?= /tmp

ifeq ($(EDITOR),)
ifeq ($(VISUAL),)
EDITOR := vi


$(MAKE) -C $(BUILD_DIR) install

Hmm, .PHONY does not work with wildcard rules :frowning:

SPECS = media-specs




download untar::

$(MAKE) -C linux/ $(MAKECMDGOALS) DIR="…/$(DIR)"

$(MAKE) distclean
$(MAKE) -C linux distclean

Where and how exactly will I edit the Ksrc?
My kernel source I built is located here->

I will paste the other media folder Makefile below.
I have never done this before, but I am for sure learning something here. :slight_smile:

Kind regards

It’s possible Ksrc directive will need to be changed in V4L directory instead.


The other Makefile in folder media is very long so I made a pastebin->

You can probably set src := $(srctree) before src.

This is starting to get out of my knowledge, as I haven’t built V4L2 for myself for about three years

Makefile in folder /media_build/v4L

Makefile.kernel file in folder /media_build/v4l

I found something in this Makefile in folder /media
Will I paste /home/osmc/osmc/package/kernel-osmc/src in here at “srctree := .”

ifeq ($(KBUILD_SRC),)
# building in the source tree
srctree := .
ifeq ($(KBUILD_SRC)/,$(dir $(CURDIR)))
# building in a subdirectory of the source tree
srctree := …
srctree := $(KBUILD_SRC)
objtree := .
src := $(srctree)
obj := $(objtree)

VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))

export srctree objtree VPATH

You just need to change the srctree to the path with the kernel source. The exact variable naming and where you have to change it may take a few moments to track down though.

I also found this in the Makefile in folder /v4l
SRCDIR ?= /lib/modules/$(KERNELRELEASE)/source

ifneq ($(SRCDIR),) OUTDIR ?= $(SRCDIR) endif OUTDIR ?= /lib/modules/$(KERNELRELEASE)/build SRCDIR ?= /lib/modules/$(KERNELRELEASE)/source ifeq ($(wildcard $(SRCDIR)/Makefile),) # No kernel source, but headers should be in OUTDIR SRCDIR := $(OUTDIR) endif

Could this be something also?

That’s the one you want to change.


I edited to->
SRCDIR ?= /home/osmc/osmc/package/kernel-osmc/src
is that correct?

Because when I run sudo make manuconfig
I will get this output->
osmc@osmc:~/tbsdriver/media_build/v4l$ sudo make menuconfig 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[1]: *** /lib/modules/3.10.101-16-osmc/build: No such file or directory. Stop. Makefile:382: recipe for target '/lib/modules/3.10.101-16-osmc/build/scripts/kconfig/mconf' failed make: *** [/lib/modules/3.10.101-16-osmc/build/scripts/kconfig/mconf] Error 2

In Makefile.kernel file I also tried to edit this line->
#KBUILD_SRC := $(SRCDIR) KBUILD_SRC := /home/osmc/osmc/package/kernel-osmc/src include $(SRCDIR)/Makefile
But the same output occur, it is not pointing to the kernel source I built?

It depends where you built it. If so yes. You probably need to add vero2-linux-master*, or whatever directory the actual source is under.

There may be multiple places where KBUILD_SRC needs adjusting. You also need to check if KBUILD_SRC is being overwritten by a test later on.I recommend you put it near the end of the target definition in the Makefile. Look at the example here for rtl8812au WifI driver that I had to adjust for OSMC:

You will see that even though KSRC: is defined incorrectly, we only need to fix it in one place. This makes the patch easier to maintain downstream.

My recommendation is to do grep -ir “/build” Makefile. Then you will see all of the places where the path has been defined and you can make the adjustment. I hope that this helps

You could probably manually just run:

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=/home/osmc/osmc/package/kernel-osmc/src/*master*/

And you could probably just set SRCDIR before you run make menuconfig, like

SRCDIR=.... make menuconfig

Assuming that the Makefile checks for an existing variable definition.

Hope this helps,


If I do grep -ir "/build" Makefile in this folder below it will give me only this output->
osmc@osmc:~/tbsdriver/media_build/v4l$ grep -ir "/build" Makefile
OUTDIR ?= /lib/modules/$(KERNELRELEASE)/build

You should also adjust OUTDIR then as well.