linux-source-$(uname -r)

Ben Collins ben.collins at ubuntu.com
Mon Oct 9 04:29:42 BST 2006


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.




More information about the ubuntu-devel mailing list