ENV:
[root@Fedora32 hellc]# uname -r
5.6.6-300.fc32.x86_64
[root@Fedora32 hellc]# cat /etc/redhat-release
Fedora release 32 (Thirty Two)
kernel的升级大多采用的是系统版本自带的升级方式,这样的升级方式就是方便,一个命令直接全程搞定,不需要另外的操作,但是笔者最近总看着kernel官方更新很是频繁,但是系统自带的更新方式最不能更新到自己想要的最新stable版本,这让人很不舒服,只能自己来安装操作下了。
下面这段内容是操作安装过程中重要的几个内容,其实操作的也不是很多啊!!
官方帮助文档内容
xz -cd linux-5.x.tar.xz | tar xvf -
- Make sure you have no stale .o files and dependencies lying around::
cd linux
make mrproper
源码文件夹和编译文件夹
kernel source code: /usr/src/linux-5.x
build directory: /home/name/build/kernel
编译过程
To configure and build the kernel, use::
cd /usr/src/linux-5.x
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install
Please note: If the ``O=output/dir`` option is used, then it must be
used for all invocations of make.
一、下载自己想要的kernel源码包
注:建议使用root用户进行编译安装
[root@Fedora32 hellc]# rz
rz waiting to receive.
Starting zmodem transfer. Press Ctrl+C to cancel.
Transferring linux-5.8.7.tar.xz...
100% 111810 KB 12423 KB/sec 00:00:09 0 Errors
或:
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.7.tar.xz
二、解压源码包
[root@Fedora32 hellc]# tar -xJf linux-5.8.7.tar.xz
[root@Fedora32 hellc]# cd linux-5.8.7/