TBS6281 linux driver install
Moderator: Forum Moderators
TBS6281 linux driver install
I'm trying to rebuild my Mythbox after a hdd failure about a year ago. Apart from a new hdd all the hw is exactly the same. I did a fresh install of Ubuntu 22.04.1 and now I'm having a nightmare getting the TV card drivers installed. I've tried to the open source and closed source with no luck. I can post more details but knowing what details to post would be helpful to start with. Did something change that I don't know about?
Re: TBS6281 linux driver install
I have the older TBS6280 and a TBS6981.
I use the drivers from https://github.com/tbsdtv/media_build it fairly straight forward to set up and use but it is a pain to have to manually update the drivers after each kernel update
I use the drivers from https://github.com/tbsdtv/media_build it fairly straight forward to set up and use but it is a pain to have to manually update the drivers after each kernel update
Re: TBS6281 linux driver install
Thanks - I'm used to having to update the drivers after each OS update so that's not a problem. I just need to get them setup for starters. Are there any step-by-step instructions for getting these working?
Re: TBS6281 linux driver install
From memory so apologies if I forget something but it goes something like this.
1. install build-essential which installs some tools required to build from source code like gcc and make
2. install git used to download and maintain source code repositories (don't think build-essential installs this?)
3. change directory to where you want to save the git repo then use git to get the media_build source code repository
4. change into the media_build directory and build the new kernel modules
The build script should tell you if you have any missing dependencies if it does just use apt to install them and try again.
5. Finally if the build completed OK install the new kernel modules then reboot
If at a later date you install a new kernel then you need to rebuild the modules
1. change into the media_build source code repo and update it
2. now rebuild the modules
If the build fails then you may have to clean the source code to rebuild from fresh
then try the ./build command again
3. once built OK install the new modules and reboot
It's important to note the modules will be built for the running kernel so after you use apt to update the kernel you must then reboot so you are running the new kernel before you try to rebuild the modules.
1. install build-essential which installs some tools required to build from source code like gcc and make
Code: Select all
sudo apt install build-essential
Code: Select all
sudo apt install git
Code: Select all
cd ~
git clone https://github.com/tbsdtv/media_build.git
Code: Select all
cd media_build
./build
5. Finally if the build completed OK install the new kernel modules then reboot
Code: Select all
sudo make install
sudo reboot
1. change into the media_build source code repo and update it
Code: Select all
cd ~/media_build
git pull
2. now rebuild the modules
Code: Select all
./build
Code: Select all
make distclean
3. once built OK install the new modules and reboot
Code: Select all
sudo make unstall
sudo reboot
It's important to note the modules will be built for the running kernel so after you use apt to update the kernel you must then reboot so you are running the new kernel before you try to rebuild the modules.
Re: TBS6281 linux driver install
Awesome - thanks. Will give it a go tomorrow.
Re: TBS6281 linux driver install
I tried and all went well until running the build script. Output below. I'm not sure where the problems lie - a bit beyond my understanding. Any help gratefully received.
Code: Select all
Script started on 2022-09-21 17:00:27+01:00 [TERM="xterm-256color" TTY="/dev/pts/1" COLUMNS="104" LINES="38"]
[?2004h]0;miffy@mythbox: ~/media_build[01;32mmiffy@mythbox[00m:[01;34m~/media_build[00m$ exitsudo lspci -v | grep --after-context=10 7160
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[19P./setup_tbs.sh $USERcd ..[Ksudo ./setup_tbs.sh $USERlspci -v | grep --after-context=10 7160
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cexit[K[Kexitsudo lspci -v | grep --after-context=10 7160
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[19P./setup_tbs.sh $USERcd ..[Kls -halcd scripts/sudo ./setup_tbs.sh $USERls -hal[Ksudo ./setup_tbs.sh $USER[14Pcd scripts/[4Pls -hal[2Pcd ..sudo ./setup_tbs.sh $USERlspci -v | grep --after-context=10 7160
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cexit[K[Kls
[?2004l
00_opt_default.inc [0m[01;32mcreate_dkms_tar.sh[0m [01;31mdvb-firmwares.tar.bz2[0m [01;32minstall.sh[0m README_dkms
[01;32marchive.sh[0m [01;34mdepmod.d[0m [01;34mdvbls[0m [01;34mlinux[0m README.patches
[01;34mbackports[0m [01;34mdevel_scripts[0m [01;34mfemon-s2[0m Makefile [01;34mszap-s2[0m
[01;32mbuild[0m dkms.conf [01;32mgen_dkms_dyn_conf.sh[0m Makefile.dkms [01;34mtune-s2[0m
[01;32mbuild_all.sh[0m dkms_updated_modules.conf [01;32mhandle_updated_modules.sh[0m [01;32moffline.sh[0m typescript
COPYING dkms_ver.conf INSTALL README [01;34mv4l[0m
[?2004h]0;miffy@mythbox: ~/media_build[01;32mmiffy@mythbox[00m:[01;34m~/media_build[00m$ ls[K./build
[?2004l
Checking if the needed tools for Ubuntu 22.04.1 LTS are available
Needed package dependencies are met.
************************************************************
* This script will download the latest tarball and build it*
* Assuming that your kernel is compatible with the latest *
* drivers. If not, you'll need to add some extra backports,*
* ./backports/<kernel> directory. *
* It will also update this tree to be sure that all compat *
* bits are there, to avoid compilation failures *
************************************************************
************************************************************
* All drivers and build system are under GPLv2 License *
* Firmware files are under the license terms found at: *
* https://github.com/tbsdtv/media_build/releases/download/latest *
* Please abort in the next 5 secs if you don't agree with *
* the license *
************************************************************
Not aborted. It means that the licence was agreed. Proceeding...
****************************
Updating the building system
****************************
From https://github.com/tbsdtv/media_build
* branch master -> FETCH_HEAD
[33mhint: You have divergent branches and need to specify how to reconcile them.[m
[33mhint: You can do so by running one of the following commands sometime before[m
[33mhint: your next pull:[m
[33mhint: [m
[33mhint: git config pull.rebase false # merge (the default strategy)[m
[33mhint: git config pull.rebase true # rebase[m
[33mhint: git config pull.ff only # fast-forward only[m
[33mhint: [m
[33mhint: You can replace "git config" with "git config --global" to set a default[m
[33mhint: preference for all repositories. You can also pass --rebase, --no-rebase,[m
[33mhint: or --ff-only on the command line to override the configured default per[m
[33mhint: invocation.[m
fatal: Need to specify how to reconcile divergent branches.
make: Entering directory '/home/miffy/media_build/linux'
wget https://github.com/tbsdtv/media_build/releases/download/latest/linux-media.tar.bz2.md5 -O linux-media.tar.bz2.md5.tmp
--2022-09-21 17:01:36-- https://github.com/tbsdtv/media_build/releases/download/latest/linux-media.tar.bz2.md5
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/61525972/0e877c00-4996-459c-a798-343f513dcc16?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220921%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220921T160137Z&X-Amz-Expires=300&X-Amz-Signature=cd542e08d9c30d803c6041da329aedc3445fe7afa03ea3186727392b82c72f1b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=61525972&response-content-disposition=attachment%3B%20filename%3Dlinux-media.tar.bz2.md5&response-content-type=application%2Foctet-stream [following]
--2022-09-21 17:01:37-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/61525972/0e877c00-4996-459c-a798-343f513dcc16?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220921%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220921T160137Z&X-Amz-Expires=300&X-Amz-Signature=cd542e08d9c30d803c6041da329aedc3445fe7afa03ea3186727392b82c72f1b&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=61525972&response-content-disposition=attachment%3B%20filename%3Dlinux-media.tar.bz2.md5&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91 [application/octet-stream]
Saving to: ‘linux-media.tar.bz2.md5.tmp’
linux-media.tar.bz2.md5.t 0%[ ] 0 --.-KB/s
linux-media.tar.bz2.md5.t 100%[=====================================>] 91 --.-KB/s in 0s
2022-09-21 17:01:37 (2.23 MB/s) - ‘linux-media.tar.bz2.md5.tmp’ saved [91/91]
make: Leaving directory '/home/miffy/media_build/linux'
make: Entering directory '/home/miffy/media_build/linux'
tar xfj linux-media.tar.bz2
rm -f .patches_applied .linked_dir .git_log.md5
make: Leaving directory '/home/miffy/media_build/linux'
**********************************************************
* Downloading firmwares from linuxtv.org. *
**********************************************************
dvb-demod-avl6882.fw
dvb-demod-drxk-pctv.fw
dvb-demod-gx1503B.fw
dvb-demod-m88ds3103b.fw
dvb-demod-m88ds3103.fw
dvb-demod-m88rs6000.fw
dvb-demod-m88rs6060.fw
dvb-demod-mn88472-02.fw
dvb-demod-mn88473-01.fw
dvb-demod-si2168-01.fw
dvb-demod-si2168-02.fw
dvb-demod-si2168-a20-01.fw
dvb-demod-si2168-a30-01.fw
dvb-demod-si2168-b40-01.fw
dvb-demod-si2168-d60-01.fw
dvb-demod-si2183-b60-01.fw
dvb-fe-bcm3510-01.fw
dvb-fe-cx24116.fw
dvb-fe-cx24117.fw
dvb-fe-drxj-mc-1.0.8.fw
dvb-fe-drxj-mc-vsb-1.0.8.fw
dvb-fe-drxj-mc-vsb-qam-1.0.8.fw
dvb-fe-ds3000.fw
dvb-fe-ds300x.fw
dvb-fe-ds3103.fw
dvb-fe-mxl58x.fw
dvb-fe-mxl5xx.fw
dvb-fe-or51132-qam.fw
dvb-fe-or51132-vsb.fw
dvb-fe-or51211.fw
dvb-fe-rs6000.fw
dvb-fe-tda10045.fw
dvb-fe-tda10046.fw
dvb-fe-tda10048-1.0.fw
dvb-fe-tda10071.fw
dvb-fe-xc4000-1.4.1.fw
dvb-fe-xc5000-1.6.114.fw
dvb-fe-xc5000c-4.1.30.7.fw
dvb-tuner-si2141-a10-01.fw
dvb-tuner-si2157-a30-01.fw
dvb-tuner-si2158-a20-01.fw
dvb-usb-avertv-a800-02.fw
dvb-usb-bluebird-01.fw
dvb-usb-dib0700-1.20.fw
dvb-usb-dibusb-5.0.0.11.fw
dvb-usb-dibusb-6.0.0.8.fw
dvb-usb-dtt200u-01.fw
dvb-usb-dw2101.fw
dvb-usb-dw2102.fw
dvb-usb-dw2104.fw
dvb-usb-dw3101.fw
dvb-usb-id5301.fw
dvb-usb-id5520se.fw
dvb-usb-id5580.fw
dvb-usb-id5590.fw
dvb-usb-id5930.fw
dvb-usb-it9135-01.fw
dvb-usb-it9135-02.fw
dvb-usb-p1100.fw
dvb-usb-p1100-old.fw
dvb-usb-p7500.fw
dvb-usb-pctv-400e-01.fw
dvb-usb-pctv-450e-01.fw
dvb-usb-pctv-452e-01.fw
dvb-usb-s620.fw
dvb-usb-s630.fw
dvb-usb-s660.fw
dvb-usb-sb340.fw
dvb-usb-SkyStar_USB_HD_FW_v17_63.HEX.fw
dvb-usb-tbs5520-01.fw
dvb-usb-tbsqbox-dvbc.fw
dvb-usb-tbsqbox-id2601.fw
dvb-usb-tbsqbox-id5220.fw
dvb-usb-tbsqbox-id5520.fw
dvb-usb-tbsqbox-id5521.fw
dvb-usb-tbsqbox-id5680.fw
dvb-usb-tbsqbox-id5880.fw
dvb-usb-tbsqbox-id5881.fw
dvb-usb-tbsqbox-id5910.fw
dvb-usb-tbsqbox-id5920.fw
dvb-usb-tbsqbox-id5921.fw
dvb-usb-tbsqbox-id5922.fw
dvb-usb-tbsqbox-id5923.fw
dvb-usb-tbsqbox-id5925.fw
dvb-usb-tbsqbox-id5927.fw
dvb-usb-tbsqbox-id5928.fw
dvb-usb-tbsqbox-id5980.fw
dvb-usb-terratec-h5-drxk.fw
dvb-usb-terratec-h7-az6007.fw
dvb-usb-terratec-h7-drxk.fw
dvb-usb-tt-s2400-01.fw
dvb-usb-umt-010-02.fw
dvb-usb-vp702x-01.fw
dvb-usb-vp7045-01.fw
dvb-usb-wt220u-01.fw
dvb-usb-wt220u-02.fw
sms1xxx-hcw-55xxx-dvbt-02.fw
sms1xxx-hcw-55xxx-isdbt-02.fw
sms1xxx-nova-a-dvbt-01.fw
sms1xxx-nova-b-dvbt-01.fw
sms1xxx-stellar-dvbt-01.fw
v4l-cx231xx-avcore-01.fw
v4l-cx23418-apu.fw
v4l-cx23418-cpu.fw
v4l-cx23418-dig.fw
v4l-cx23885-avcore-01.fw
v4l-cx23885-enc-broken.fw
v4l-cx23885-enc.fw
v4l-cx25840.fw
******************
* Start building *
******************
make -C /home/miffy/media_build/v4l allyesconfig
make[1]: Entering directory '/home/miffy/media_build/v4l'
make[2]: Entering directory '/home/miffy/media_build/linux'
Applying patches for kernel 5.15.0-47-generic
patch -s -f -N -p1 -i ../backports/api_version.patch
patch -s -f -N -p1 -i ../backports/pr_fmt.patch
patch -s -f -N -p1 -i ../backports/debug.patch
patch -s -f -N -p1 -i ../backports/drx39xxj.patch
patch -s -f -N -p1 -i ../backports/ccs.patch
patch -s -f -N -p1 -i ../backports/rc-cec.patch
patch -s -f -N -p1 -i ../backports/v5.17_spi.patch
patch -s -f -N -p1 -i ../backports/v5.17_iosys.patch
patch -s -f -N -p1 -i ../backports/v5.17_overflow.patch
patch -s -f -N -p1 -i ../backports/v5.15_container_of.patch
Patched drivers/media/dvb-core/dvbdev.c
Patched drivers/media/v4l2-core/v4l2-dev.c
Patched drivers/media/rc/rc-main.c
make[2]: Leaving directory '/home/miffy/media_build/linux'
./scripts/make_kconfig.pl /lib/modules/5.15.0-47-generic/build /lib/modules/5.15.0-47-generic/build 1
Preparing to compile for kernel version 5.15.0
***WARNING:*** You do not have the full kernel sources installed.
This does not prevent you from building the v4l-dvb tree if you have the
kernel headers, but the full kernel source may be required in order to use
make menuconfig / xconfig / qconfig.
If you are experiencing problems building the v4l-dvb tree, please try
building against a vanilla kernel before reporting a bug.
Vanilla kernels are available at http://kernel.org.
On most distros, this will compile a newly downloaded kernel:
cp /boot/config-`uname -r` <your kernel dir>/.config
cd <your kernel dir>
make all modules_install install
Please see your distro's web site for instructions to build a new kernel.
WARNING: This is the V4L/DVB backport tree, with experimental drivers
backported to run on legacy kernels from the development tree at:
http://git.linuxtv.org/media-tree.git.
It is generally safe to use it for testing a new driver or
feature, but its usage on production environments is risky.
Don't use it in production. You've been warned.
CEC_CROS_EC: Requires at least kernel 9.255.255
V4L2_H264: Requires at least kernel 9.255.255
VIDEO_IPU3_CIO2: Requires at least kernel 9.255.255
VIDEO_MEM2MEM_DEINTERLACE: Requires at least kernel 9.255.255
VIDEO_ROCKCHIP_ISP1: Requires at least kernel 9.255.255
VIDEO_OMAP3: Requires at least kernel 9.255.255
VIDEO_HI556: Requires at least kernel 9.255.255
VIDEO_IMX208: Requires at least kernel 9.255.255
VIDEO_IMX258: Requires at least kernel 9.255.255
VIDEO_IMX274: Requires at least kernel 9.255.255
VIDEO_IMX319: Requires at least kernel 9.255.255
VIDEO_OV02A10: Requires at least kernel 9.255.255
VIDEO_OV2740: Requires at least kernel 9.255.255
VIDEO_OV5670: Requires at least kernel 9.255.255
VIDEO_OV5675: Requires at least kernel 9.255.255
VIDEO_OV7251: Requires at least kernel 9.255.255
VIDEO_OV772X: Requires at least kernel 9.255.255
VIDEO_OV8856: Requires at least kernel 9.255.255
VIDEO_OV9650: Requires at least kernel 9.255.255
VIDEO_ISL7998X: Requires at least kernel 9.255.255
SND_BT87X: Requires at least kernel 9.255.255
INTEL_ATOMISP: Requires at least kernel 9.255.255
VIDEO_HANTRO: Requires at least kernel 9.255.255
VIDEO_ROCKCHIP_VDEC: Requires at least kernel 9.255.255
VIDEO_IPU3_IMGU: Requires at least kernel 9.255.255
Created default (all yes) .config file
./scripts/fix_kconfig.pl
make[1]: Leaving directory '/home/miffy/media_build/v4l'
make -C /home/miffy/media_build/v4l
make[1]: Entering directory '/home/miffy/media_build/v4l'
scripts/make_makefile.pl
./scripts/make_myconfig.pl
[ ! -f "./config-mycompat.h" ] && echo "/* empty config-mycompat.h */" > "./config-mycompat.h" || true
make -C firmware prep
creating symbolic links...
perl scripts/make_config_compat.pl /lib/modules/5.15.0-47-generic/build ./.myconfig ./config-compat.h
make[2]: Entering directory '/home/miffy/media_build/v4l/firmware'
make[2]: Nothing to be done for 'prep'.
make[2]: Leaving directory '/home/miffy/media_build/v4l/firmware'
make -C firmware
make[2]: Entering directory '/home/miffy/media_build/v4l/firmware'
make[2]: Nothing to be done for 'default'.
make[2]: Leaving directory '/home/miffy/media_build/v4l/firmware'
Kernel build directory is /lib/modules/5.15.0-47-generic/build
make -C ../linux apply_patches
make[2]: Entering directory '/home/miffy/media_build/linux'
Patches for 5.15.0-47-generic already applied.
make[2]: Leaving directory '/home/miffy/media_build/linux'
make -C /lib/modules/5.15.0-47-generic/build M=/home/miffy/media_build/v4l modules
make[2]: Entering directory '/usr/src/linux-headers-5.15.0-47-generic'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
make[2]: *** [Makefile:749: include/config/auto.conf] Error 1
make[2]: Leaving directory '/usr/src/linux-headers-5.15.0-47-generic'
make[1]: *** [Makefile:53: default] Error 2
make[1]: Leaving directory '/home/miffy/media_build/v4l'
make: *** [Makefile:26: all] Error 2
build failed at ./build line 554
[?2004h]0;miffy@mythbox: ~/media_build[01;32mmiffy@mythbox[00m:[01;34m~/media_build[00m$ exit
[?2004l
exit
Script done on 2022-09-21 17:01:50+01:00 [COMMAND_EXIT_CODE="2"]
Re: TBS6281 linux driver install
Do you have the kernel headers installed? This should show you if you have or not
Code: Select all
apt-cache policy linux-headers-`uname -r`
Re: TBS6281 linux driver install
Output below - doesn't seem to show any problems?
Code: Select all
miffy@mythbox: uname -r
5.15.0-48-generic
miffy@mythbox: apt-cache policy linux-headers-5.15.0-48-generic
linux-headers-5.15.0-48-generic:
Installed: 5.15.0-48.54
Candidate: 5.15.0-48.54
Version table:
*** 5.15.0-48.54 500
500 http://gb.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
100 /var/lib/dpkg/status
miffy@mythbox:
Re: TBS6281 linux driver install
Did the kernel get updated between you trying to build the modules and you doing the apt-cache policy test?
One shows 5.15.0-47-generic and the other 5.15.0-48-generic
I would try rebooting (doesn't look like it's needed but just in case) and try again to build the modules but this time do a make distclean first just to be sure.
I just updated a server to 5.15.0-48-generic and everything rebuild OK also on 22.04LTS. Everything from my build looks very similar to yours including the git error and the no kernel sources warning but it still compiles and installs the modules just fine.
One shows 5.15.0-47-generic and the other 5.15.0-48-generic
I would try rebooting (doesn't look like it's needed but just in case) and try again to build the modules but this time do a make distclean first just to be sure.
Code: Select all
cd ~/media_build
make distclean
./build
sudo make install
Re: TBS6281 linux driver install
That was more successful. I had updated the kernel between the build and policy test.
I get the required line in the usual check, but mythbackend doesn't pick up the tuner when I try to set it up.
I would paste the install script output but it's too large to be accepted here and I can't figure out how to add/share large files.
I do get lots of complaints about during the build...
I get the required
Code: Select all
Kernel modules: saa716x_tbs_dvb
Code: Select all
lspci
I would paste the install script output but it's too large to be accepted here and I can't figure out how to add/share large files.
I do get lots of complaints about
Code: Select all
unavailability of vmlinux
Re: TBS6281 linux driver install
If you look at the output sudo dmesg does it look like the card is recognized and initialized OK?
For my 6280 I see this among other stuff
SAA716x Budget 0000:0b:00.0: DVB: registering adapter 0 frontend 0 (TurboSight TBS 6280 DVB-T/T2/C)...
For my 6280 I see this among other stuff
SAA716x Budget 0000:0b:00.0: DVB: registering adapter 0 frontend 0 (TurboSight TBS 6280 DVB-T/T2/C)...
Re: TBS6281 linux driver install
Ah, the only output I get from a sudo dmesg is many multiple lines of the following:
[xxxxx.yyyyyy] Lockdown: systemd-logind: hibernation is restricted: see man kernel-lockdown.7
[xxxxx.yyyyyy] Lockdown: systemd-logind: hibernation is restricted: see man kernel-lockdown.7
Re: TBS6281 linux driver install
OK, so turning off the UEFI boot in the BIOS helped and I do indeed see a line like yours above. That also seemed to unblock the rest of the problem and I can now see the cards in mythbackend setup. Onwards to configuration. Thanks for all the help. Appreciated.