Red Hat Enterprise Linux 9.2 driver installation guide(5.14)
Posted: Sun May 14, 2023 3:12 pm
Red Hat Enterprise Linux 9.2 TBS driver installation guide
You may have awared that recently Red Hat released the latest version 9.2 of RHEL (kernel version 5.14.0-284.11.1) operating system. Red Hat Enterprise Linux (RHEL) is the original edition of CentOS, one of the world's most popular Linux distribution operating system. Currently CentOS has been replaced by AlmaLinux and Rocky Linux. After upgrading to the latest version of RHEL, there may be problems with the installation of TBS drivers due to changes in system characteristics. So, we would like to write a tutorial to guarantee successful driver installations on RHEL, AlmaLinux and Rocky Linux 9.2.
First of all, after installing RHEL (AlmaLinux, Rocky Linux) 9.2, please do not update the system at will, and do not change the initial kernel version. This is very important. Please always keep the kernel version as described in this article (5.14.0-284.11.1) until the next RHEL version release (eg 9.3). Whenever possible, use the software package (RPM) from the initial ISO release. Do not attempt to install the latest software packages (RPMs).
Do all the following steps with the root user.
sudo su
Step 1, we need to install the tools and packages required to compile the TBS driver.
dnf install gcc kernel-devel patch patchutils perl perl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
rpm -i https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/p/perl-Proc-ProcessTable-0.634-1.el9.x86_64.rpm
Step 2, download the latest version of the driver package from the TBS official website. Do not attempt to use other driver versions, please use version V20221231.
cd /opt
curl -O https://www.tbsiptv.com/download/common/tbs-open-linux-drivers_v20221231.zip
unzip tbs-open-linux-drivers_v20221231.zip
tar jxvf media_build-2022-12-31.tar.bz2
Step 3, make some patch modifications. The thing is, Red Hat maintains its own Linux kernel autonomously. It brings many newer kernel features into its older kernel version. This will lead to many kernel features such as those in 5.19 appearing in Red Hat's 5.14 kernel. This is precisely why the compilation will fail if you attempt to use the original TBS driver package.
rm ./media_build/backports/v5.14_bus_void_return.patch
rm ./media_build/backports/v5.17_iosys.patch
sed -i 's/KERNEL_VERSION(5,19,0)/KERNEL_VERSION(5,14,0)/' ./media_build/linux/drivers/media/rc/*.c
Step 4, compile the driver. Do not attempt to use "install.sh", because TBS recently made a bad change to it, which will cause the compilation to fail. Follow the commands provided below to compile.
cd media_build
./patch-kernel.sh
make -j8
make install
Finally, a reboot is required for the driver to take effect.
See, the driver installation is simple. It is just that there are many detailed precautions that can easily lead to failure in the process. If you fail in any case, please remove all created files (in "/opt") and start over from Step 2. This is very important. You can use the following command to delete the installed driver files, which you are unlikely to get this far if you fail. DO NOT EXECUTE the following command if you have successfully installed the driver.
rm -rf /lib/modules/$(uname -r)/updates/extra
During the "make install" process, you will see many file names with the extension ".ko" printed on the screen, which are very long and occupy the entire screen. If you cannot see that, it means that your compilation failed, and your drivers are not installed. Clean up and start over from Step 2.
If you have UEFI Secure Boot enabled, please disable it in BIOS, otherwise it will cause your TBS drivers not to work. This is very important. The system enables SELinux by default, please also disable it to avoid potential issues.
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Again, we encourage you not to update the system. The function of TBS devices require a stable working environment like Red Hat Enterprise Linux (AlmaLinux, Rocky Linux) version 9. We strongly recommend that you pin all the environment and versions used in this article from the beginning. Also, we understand that some users would like to use CentOS 8 (RHEL 8) with TBS drivers. The kernel version is too old, and the compilation will likely fail. Give it up, time for 9.
We recommend that you keep all files available offline, including the operating system ISO (full binary version with RPMs), as well as the TBS official driver package mentioned in the article and the "perl-Proc-ProcessTable" RPM from the Fedora official website. In this way, you can always ensure that the driver installation is successful regardless of the update.
You may have awared that recently Red Hat released the latest version 9.2 of RHEL (kernel version 5.14.0-284.11.1) operating system. Red Hat Enterprise Linux (RHEL) is the original edition of CentOS, one of the world's most popular Linux distribution operating system. Currently CentOS has been replaced by AlmaLinux and Rocky Linux. After upgrading to the latest version of RHEL, there may be problems with the installation of TBS drivers due to changes in system characteristics. So, we would like to write a tutorial to guarantee successful driver installations on RHEL, AlmaLinux and Rocky Linux 9.2.
First of all, after installing RHEL (AlmaLinux, Rocky Linux) 9.2, please do not update the system at will, and do not change the initial kernel version. This is very important. Please always keep the kernel version as described in this article (5.14.0-284.11.1) until the next RHEL version release (eg 9.3). Whenever possible, use the software package (RPM) from the initial ISO release. Do not attempt to install the latest software packages (RPMs).
Do all the following steps with the root user.
sudo su
Step 1, we need to install the tools and packages required to compile the TBS driver.
dnf install gcc kernel-devel patch patchutils perl perl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
rpm -i https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/p/perl-Proc-ProcessTable-0.634-1.el9.x86_64.rpm
Step 2, download the latest version of the driver package from the TBS official website. Do not attempt to use other driver versions, please use version V20221231.
cd /opt
curl -O https://www.tbsiptv.com/download/common/tbs-open-linux-drivers_v20221231.zip
unzip tbs-open-linux-drivers_v20221231.zip
tar jxvf media_build-2022-12-31.tar.bz2
Step 3, make some patch modifications. The thing is, Red Hat maintains its own Linux kernel autonomously. It brings many newer kernel features into its older kernel version. This will lead to many kernel features such as those in 5.19 appearing in Red Hat's 5.14 kernel. This is precisely why the compilation will fail if you attempt to use the original TBS driver package.
rm ./media_build/backports/v5.14_bus_void_return.patch
rm ./media_build/backports/v5.17_iosys.patch
sed -i 's/KERNEL_VERSION(5,19,0)/KERNEL_VERSION(5,14,0)/' ./media_build/linux/drivers/media/rc/*.c
Step 4, compile the driver. Do not attempt to use "install.sh", because TBS recently made a bad change to it, which will cause the compilation to fail. Follow the commands provided below to compile.
cd media_build
./patch-kernel.sh
make -j8
make install
Finally, a reboot is required for the driver to take effect.
See, the driver installation is simple. It is just that there are many detailed precautions that can easily lead to failure in the process. If you fail in any case, please remove all created files (in "/opt") and start over from Step 2. This is very important. You can use the following command to delete the installed driver files, which you are unlikely to get this far if you fail. DO NOT EXECUTE the following command if you have successfully installed the driver.
rm -rf /lib/modules/$(uname -r)/updates/extra
During the "make install" process, you will see many file names with the extension ".ko" printed on the screen, which are very long and occupy the entire screen. If you cannot see that, it means that your compilation failed, and your drivers are not installed. Clean up and start over from Step 2.
If you have UEFI Secure Boot enabled, please disable it in BIOS, otherwise it will cause your TBS drivers not to work. This is very important. The system enables SELinux by default, please also disable it to avoid potential issues.
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
Again, we encourage you not to update the system. The function of TBS devices require a stable working environment like Red Hat Enterprise Linux (AlmaLinux, Rocky Linux) version 9. We strongly recommend that you pin all the environment and versions used in this article from the beginning. Also, we understand that some users would like to use CentOS 8 (RHEL 8) with TBS drivers. The kernel version is too old, and the compilation will likely fail. Give it up, time for 9.
We recommend that you keep all files available offline, including the operating system ISO (full binary version with RPMs), as well as the TBS official driver package mentioned in the article and the "perl-Proc-ProcessTable" RPM from the Fedora official website. In this way, you can always ensure that the driver installation is successful regardless of the update.