I would like to build a kernel module without the kernel source tree.
For that, I specified the kernel header directory only.
This reference link tell me it should be workable :
build kernel module w/o source tree
But some other reference links tell me I should build my kernel module with full kernel source tree!
My questions are :
Not it's not necessary. You need a header files that contains function and types declarations. You also kernel tree with Makefiles and Kconfig but without sources. This kernel tree is needed by kbuild - kernel building system.
Absolutely not. You can build a single module without building whole kernel regardless of it's out-of-tree or in-tree module.