First, download the CentOS source code
1.1 Viewing the CentOS version
Cat/etc/issue
1.2 Viewing the Linux kernel version
Uname-r
1.3 Downloads
File name: kernel-2.6.32-220.el6.src.rpm
: http://vault.centos.org/6.2/os/Source/SPackages/
Official website: http://vault.centos.org/
1.4 Obtaining source code from KERNEL-2.6.32-220.EL6.SRC.RPM
1. Rpm-i kernel-2.6.32-220.el6.src.rpm
2. Next generation in/root/rpmbuild/sources directory: linux-2.6.32-220.el6.tar.bz2
3. Tar jxvf linux-2.6.32-220.el6.tar.bz2
Second, compile-time errors
Compile kernel Source: http://blog.csdn.net/guowenyan001/article/details/38704775
will produce an error.
2.1 Error phenomena
arch/x86/kernel/apic/apic.c:819:error: ' Nmi_watchdog undeclared ' (first use in thie function)
Problem Solving Reference: https://forums.gentoo.org/viewtopic-t-944366-start-0.html
2.2 Solutions
Use the. config of the OPENVZ official website and no longer configure it yourself. The. config for Config,openvz official website supports the KGDB option.
OPENVZ official website. config:http://download.openvz.org/kernel/branches/rhel6-2.6.32/042stab053.5/configs/ Config-2.6.32-042stab053.5.x86_64
Resources:
Where to download the source code for the CentOS Linux kernel: http://www.2cto.com/os/201404/293174.html
Transferred from: http://blog.csdn.net/guowenyan001/article/details/39376297
"Go" Linux centos kernel compilation: Download CentOS source code, compile 2.6.32-220 errors (apic.c:819 error ' numi_watchdog ' undeclared)