fakeuname
I recently needed to compile a proprietary kernel module for a different kernel than was currently running. There were multiple Makefiles involved and several references to header and kernel object directories based on “uname -r”.
Why didn’t I just boot the target kernel version? Well, the module is a driver for a specific device required for a certain service. Rebooting into the new kernel before building the new module would have caused more downtime for the service.
As I didn’t want to carefully edit several Makefiles and other files, I did a quick web search and found fakeuname. It worked fine and enabled me to fix some other unexpected compile errors, before shutting down the service. So I didn’t need to manually tamper with the version detection and still had minimal service downtime.