先查看内核版本
oldboy@oldboy:/usr/src/linux-source-4.15.0$ uname -a
Linux oldboy 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
下载对应版本kernel源码
sudo apt install linux-source-4.15.0
下载后的代码路径/usr/src/linux-source-4.15.0.tar.bz2
解压缩并进入源码目录:
sudo tar jvxf linux-source-4.15.0.tar.bz2
cd linux-source-4.15.0
安装kernel编译工具
sudo apt install kernel-package
sudo apt install libelf-dev
sudo apt install libssl-dev
编译
sudo make oldconfig
sudo make
sudo make modules
sudo make modules_install
网友评论