Skip to contentSkip to conversation

out-of-tree build with external module

DISCUSSION Tino Mettler 3 participants 3 messages Nov 18, 2015 – Nov 19, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 12 lines · Tino Mettler

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?

Quoted 8 lines

Regards,
Tino

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
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?

Signature · 1 line
David VL
#2 lore raw
In reply to Tino Mettler
Quoted 9 lines · Tino Mettler

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