Rocky9, kernel-modules, some drivers missing?

Rocky 8.6
check kernel source rpm
kernel-4.18.0-372.9.1.el8.src

linux-4.18.0-372.9.1.el8 (inside tar file)
	source code at : drivers/media/tuners/si2157.c (good)

check kernel rpm (that matches source rpm above)

rpm -ql kernel-modules-0:4.18.0-372.9.1.el8.x86_64
/lib/modules/4.18.0-372.9.1.el8.x86_64/kernel/drivers/media/tuners/si2157.ko.xz
	file exists in rpm AND in filesystem (good)

Rocky 9.0
check kernel source rpm
kernel-0:5.14.0-70.17.1.el9.src

linux-5.14.0-70.17.1.el9_0 (inside tar file)
	source code at : drivers/media/tuners/si2157.c (good)

check kernel rpm (that matches source rpm above)

rpm -ql kernel-modules-0:5.14.0-70.17.1.el9_0.x86_64
	MISSING : kernel/drivers/media/tuners/si2157.ko.xz (BAD)

So many of the media drivers are missing in Rocky 9.0, but they do exist in the Rocky 9.0 source rpms?

Those drivers need to be enabled in the config file. For example, si2157 is enabled in RHEL-8:

CONFIG_MEDIA_TUNER_SI2157=m

However it is not enabled in RHEL 9 (hence Rock 9).

Thanks for clarification that this was decided by RHEL, so Rocky is just following. It does mean I can’t use these modules directly, and foward maintenance is difficult, not being able to use dnf upgrade, and having to keep signing them over and over agiain (out of tree taints kernel etc).

I’d suggest you ask ELRepo to see if a kmod package can be built for the driver.

I’m interested to know where the setting CONFIG_MEDIA_TUNER_SI2157 is set. e.g. is it only shown in the build tree at build time, or is there a way to see it on a running system?

Looking one level above, I notice the i2c driver is also missing. The headers and Kconfig are there, but the actual *.ko module file is missing. Here’s an example of the Makefile

less /usr/src/kernels/5.14.0-70.17.1.el9_0.x86_64/drivers/i2c/Makefile

I’m not sure how to use this Makefile. If I “install” the kernel source rpm, does it mean I can build the ‘i2c’ module using the installed infrastructure (in tree) as opposed to extracting the whole kernel to somewhere and trying to build it (out of tree)?

Look at /boot/config-* that the kernel-core packages do provide.

Using the files in boot config, I can now clearly see the change.

Compare Rocky 8.6, Rocky 9.0

grep -i "tuner" /boot/config-5.14.0-70.17.1.el9_0.x86_64
	nothing
grep -i "tuner" /boot/config-4.18.0-372.13.1.el8_6.x86_64
	CONFIG_MEDIA_TUNER_SI2157=m

It’s been way over decade since I’ve compiled any kernel, so I can’t help with how it is done / how to get those modules.

ELRepo ELRepo | HomePage does build kernel modules for EL that Red Hat does not. You could request a driver there: My View - ELRepo Bugs
CentOS Kmods SIG CentOS Kmods SIG does too, but they don’t seem to have EL9 branch.

Note: Alma 9 beta had kernel version 5.14.0-70.5.1 and in that config tuners were included.

Interesting about Alma 9 setting different config.
Regarding “i2c” above, I had misunderstood it.
The module I was looking for is actually called ‘i2c_mux’, and it DOES exist in Rocky 9, but it’s strange, becuase it’s in ‘kernel-core’, not ‘kernel-modules’.

rpm -ql kernel-core-0:5.14.0-70.17.1.el9_0.x86_64 | grep -i "i2c"
/lib/modules/5.14.0-70.17.1.el9_0.x86_64/kernel/drivers/i2c/i2c-mux.ko.xz

That was just in the beta; the official Alma 9.0 kernels have no tuners. I can’t tell whether that config did match CentOS Stream 9 or RHEL 9 beta of the time or not. Red Hat could have dropped stuff out at the last minute?

@gerry666uk

The kmod-si2157 package is now available from ELRepo.

To set up the ELRepo repository, run:

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
yum install https://www.elrepo.org/elrepo-release-9.el9.elrepo.noarch.rpm

Then install the kmod:

yum install kmod-si2157

In the wider context, it would be good to get a definitive list of the drivers that exist in the RHEL kernel source rpms, but which have not been built.

It’s not as easy as looking at the boot config files because some CONFIG* entries are simply missing, they’re not always set to “no”.

It’s all a bit strange, because the headers for the modules are installed in the running system, and the matching srouce rpm has the source code, so it should be possible to run the Makefiles and somehow sign them using the Rocky key (as opposed to some other key). In other words, it should be possible to build the missing modules with a few commands from within the running system, but no one knows how yet.

I’m interested in it, because open source people have put a lot of work into these modules, and yet they can’t be used from within RHEL9.