Using ketchup to quickly install kernel sources

ketchup is a neat utility to download and unpack a specific version of the Linux kernel sources into the current directory. It also does rather well on saving download bandwidth, i.e. if you have the 2.6.17 source tarball and ask for 2.6.18, it will only download the 2.6.17-to-2.6.18 patch.

Here’s a quick usage example, which installs the 2.6.21-rc7 kernel sources:

# emerge ketchup
# cd /usr/src
# mkdir linux-2.6.21-rc7
# cd linux-2.6.21-rc7
# ketchup 2.6.21-rc7

When ketchup has finished, you then have a clean set of kernel sources for that particular version in front of you.

I like to configure ketchup to use the same storage directory as portage, so that they can share kernel tarballs. In my ~/.ketchuprc I have:

archive = "/usr/portage/distfiles"

6 thoughts on “Using ketchup to quickly install kernel sources

  1. Alexandre

    Speaking of which, ketchup is orphaned since I retired (though I’m probably still listed in metadata.xml). It’d be nice if you or the kernel herd could take it, since I agree it’s a very useful software.

  2. dsd Post author

    Looks like there aren’t any newer versions available. I just asked arch teams to mark 0.9.8 stable.

  3. Wolfram Schlich

    Hmm, ketchup is broken regarding kernel_url — it does neither use kernel_url in ~/.ketchuprc, nor -k or –kernel-url nor KETCHUP_URL,
    as it is supposed to…

  4. Pingback: ketchup, or how to manage your kernel sources more efficiently « seg fault

Comments are closed.