kernel 源码升级

kernel 源码升级

1.下载kernel源码包
wget http://mirrors.163.com/kernel/v5.x/Linux-5.7.1.tar.gz

2.编译
make mrproper #去掉原kernel中所有的*.o文件
make menuconfig #配置内核,生成.config文件,只需要点击save保存退出即可,不然会报错:找不到.config文件
make -j4 #编译内核,等同于make bzImage;make modules
make modules_install #安装模块
make install #安装内核

可能会遇到的错误
1.modules.order:No such file or directory
=>make modules #集合modules,生成modules.order

2.make[1]: *** No rule to make target 'certs/rhel.pem', needed by 'certs/x509_certificate_list'. Stop.
make: *** [Makefile:1729: certs] Error 2
=> 打开.config,注释掉这一行
CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"

3.BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
make: *** [Makefile:1113: vmlinux] Error 1
=>修改CONFIG_DEBUG_INFO_BTF=n

上一篇:onlyoffice启用HTTPS


下一篇:mailx使用465端口发邮件