out-of-tree build with external module

3 messages, 3 authors, 2015-11-19 · open the first message on its own page

out-of-tree build with external module

From: Tino Mettler <hidden>
Date: 2015-11-18 14:50:27

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

Re: out-of-tree build with external module

From: dvomlehn@gmail.com <hidden>
Date: 2015-11-18 20:22:54

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@vger.kernel.org
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

Re: out-of-tree build with external module

From: Michal Marek <hidden>
Date: 2015-11-19 10:29:38

On 2015-11-18 15:46, 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>.
The combination of M= and O= is not supported by kbuild.

Michal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help