After building of the official kernel (using the source_sync.sh tool got the kernel sources). I want to build my kernel module. According to NVIDIA Jetson Linux Driver Package Software Features : Kernel Customization | NVIDIA Docs, my case should be “to use a manually built NVIDIA kernel source tree”, right? So, I use the same source tree (under Linux_for_Tegra/sources/kernel/kernel-4.9) when building the kernel to build the module. But it says:
In file included from <command-line>:0:0:
././include/linux/kconfig.h:4:10: fatal error: generated/autoconf.h: No such file or directory
#include <generated/autoconf.h>
^~~~~~~~~~~~~~~~~~~~~~
Did you first fully configure that source to match your running system? For example, “make tegra_defconfig” from the source content location? I’m not positive, but it sounds like it was unconfigured. You might even do a “sanity check” and see if within that source code of the kernel you can build the “Image” target. If that builds, then you know it is configured.
Incidentally, you can always set the source to “pristine” (and without any configuration) via “sudo make mrproper” (I use sudo assuming you are building source in a location needing root permissions to access…skip sudo if that is not the case).
I am unable to answer that. Generally speaking though, the kernel uses Kconfig, and I’m not positive, but perhaps the autoconf content is from the out of tree module. The next step would be to find out if the module you are building is compatible with the source code release version being used.