Building a Kernel RPM with the Built-in Makefile target

Note that you need to have a .config file that will be included in the build. It will also use the Version as specified in your Makefile. Then run

make rpm-pkg

Which will use the RPM build infra set up for your user to put the rpm in $HOME/rpmbuild/

Edit: Note that a bunch of dependencies are needed to get the Kernel to build. If you run the above command and it fails out with a message that you are missing a dependency, you can use this pair of commands to get the yum-build dep tool installed, and use that to install the dependencies as listed by the generated kernel.spec file.

yum install dnf-utils
yum-builddep ./kernel.spec

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.