Compiling a kernel in a ppa can take a few tricks. Here is how I do it:

  • Grab the pristine kernel for the release you want, and/or check out a new branch for your work:

git clone git://
cd ubuntu-natty
git co -b mytest
  • <hackhackhack> and commit your changes as usual

git status | grep modified | awk -F: '{ print $2 }' | xargs git add
git commit -s -m 'My test'
  • Make sure the tree is clean and ready

fakeroot debian/rules clean
  • Now create a packaging changelog entry. If the previous entry was 2.6.38-9.43, then I might call my test 2.6.38-9.43creds1.

dch -i
  • *Important* - copy your changelog entry from debian/changelog into debian.master/changelog.
  • Make sure that the ppa will skip module and ABI checking
    • Add the following lines to debian/rules:

export skipmodules=true
export skipabi=true
  • set skipmodule to 1 in debian/scripts/module-check, so it starts with:

$flavour = shift;
$prev_abidir = shift;
$abidir = shift;
$skipmodule = 1;
  • Build the kernel source package using the following command:

dpkg-buildpackage -S -sa -rfakeroot -I.bzr -I.git -I.gitignore -i"\.git.*"

(Thanks to Sarvatt and tgardner for the info about ignoring VCS files)

  • You can also test-build locally using

fakeroot debian/rules binary-generic

to save having to deal with errors when building in ppa.

  • Finally push the package to your ppa.

cd ..
dput ppa:myuser/ppa *.changes

To compile on your own system, just do:

fakeroot debian/rules clean
fakeroot debian/rules binary-generic

or if you also need ddebs (thanks Sarvatt):

fakeroot debian/rules binary-generic skipdbg=false

SergeHallyn_ppakernels (last edited 2012-08-28 16:09:48 by serge-hallyn)