So I am patching my kernel to fix my Bluetooth and building using this guide https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
Why do I have to compile the entire kernel which takes about an hour?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
I'll assume your question is asking about the nature of the kernel, and why it would need recompiled.
The Linux kernel is a whole bunch of source code written in C. There is code available to handle an unbelievably huge number of computer hardware devices and chip sets, and more code that helps it adapt to different platforms other than the standard PC hardware. Then, there is the code that provides the overall structure of the thing at runtime.
Some of the code is mutually exclusive with other parts of the code, and you must choose one option or the other.
Some of the code is for special circumstances, which slows down the speed of the kernel for people who don't have those circumstances, and so you can set options that disable those bits of code.
When Ubuntu builds a kernel for "the masses", they take a guess at what hardware 99% of people will encounter and need. Then they divide as much as they can into loadable modules. Then they compile the main core of the kernel and ship that with most of the modules you'd need. They make other modules available with the package manager.
You didn't describe what was broken with your Bluetooth, but if someone said you need to build a new kernel, it probably means that one of those kernel options eliminated your ability to use a certain bluetooth chip. So, then you have to build a kernel which has that option enabled.
If you were lucky, you'd only need to build a bluetooth module with that new option. However, it can be very hard to get set up with the right compiler environment so that you end up with a new kernel module that correctly links into the existing kernel. In many cases its easier or more reliable to just recompile the whole thing.
Now, once you've done the first compile, small changes to the config will only need to recompile the few files that were affected, and it will be much faster. However, I suspect that
fakeroot debian/rules clean is throwing away the temporary files and making you start from scratch. I would suggest skipping that step the second time. Also, check if it is using all your processors when compiling. If not, look around for some way to tell it to compile in parallel. When compiling by hand, I use
make -j 20 which gives the fastest performance on a 4-core machine by compiling 20 files at a time.