[elrepo] Building for a non-standard kernel

Manuel Wolfshant wolfy at nobugconsulting.ro
Sat Feb 20 15:25:32 EST 2021


On February 20, 2021 9:33:15 PM GMT+02:00, Roger Sewell <roger.sewell at cantab.net> wrote:
>
>Thank you to Manuel Wolfshant and Phil Perry for their input. Following
>their lead, I added vga=ask to the kernel command line, then tried
>various answers. As far as the elrepo kmod-megaraid_sas build is
>concerned, it is clear that it is working; I think the problems I have
>had are in some way connected with how the bugfix-test kernel I was
>sent
>had been built, and will take that still incompletely-resolved question
>up with Red Hat.
>
>One more question about the  elrepo kmod-megaraid_sas package: am I
>right in thinking that as one can only have one version of this package
>installed at any one time, and as upgrading it from an earlier version
>removes the earlier version, one can only have one installed kernel at
>a
>time set up with it ?
Theoretically speaking: most probably yes, if you leave things to happen automatically. In practice no.
Here is the whole process, so that you better understand what happens behind the.scene. Sorry if I am too pedantic and you already know these details but I want to make sure things are clear.
First of all the important thing: all rhel kernels have a so called "stable ABI" which is a list of symbols (functions' entry points) guaranteed to not change (at least during the life of a minor release).  Through a process names "weak linking" 3rd party kernel modules can access the kernel API even if they were built against a different kernel, as long as they reference only those stable symbols.
ElRepo's kmods take advantage of this process. They are generally built against the first kernel released for any given minor release and, when the package gets installed, creates symlinks against all other installed kernels. During a kmod upgrade these symlinks are normally updated as well.


>
>I.e. If I install a new kernel and the kmod-megaraid_sas package
>corresponding, then inevitably the megaraid_sas ability of the old
>kernel gets removed ?
>
In practice, one could manually put aside the old module and reuse it after the kmod upgrade, breaking the symlinks for the old kernel towards the new module and replacing them with links towards the old module.
Might slso involve a need to rebuild the relevant initramfs images afterwards.
"Been there, done that" as they say.


wolfy


More information about the elrepo mailing list