Learning to compile distro kernel for Fedora. I took a random patch set from mm just to learn this process [1]. Has taken couple of days because I don't know anything about RPM and have compiled so far only distro kernel for Ubuntu. I'm recent convertant to Fedora because between 2004-2021 I used Ubuntu util I had had enough ;-)
Glitches or things to reconsider:
- I have now kernel compilation ongoing with "fedpkg mockbuilld". I hope this is the right command. I got the kernel by "fedpkg clone --anonymous kernel ".
- I have no idea how to point out linux-next so had to backport a single patch from kselftest to v6.12-rc4. Any pointers how to use that nice fedpkg command AND have linux-next is appreciated.
- I hope this will ensure that the kernel will signed with my MOK key: [2].
[1]
https://lore.kernel.org/all/cover.1729440856.git.lorenzo.stoakes@oracle.com/[2]
I have a key created:
$ sudo certutil -L -d /etc/pki/pesign
Certificate Nickname Trust Attributes
SSL,S/MIME,JAR/XPI
Machine Owner Certificate Pu,Pu,Pu
And I hope this will pick it for the kernel build:
--- a/kernel-local
+++ b/kernel-local
@@ -1,2 +1,3 @@
# This file is intentionally left empty in the stock kernel. Its a nicety
# added for those wanting to do custom rebuilds with altered config opts.
+%define pe_signing_cert "Machine Owner Certificate"
#fedora #linux #kernel #rpm