Compile Version of Linux Kernel 5.10.x

[ad_1]
ELRepo Project The kernel version provided has always been relatively stable, and kernel-ml has always provided the rpm installation package of the latest version of the kernel.
But kernel-ml always no longer provides the old version after the new major version comes out. Kernel-lt is still updating the previous longterm version 5.4 and has not switched to the latest longterm version 5.10.
Kernel-ml branches 5.10 to 5.10.16 will no longer be updated.
So I wondered if I could compile it myself, and I took this opportunity to learn how the ELRepo Project compiles the Linux kernel.
After finding the old versions of kernel-ml-5.10.16-1.el7.elrepo.nosrc.rpm and kernel-ml-5.10.16-1.el8.elrepo.nosrc.rpm, the tossing process can be skipped. mentioned. In short, the latest version of 5.10.x is compiled based on this.
Linux Kernel 5.10.x compiled version
More old version download addresses
https://dl.lamp.sh/kernel/
1. Download address for CentOS 7
kernel-ml-5.10.170-1.el7.x86_64.rpm
kernel-ml-devel-5.10.170-1.el7.x86_64.rpm
kernel-ml-headers-5.10.170-1.el7.x86_64.rpm
kernel-ml-tools-5.10.170-1.el7.x86_64.rpm
kernel-ml-tools-libs-5.10.170-1.el7.x86_64.rpm
kernel-ml-tools-libs-devel-5.10.170-1.el7.x86_64.rpm
perf-5.10.170-1.el7.x86_64.rpm
python-perf-5.10.170-1.el7.x86_64.rpm
Generally, you only need to download the first 3 rpm files.
kernel-ml-5.10.170-1.el7.x86_64.rpm
kernel-ml-devel-5.10.170-1.el7.x86_64.rpm
kernel-ml-headers-5.10.170-1.el7.x86_64.rpm
After the download is complete, execute the following command to install:
# yum localinstall kernel-ml-*
After successful installation, execute the following command to view the list of kernels that already exist on this machine:
# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /boot/grub2/grub.cfg
Return value example:
0 : CentOS Linux (5.10.170-1.el7.x86_64) 7 (Core) 1 : CentOS Linux 7 Rescue b2206184ea3c4d8a9be703c8e6b739ab (3.10.0-1127.13.1.el7.x86_64) 2 : CentOS Linux (3.10.0-1127.13.1.el7.x86_64) 7 (Core) 3 : CentOS Linux (0-rescue-00a62363617944e08db8db894ba6145e) 7 (Core)
Set to start the latest kernel (generally the latest installed kernel boot order is 0)
# grub2-set-default 0
Delete the rpm file.
# rm -fv kernel-ml-*
after that reboot
Restart the system and enter the system again, which will be the latest version of the kernel.
2. Download link for CentOS Stream 8 / Rocky Linux 8 / AlmaLinux 8, etc.
kernel-ml-5.10.170-1.el8.x86_64.rpm
kernel-ml-headers-5.10.170-1.el8.x86_64.rpm
kernel-ml-core-5.10.170-1.el8.x86_64.rpm
kernel-ml-devel-5.10.170-1.el8.x86_64.rpm
kernel-ml-modules-5.10.170-1.el8.x86_64.rpm
kernel-ml-modules-extra-5.10.170-1.el8.x86_64.rpm
kernel-ml-tools-5.10.170-1.el8.x86_64.rpm
kernel-ml-tools-libs-5.10.170-1.el8.x86_64.rpm
kernel-ml-tools-libs-devel-5.10.170-1.el8.x86_64.rpm
bpftool-5.10.170-1.el8.x86_64.rpm
perf-5.10.170-1.el8.x86_64.rpm
python3-perf-5.10.170-1.el8.x86_64.rpm
Generally, you only need to download the first 6 rpm files.
kernel-ml-5.10.170-1.el8.x86_64.rpm
kernel-ml-core-5.10.170-1.el8.x86_64.rpm
kernel-ml-devel-5.10.170-1.el8.x86_64.rpm
kernel-ml-modules-5.10.170-1.el8.x86_64.rpm
kernel-ml-modules-extra-5.10.170-1.el8.x86_64.rpm
kernel-ml-headers-5.10.170-1.el8.x86_64.rpm
After the download is complete, execute the following command to install:
# yum localinstall kernel-ml-*
After successful installation, execute the following command to view the existing kernel startup sequence of the machine:
# grub2-editenv list
Generally, the latest version of kernel information is returned. CentOS Stream 8 / Rocky Linux 8 / AlmaLinux 8 starts the latest kernel without manual settings.
saved_entry=bfc33522e0c000866700da6e23a667df-5.10.170-1.el8.x86_64 kernelopts=root=UUID=5cef9062-7b3c-439c-9248-fafd1014b1af ro crashkernel=auto net.ifnames=0 biosdevname=0 rhgb quiet boot_success=0
Delete the rpm file.
# rm -fv kernel-ml-*
after that reboot
Restart the system and enter the system again, which will be the latest version of the kernel.