[Buildroot] Cross compiling kernel module for the target
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Thu Dec 20 08:04:11 UTC 2018
Hello,
On Thu, 20 Dec 2018 08:39:26 +0100, Łukasz Przeniosło wrote:
> obj-m := simp.o
> KERNELDIR ?= /home/lukasz/brl/Machine/beaglebone/build/linux-headers-a75d8e93056181d512f6c818e8627bd4554aaf92
This should point to output/build/linux-<version>/ and not
output/build/linux-headers-<version>/.
> CC [M] /tmp/test/simp.o
> In file included from <command-line>:0:0:
> ././include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h:
> No such file or directory
> #include <generated/autoconf.h>
As explained above, this is because you're using the linux-headers
source, which is not "configured" (i.e no kernel configuration has been
applied to it), and building a kernel module requires a configured
source tree.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list