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
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).
Sure, I successfully built my kernel. But it seems the “generated/autoconf.h” only exist in the out folder, but not the source folder. Why?
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.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.