In this video, we cover out-of-tree module building and kernel module debugging.
Source for module: Attached
OOT modules are generally a bad idea - unnecessarily complicated to maintain - especially when you wanna have a *reliable* build+deployment process (which you wanna have for industrial purposes)
Instead properly patch up the kernel tree and try to get your patches to mainline.