install kernel drivers for TBS6902 DVB PCIE card

  • Hello,

    I am currently trying to get a TBS6902 card working on LibreELEC but I have some issues with installing the driver from the TBS git repository. The closest I found is this post from smp DVB drivers for nightly build where he explained that one need to generate a patch file from the TBS repository first and then build libreelec with that patch. But how do I figgure out the relevant files for my TBS card from the TBS git repository? (He also linked a patch file that he is using for a TBS5520SE but sadly this is no longer available on dropbox). I would be happy if someone could explain this to me or provide a sample patch file for a TBS card.

    Or is there any other method to install the drivers for my dvb card?

    Thanks a lot.

  • but sadly this is no longer available on dropbox

    smp
    December 17, 2023 at 4:05 AM

    Looks like PCI-E cards are handled by tbsecp3 driver. You will also need to add av201x tuner driver and gx1133 demod driver.

  • Hello, thanks for your quick reply, the example patch files already got me a bit further on what need to be included in the patch. And thanks also for pointing out what drivers excatly I'll need.

    What I'm wondering now is what exactly you mean by oldfile and newfile here and how do you get the git refs in that patch. Do you just removed the relevant lines, commited temporarly (thats why I cant find anything on github with that starting sha) and generated a patch against the lines added back again so that the git refs dont matter much. Or is there any git repo libreelec is using on build where the oldfile state is commited (with the git sha I can find in your patch files) and the patches are applied on?

    I used "git diff" command to generate the patch files, e.g. "git diff oldfile newfile > patchfile". Then I joined all the patches into 1 file.

    I would really appreciate it if you can give me some hints on how to generate the patch.

    Thanks a lot in advance.

  • I simply downloaded the needed files and created the patch files with git diff.

    e.g. for av201x .c:

    git diff emptyfile av201x.c > 1.patch

    then fixed the path/file name in .patch file.

    There are probably better ways to do this (e.g. git cherry-pick) but it works for me.

  • Hello smp,

    sorry for my late reply, thank you very much for your great help.

    I got it working by creating two folders a and b and then copying all existing kernel files (libreelec extracted during a first clean build run without the patched kernel) in the folder a, and then the modifyed/created new files from the linux-media repository in the b folder. Then I used the following comand to create the combined patchfile:

    Code
    git diff --no-prefix a b > tbsecp3_kernel.patch

    And then I copied the patchfile to this folder: projects/Generic/patches/linux/. And lastly enabled the tbsecp3 driver in libreELEC by adding CONFIG_DVB_TBSECP3=m to the config in projects/Generic/linux/linux.x86_64.conf.

    best regards

    jonnybe