Compiling From the current directory: $ make -C kernel-source/ M=$PWD Don't forget to set CROSS_COMPILE AND ARCH for cross-compilation, and O for out-of-tree builds! Formatting $ clang-format -i -style=file:kernel-source/.clang-format nunchuk.c