I'm needing to custom compile a kernel to enable some very specific hardware features that are not on by default and have to be compiled in. I started following this guide but it seems to be slightly outdated for 12.04 onwards as some commands fail with missing source packages.
https://help.ubuntu.com/community/Kernel/Compile
What is the easiest way to rebuild the current kernel source so I can tweak the options I need?
These steps are very general and apply to every package in Ubuntu/Debian.
This will download the source package and applies all Ubuntu patches.
Install all build dependencies.
Enter the directory of the source.
Do the changes to the source you need.
After finishing the edits, add a new version to the changelog (else it's going to complain the source doesn't match):
Build it with unsigned changes file and unsigned source package (for local testing):
This will take a while!
Find the packages one level below:
Install them like any other package.