What is creating the generated/autoconf.h?

Solution 1:

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