This is the basis of the kABI tracking kmod package - to provide updated device drivers and other file system support, for example. One feature of the CentOS kernel is that its ABI will be preserved for the entire life of the product and an advantage of having a consistent ABI is that external kernel modules can be built which are independent of the kernel version - hence they do not need to be rebuilt for each new kernel released. The final step is to copy the entire contents of the configs/ directory to the ~/rpmbuild/SOURCES/ cp configs/* ~/rpmbuild/SOURCES/ Note: The characters around uname -m are 'backticks', not apostrophes. config configs/kernel-3.10.0-`uname -m`.config This is basically the opposite of the earlier copy cp. config file back to the configs/ directory. Note that there must be a space between the hash symbol and the hardware platform descriptor.Īdd, as the first line of the. It needs to be commented out with a # and must be the first line of the file. This will be x86_64 for the 64-bit architecture. Next, add a line that contains the commented out equivalent of the hardware platform to the top of the configuration file (equivalent to the output returned by a uname -i command) just before you copy it back to the configs/ directory. Now please refer to the Build Your Own Kernel Modules tutorial. If you have installed the full kernel source to build a kernel module, you should stop at this point. If you have any kernel patches to add, copy them to your ~/rpmbuild/SOURCES/ directory now. Note that it is always wise to have a current and tested backup of any content which you are not willing to lose. For more details on this topic, see Section 3, Broken Virtual Server CentOS wiki article. One should understand that while the CentOS project does not endorse using such excludes, some vendors do not permit user modified kernels to run in their supported environment. If there are any 'exclude' lines referring to the kernel and related packages in the yum configuration files, they will also need to be removed. Whist running the above yum commands note if there are any exclude references. You should follow the instructions in Section 2 of I Need the Kernel Source. Yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel Yum install qt3-devel (This is only necessary if you wish to use make xconfig instead of make gconfig or make menuconfig.) To be able to perform a successful kernel build, you will need to install the following packages: For example, you can find one for CentOS-7 here. NOTE: If you would like to see a real world example of a custom kernel, get one of the srpm packages for the centosplus kernel. A good reference for building a mainline kernel is the book Linux Kernel in a Nutshell.) That site is not endorsed, as it details building as root which is unsafe and flawed in its approach. (If you wish to build a mainline kernel, do not follow How To Compile A Kernel. This tutorial will cover the building of a kernel from the CentOS sources with your own options or modifications. One is to build a kernel with custom options from the CentOS sources and the other is to build a mainline kernel using sources obtained from The Linux Kernel Archive. There are two ways to build a custom kernel for CentOS. If you break the kernel, or your system, you get to keep it and, as a bonus, you get to keep all the pieces & the associated crying about how your system doesn't boot. Is the functionality you need available in the CentOS-Plus kernel, which can be found in the CentOSPlus Repository ?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |