[elrepo] Compile kernel-ml for centos 7

Akemi Yagi toracat at elrepo.org
Tue Sep 30 12:13:14 EDT 2014


On Tue, Sep 30, 2014 at 6:00 AM, Aaron Siegel <admin at siegel-tech.net> wrote:
> Hello
>
> I am needing to recompile the kernel-ml for a centos 7 installation. I
> have been using Linux/FreeBSD user for 17 in that time I have compiled
> may kernels. I have usually compile using step similar
> http://www.howtoforge.com/kernel_compilation_centos
>
> The centos wiki advises against using the this methods and then provides
> an incomplete instruction on how to perform the process
> http://wiki.centos.org/HowTos/Custom_Kernel

That CentOS wiki article needs to be updated to accommodate CentOS-7
(it's in the works). It is currently for CentOS-5 and -6 only.

> I downloaded the the src rpm (or nosrc) from the elrepo this package
> appears to install the kernel again. I do not see it in ~/rpmbuild
> directory. I guess the nosrc means it does not contain the src tree.

Yes, you need to download the src.rpm from a nearby repo manually and
install it. But please follow the instructions on:

 http://wiki.centos.org/HowTos/I_need_the_Kernel_Source
 Section 2. If you really need the full kernel source

Then the kernel tree will be in ~/rpmbuild.

> What is the recommend procedure for compiling kernel-ml for centos? I
> want the kernel to be as close to the centos kernel as possible but of
> course with the exception of the patches I apply and a couple of changes
> in the config.

To build kernel-ml, download the kernel source tarball from kernel.org:

https://www.kernel.org/  (click on the "Latest stable kernel" button)

and put the tarfile in the ~/rpmbuild/ SOURCES directory. You now
should be able to build the kernel.

Akemi


More information about the elrepo mailing list