[Buildroot] Cross compiling kernel module for the target

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Dec 20 09:20:59 UTC 2018


On Thu, 20 Dec 2018 10:14:41 +0100, Łukasz Przeniosło wrote:
> Thomas, sorry for the Cc, its there now.
> No, my module is supposed to be a completely separate thing for now. I
> intend to build it using cross compilation tools provided by build root
> after the image is loaded to the target. I want to load the module using
> insmod. Then after the module is stable, I could add it to the buildroot
> config.

You cannot build a kernel module out of nowhere, it has to be compiled
against a kernel source tree with configuration, or a kernel headers
tree with configuration. In the context of Buildroot, only the former
exists, so if you don't build your Linux kernel with Buildroot, you
cannot build a kernel module with Buildroot.

Best regards,

Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering

More information about the buildroot mailing list