linux-source-$(uname -r)

Matt Zimmerman mdz at
Wed Oct 11 04:08:44 BST 2006

On Sun, Oct 08, 2006 at 11:29:42PM -0400, Ben Collins wrote:
> On Sun, 2006-10-08 at 13:10 -0500, Rocco Stanzione wrote:
> > One of the (very few) things I still miss coming from another distro is the 
> > ability to install the patched, configured, ready-to-go source of my running 
> > kernel, using the package manager.  There's a wiki page dedicated to building 
> > a custom kernel, and it offers two choices for getting the source: install 
> > the linux-source-2.6.17 package, which will always be out of date, or use 
> > git, which also will not give me the source of the running kernel.
> Not true. After getting the git repo, do:
> export CURRENT_VER="Ubuntu-$(cat /proc/version_signature | sed 's/Ubuntu \(.*\)-[^-]*$/\1/')"
> export CURRENT_FLAVOUR="$(uname -r | sed 's/.*-\([^-]*\)$/\1/')"
> git-branch $CURRENT_VER my_kernel
> git-checkout -f my_kernel
> fakeroot debian/rules binary-debs flavours=$CURRENT_FLAVOUR
> The kernel will end up in debian/build/, and will be built from the same
> source and config as your running kernel.

That's interesting to know (and should be added to the documentation), but
surely it's simpler to use the linux-source binary package, no?

 - mdz

More information about the ubuntu-devel mailing list