From Fedora Project Wiki


This wiki page will help you build your own non-debugging build kernel. Branched kernels are built with debugging enabled by default in the early stages of the release to assist developers.

Getting the source from git

First things first, you'll need the kernel fedpkg source, and the necessary build depends:

  • (as root) # yum install fedpkg fedora-packager rpmdevtools
  • # yum-builddep kernel
  • (as your user) $ fedpkg co -B kernel --anonymous

This will create a kernel/ subdirectory hierarchy under your current working dir with a dir for each Fedora branch, the rawhide kernel will be located in the master branch.

Building a non-debugging kernel

The following example assumes building a kernel for F-14, which is currently based on the 2.6.35 stable series.

  • $ cd kernel/f14
  • kernel/f14 $ make release

This make target will modify your checkout of the F-14 source to generate both a kernel and kernel-debug rpms.

  • kernel/f14 $ fedpkg local

fedpkg local will chug away for a very long time (on most systems) building the kernels for your currently running architecture. See another article for how to generate an SRPM and do more complicated things like mock building.

When it completes the subdirectory kernel/f14/x86_64 (or i686 or whatnot) will have a kernel rpm with debugging disabled by default. These can be installed with, for example:

  • kernel/f14/x86_64 # yum localinstall --nogpgcheck ./kernel-$version.rpm

Updating

  • $ cd kernel/f14
  • kernel/f14 $ git status
    • your tree will be dirty in the configs and kernel.spec
  • kernel/f14 $ git stash
    • puts aside your changes so your tree will be clean
  • kernel/f14 $ git pull origin
    • update to the latest tree from fedpkg git
  • kernel/f14 $ make release
    • switch back to non-debugging...

Gotchas

Please run a Fedora built debugging kernel when you report bugs, as they contain invaluable debugging information to assist developers.

More advanced information is available on the Building a custom kernel wiki page.