07.01.2021 20:58, Andrei Borzenkov пишет:
07.01.2021 19:09, B пишет:
Hello,
I've got a question about how is the rebuilding of external kernel modules invoked during a new kernel version installation?
The reason I'm asking is because when I install a modified kernel the Nvidia GPU driver modules are not built and installed like they are for regular kernels.
Example how it works with standard kernel: I have kernel-default-5.10.3, kernel-default-5.10.4 is released, I run zypper dup, during the kernel installation the Nvidia modules are rebuilt against the new kernel and installed. I can reboot into the new kernel and everything works.
There is no rebuild. When new kernel is installed so called weak links to modules built against older kernel version are created as long as new kernel is kABI compatible. 5.10.3 and 5.10.4 are most likely compatible.
OK, it is not exactly true. nVidia KMP package contains trigger that is executed when kernel-$flavor-devel package is installed (it also runs when KMP package itself is installed). This trigger compiles nVidia modules for the latest kernel-$flavor-devel installed.
Example with my situation: I take the kernel source kernel-source-5.10.4 from the standard Tumbleweed repos, make a few changes, build the rpms (make rpm-pkg), install them with Zypper but it doesn't install the Nvidia modules, I have to do this manually or else the GUI wouldn't work.
What is full name of your RPM and your kernel?
That still holds. Trigger will run only when RPM with specific name is installed.
So what exactly triggers the module rebuild? What does the official kernel rpm has that my rpm built for the same source doesn't?