Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"I've seen it. It's rubbish." -- Marvin the Paranoid Android


computers / alt.os.linux.ubuntu / If you Run a TBS DVB-T2 TV card.

SubjectAuthor
o If you Run a TBS DVB-T2 TV card.pinnerite

1
If you Run a TBS DVB-T2 TV card.

<20230817201230.2e36c5e4b7ecaae16fca6e0c@gmail.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=3448&group=alt.os.linux.ubuntu#3448

  copy link   Newsgroups: alt.os.linux.mint alt.os.linux.ubuntu
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pinnerite@gmail.com (pinnerite)
Newsgroups: alt.os.linux.mint,alt.os.linux.ubuntu
Subject: If you Run a TBS DVB-T2 TV card.
Date: Thu, 17 Aug 2023 20:12:30 +0100
Organization: A noiseless patient Spider
Lines: 183
Message-ID: <20230817201230.2e36c5e4b7ecaae16fca6e0c@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="e80042bedd53be375bf5264990cd4a77";
logging-data="4087961"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LYPlR4Lt00LgRXoMi/cWRbGYEEkMU+/k="
Cancel-Lock: sha1:fmn47ZiVg2peFk+eiRJylXnIC5g=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
 by: pinnerite - Thu, 17 Aug 2023 19:12 UTC

You will know that every time a new Kernel is installed, the old kernel
media modules must be destroyed while booted into the old kernel.
Then after rebooting into the new kernel, new modules must be compiled.
It is a pain in the proverbial a..e.

So I developed a script to automate the process. Read the instructions
at the top if you plan to use it. There is no guarantee that it is
perfect but I have tested it but on;ly on Mint 21.1

Here it is:

#!/bin/bash
# sname="Install Open Source TBS drivers (tbs_osrcupdate-07).sh"
# --------------------------------------------------------------------
# This script automates the process of installing dtivers for TBS TV cards
# such as TS-6280, TBS-6281 etc, particularly following a kernel update.
# It is a two-pass process. Start it while running the original kernel.
# Following a reboot into the new kernel, run it again.
# # Created by Alan Secker 2023, based on an open source script provided by
# TBS. It has only been tested in Linux Mint 21.1 but should run on any
# Linux system provided the kernel hearders or sources for the new kernel
# have been downloaded and installed.
# # No warranties are given. Run it at your own risk.
# =================================================
# Before running this script:
# # 1) Create a directory TBS-TV in your home directory
# 2) Move this script to ~/TBS-TV.
# 3) Make this script executable by running "chmod+x tbs_oscrupdate.sh"
# from a terminal prompt ($) without the quotes.
# 4) If not already installed, from a terminal, run sudo apt install git
#
#----------------------------------------------------------------------

mkdir -p /home/$USER/tmp
passflag=/home/$USER/tmp/tbs.txt

## function disp {
disp() {
echo "$1"
read -p " Press Enter to continue"
# read -rsn1
}

echo ""
echo "$sname"
echo ""

# If the passflag file exists, we have rebooted, if not continue with
# First Pass.

if ! [ -f "$passflag" ]; then

#
# First Pass
# ----------
echo " Ensure the running kernel is the OLD kernel"
echo " Here is alist of all the installed kernels"
echo
dpkg --list | grep linux-image
echo
echo " You must be running the old kernel."
echo " Compare with the running kernel."
echo
uname -mrs
echo
read -p " Press Enter to continue"
echo
echo "If it is not the old kernel, press R to reboot but remember"
echo "to hold down the shift key as the system comes up in order to"
echo "get into GRUB. Once there select the second option to arrive"
echo "at the list of kernels. Select the previous kernel"
echo " or ENTER to continue"
echo

read -r -n 1 nkey

# Note the ^^ case modification operator

if [ "${nkey^^}" = "R" ]; then
sudo /sbin/shutdown -r now
fi

# Create a flag file to confirm we are in the correct kernel.

echo " " > "$passflag"

echo
echo "OK it is the old kernel we are going to delete modules"
echo "from the old kernel"
echo

#"Check for /home/$USER/Programs/tbstv
#

if cd /opt
then
disp "About to delete /opt/media and /opt/media_build and contents"
sudo rm -Rf /opt/media
sudo rm -Rf /opt/media_build
echo
disp " About to delete old driver modules"
echo
sudo rm -rf /lib/modules/"$(uname -r)"/kernel/drivers/media
# else
fi

# Reboot into new kernel

echo
echo ""
disp " Reboot into new kernel prior to second pass"
echo
reboot
else
# Second Pass - after reboot
# --------------------------

disp "Delete passflag"

rm "$passflag"

cd /opt

disp "After deleting $passflag, download TBS open source driver"
# read -p "Press Space-Bar to continue"

disp "git clone https://github.com/tbsdtv/media_build.git"" rel="nofollow" target="_blank">https://github.com/tbsdtv/media_build.git"
sudo git clone https://github.com/tbsdtv/media_build.git
disp "git clone --depth=1 https://github.com/tbsdtv/linux_media.git -b latest ./media"
sudo git clone --depth=1 https://github.com/tbsdtv/linux_media.git -b latest ./media

disp "Now change to /opt/media_build"
echo

# cd media_build
cd media_build || { echo "media_build not found"; exit 1; }
echo

disp "Next run make dir DIR=../media"
echo

sudo make dir DIR=../media
disp "Next run make allyesconfig"
echo
sudo make allyesconfig
sudo sed -i -r 's/(^CONFIG.*_RC.*=)./\1n/g' v4l/.config
sudo sed -i -r 's/(^CONFIG.*_IR.*=)./\1n/g' v4l/.config

echo
disp "About to run make -j4"
echo

if ! sudo make -j4
then
echo
echo "make failed"
read -p " Press Enter to continue"
exit
else
disp "make succeeded"
echo
sudo make install
echo
disp "make install succeeded"
echo
disp "Download and install Firmware"
sudo wget http://www.tbsdtv.com/download/document/linux/tbs-tuner-firmwares_v1.0.tar.bz2
sudo tar jxvf tbs-tuner-firmwares_v1.0.tar.bz2 -C /lib/firmware/
fi

# reboot

fi

--
Linux Mint 21.1 kernel version 5.15.0-79-generic Cinnamon 5.6.8
AMD Phenom II x4 955 CPU 16Gb Dram 2TB Barracuda

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor