From Fedora Project Wiki

(decodify.)
 
(5 intermediate revisions by one other user not shown)
Line 9: Line 9:
* <code> (as root) # yum install fedpkg fedora-packager rpmdevtools </code>
* <code> (as root) # yum install fedpkg fedora-packager rpmdevtools </code>
* <code> # yum-builddep kernel </code>
* <code> # yum-builddep kernel </code>
* <code> (as your user) $ fedpkg co -B kernel </code>
* <code> (as your user) $ fedpkg co -B kernel --anonymous</code>


This will create a kernel/ subdirectory hierarchy under your current working dir with a dir for each Fedora branch, the rawhide
This will create a kernel/ subdirectory hierarchy under your current working dir with a dir for each Fedora branch, the rawhide
Line 30: Line 30:


* <code> kernel/f14/x86_64 # yum localinstall --nogpgcheck ./kernel-$version.rpm </code>
* <code> kernel/f14/x86_64 # yum localinstall --nogpgcheck ./kernel-$version.rpm </code>
== Updating ==
* <code> $ cd kernel/f14 </code>
* <code> kernel/f14 $ git status </code>
** your tree will be dirty in the configs and kernel.spec
* <code> kernel/f14 $ git stash </code>
** puts aside your changes so your tree will be clean
* <code> kernel/f14 $ git pull origin </code>
** update to the latest tree from fedpkg git
* <code> kernel/f14 $ make release </code>
** switch back to non-debugging...


== Gotchas ==
== Gotchas ==


Please run a Fedora built debugging kernel when you report bugs, as they contain invaluable debugging information to assist developers.
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.

Latest revision as of 02:27, 10 September 2010


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.