[Buildroot] Buildroot and kernel modules
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Wed Nov 12 21:03:01 UTC 2014
Dear Bryce Schober,
On Wed, 12 Nov 2014 11:26:00 -0800, Bryce Schober wrote:
> I reluctantly hijack this thread to ask a very closely related question: Is
> there a way to build an out-of-tree module like this using the
> buildroot-compiled linux headers, instead of the possibly-older
> toolchain-provided linux headers?
A kernel module is never built using the linux headers provided by the
toolchain. The linux headers provided by the toolchain only contain the
userspace part of the kernel headers, and they are therefore
insufficient to build kernel modules (which as their name suggest,
contain kernel code).
Therefore, when you do something like:
> > > define KERNELMODULE_BUILD_CMDS
> > > $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) M=$(@D) modules
> > > endef
It uses the kernel code in $(LINUX_DIR), and mainly the kernel headers
+ kernel configuration, to build your kernel modules.
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list