Skip to content

Instantly share code, notes, and snippets.

@rightson
Last active May 20, 2016 21:49
Show Gist options
  • Save rightson/d61ff68fb536fd74dae4dde61f9b62d7 to your computer and use it in GitHub Desktop.
Save rightson/d61ff68fb536fd74dae4dde61f9b62d7 to your computer and use it in GitHub Desktop.
apt-get source linux-image-$(uname -r)
apt-get build-dep linux-image-$(uname -r)
# let kernel config be tailored to your current hardware (skip lots of unnecessary drivers)
lsmod > /tmp/lsmod
make LSMOD=/tmp/lsmod localmodconfig
# simple build
fakeroot make -j #CPU
# or, use official recommendation:
chmod a+x debian/scripts/*
chmod a+x debian/scripts/misc/*
fakeroot debian/rules clean
fakeroot debian/rules editconfigs
fakeroot debian/rules clean
fakeroot debian/rules binary-headers binary-generic -j=#CPU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment