sudo apt-get install kernel-package fakeroot build-essential libssl-dev git
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo sed -i 's/# deb-src/deb-src/g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get build-dep linux-image-$(uname -r)
apt-get source linux-image-$(uname -r)
或
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-<release codename>.git
chmod a+x debian/rules
chmod a+x debian/scripts/* chmod a+x debian/scripts/misc/* fakeroot debian/rules binary-headers binary-generic binary-perarch //quicker build 或 fakeroot debian/rules binary //if you need linux-tools or lowlatency kernel,run instead