Hi, I need some advice on building and installing a kernel from source with a custom patch. To be specific, my goal is to build an Alma kernel after reverting a commit from a mainline Linux Git repo and resolving potential conflicts (featuring both subsequent mainline commits and RHEL/Alma patches). What is the most straight-forward way to do that?
My problem is that almalinux/kernel - kernel - AlmaLinux OS Foundation Git Server is a dist-git repo with no preserved commit history from a Linux git, a kernel.spec from source RPM expects kernel sources from a tarball, and a mainline Linux repo uses a different set of scripts to build an RPM package. I’m a bit confused, where should I start?
I’m new to kernel development in RPM-based distros, so I was hoping to hear what should your routine look like if you need to revert or bisect some change in the kernel code, given the structure of the repos.
Like in my case, the change happened somewhere between OS versions 8 and 9, so there’s no readily available SRPM
One thing to keep in mind is that RHEL-family kernels contain a large number of backports, so they can differ significantly from the corresponding vanilla upstream kernels.
Therefore, comparing or bisecting only upstream 4.18 to 5.14 may not necessarily identify the change that caused the behavioral difference between RHEL/AlmaLinux 8 and 9.
That’s the reason why I created this topic. I believe there should be a convenient way to deal with a kernel git source tree with all the backports applied.