====== Kernel 2.6.18 linux/config.h problem ====== If you want to compile a kernel module with the new 2.6.18 kernel, you may encounter this error message: <code console> linux/config.h: No such file or directory </code> This may happen even if you have your kernel headers installed (having your whole kernel sources won't help either). This is because the module you're trying to build requires the <color green>''linux/config.h''</color> file, which has been deprecated for some time now, and has been removed from the kernel tree since 2.6.18. There are a couple of solutions to this problem : * 1) Recreate the <color green>''linux/config.h''</color> file in your kernel tree. It's just 4 lines long: <code c> #ifndef _LINUX_CONFIG_H #define _LINUX_CONFIG_H #include <linux/autoconf.h> #endif </code> The location of this file is, under Fedora Core, is something like <color green>''/usr/src/kernels/<kernelversion>/include/linux/config.h''</color>. * 2) Modify the source files of the module you're trying to compile and replace any <code c> #include <linux/config.h> </code> occurence by: <code c> #include <linux/autoconf.h> </code> * 3) Modify the makefile to use the <color red>-imacros</color> command line options, and remove each <color green>''linux/config.h''</color> references in the source files. This is supposed to be the right thing to do, but you may prefer using one of the two first solutions: the latest is just the one that should be used by the actual kernel module developers. ~~META:date created = 2006-11-19 11:39:00~~

 
blog/kernel_2.6.18_linux_config.h_problem.txt · Last modified: 08/03/2010 13:25 (external edit) · []
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki