Cloned from https://github.com/mariuz/kernelcompile