On 11/18/2015 06:46 AM, Tino Mettler wrote:
Hi, I want to build an external module out-of-tree. I tried this: make -C <kernel-source> KBUILD_OUTPUT=<out-of-tree-path> M=<external-module> modules However, the result is put to the source path specified by M=, whereas a normal kernel build (without M=) but otherwise same parameters puts the result to <out-of-tree-path>. Any hints what I'm doing wrong? Regards, Tino -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
When building a module out of tree, I set up a directory in which the source and Make file reside. I don't use KBUILD_OUTPUT and set M to $$PWD. I do the build in the directory specified by M and the result is put in that directory. This is pretty much exactly what is defined in the Kbuild documentation in kbuild/modules.txt (see the examples in sections 3.1-3.3). Are you looking for something else?
-- David VL -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html