Centos compile the source code

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/tiantao2012/article/details/100170138

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

Guess you like

Origin blog.csdn.net/tiantao2012/article/details/100170138