12

We're trying to build a piece of software that demands the kernel source, not just the headers. So we downloaded the kernel source via the centos src rpm.

However the autoconf.h is missing.

We tried

  • Put the .config in place (copied the one from /boot).

  • run make oldconfig

So what is creating the autoconf.h file? Do we actually have to build the kernel?

SaveTheRbtz
  • 5,761
Stefan
  • 223

2 Answers2

16

The file include/generated/autoconf.h is generated in the make prepare step. If you are trying to build a kernel module, you will also need the make scripts step:

gunzip < /proc/config.gz > .config
make oldconfig
make prepare
make scripts

Usually the kernel is accompied with a headers package, have you tried installing that first? For CentOS, try installing the kernel-devel package. Details can be found on http://wiki.centos.org/HowTos/I_need_the_Kernel_Source

Lekensteyn
  • 6,445
0

The file autoconf.h is automatically generated during the build process from the .conf file. Many kernel source files use autoconf.h.