Kernel Headers

Doing any work with the raspberry Pi kernel requires the kernel headers. On most systems this is a simple case of using a kernel-headers style package from the package manager however when using the rpi-update tool to keep the firmware and kernel up to date the packaged kernel headers package doesn't match up with the kernel.

I've found the script on https://gist.github.com/azbesthu/3893319 provides a good method of getting suitable kernel headers for the Pi.