Hello, On Wed, Apr 26, 2023 at 01:07:34PM -0500, Larry Finger wrote:
On 4/26/23 12:00, DB wrote:
Hey,
I'm trying to build the Tumbleweed kernel 6.2.12 on my machine running the same version to test some patches. I had built kernels like this in the past on TW but now I'm not having much luck.
I've installed kernel-source-6.2.12-1.1 package from the repo, copied over /usr/src/linux-6.2.12-1 to my home dir, ran `make oldconfig` there, changed CONFIG_LOCALVERSION to "-1-test" in .config and then `make -j 12 binrpm-pkg`. I didn't apply any patches yet, just want to get the base kernel working.
The build ends with errors: make[2]: *** [Makefile:2036: .] Error 2 make[1]: *** [scripts/Makefile.package:79: binrpm-pkg] Error 2 make: *** [Makefile:1680: binrpm-pkg] Error 2
There's also some errors about certs in the middle: make[4]: *** No rule to make target '.kernel_signing_key.pem', needed by 'certs/signing_key.x509'. Stop. make[4]: *** Waiting for unfinished jobs.... HOSTCC certs/extract-cert make[3]: *** [scripts/Makefile.build:505: certs] Error 2 make[3]: *** Waiting for unfinished jobs....
The whole output is here https://pastebin.com/vhxM5swj
I'm not really sure is it because of the certs or something else. Anybody has any ideas?
David,
Yes, that certificate is not distributed. Edit .config and change CONFIG_MODULE_SIG_KEY=".kernel_signing_key.pem" to CONFIG_MODULE_SIG_KEY="certs/signing_key.pem" That key is part of the kernel source.
It's not part of the kernel source. It's dynamically generated. And recently it is also removed on make clean which makes it unsuitable for the default used in the kernel package. If you built the kernel package with rpmbuild it would generate a certificate for you but there is no automation in place when you are building the kernel by hand.
If you want to do a 'sudo make modules_install install' after the build, you will need the kernel-install-tools package installed.
Perhaps it could also include a tool for generating a certificate if somebody sent a PR. Thanks Michal