The following first to download the source code of the kernel components:
http://vault.centos.org/6.9/os/Source/SPackages/
then mounted on the machine current centos compile dependencies for packages
yum install rpm-build RedHat-RPM-config AsciiDoc hmaccalc Perl-the ExtUtils-the Embed pesign xmlto
Audit-libs-devel binutils-devel elfutils-devel elfutils-libelf-devel
the ncurses-devel newt-devel numactl-devel pciutils-devel Python-devel zlib-devel BC OpenSSL -devel libssl-dev -y
Finally, by mounting the downloaded source package rpm, then the following command to generate source code (including source code and extracting kenrel playing Patch)
CD ~ / the rpmbuild / the SPECS
the rpmbuild -bp --target = $ (the uname -m) kernel.spec
The last generation can make the linux kernel source code