About Archive Tags RSS Feed

 

Sorry I'm late. Work was murder.

24 June 2008 21:50

I've spent a few hours recently looking at building RPM packages of GNU/Linux kernels, which has been a frustrating process.

There are many many online guides which give the impression that this is actually a pretty complex process. For example How To Compile A Kernel - The CentOS Way guide. (Did I mention how bad most of the howtoforge guides are recently?)

So, after fiddling around for an afternoon and getting lost I decided to abandon the process.

Here is a tested process for building a binary RPM kernel package:

cd linux-2.6.24.7/
make rpm

Yes this works just fine upon a Centos 5.x machine - I'm used to using make-kpkg to make a Debian kernel package, but it seems that if you just visit kernel.org and download the latest version you can build a RPM without any extra effort thanks to native support. Cool.

Now I need to work out how to create, host, and update a YUM repository. That looks fiddly and annoying too. XML. Eww. Any guides are most welcome - ultimately I need to package and host a "recent" kernel for Centos 4.x, Centos 5.x and Fedora Core 6-9 - each for i386 + amd64.

ObQuote: Spiderman

| 3 comments

 

Comments on this entry

icon Ben Hutchings at 16:51 on 24 June 2008
I recently went through this at work so we can test our in-tree driver in the form distributions are likely to use it. I found that the RPM's postinst script (or whatever the RPM equivalent is) does not generate an initrd. And the necessary commands differ between distributions, which may be why this isn't done.
icon Steve Kemp at 16:54 on 24 June 2008

In our case this isn't required - either the kernels are installed purely to satisfy dependencies, or our imaging system takes care of creating the initial ramdisk as part of the installation.

Definitely worth knowing though, and something I hadn't spotted myself.

icon Claire Connelly at 07:14 on 1 July 2008
Actually, setting up a YUM repo is pretty trivial. There are scripts (notably createrepo) that do all the heavy lifting for you -- all you have to do is set up a directory structure, then run createrepo with the right arguments.