From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Thu, 20 Dec 2018 09:04:11 +0100 Subject: [Buildroot] Cross compiling kernel module for the target In-Reply-To: References: Message-ID: <20181220090411.7ab00f70@windsurf> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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-/ and not output/build/linux-headers-/. > CC [M] /tmp/test/simp.o > In file included from :0:0: > ././include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: > No such file or directory > #include 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