编译Rockeylinux-8.5内核代码

 yumdownloader --source kernel

下载的源码包为

kernel-4.18.0-372.9.1.el8.src.rpm

rpm -ivh  kernel-4.18.0-372.9.1.el8.src.rpm

拷贝tar包目录

cp /home/wy/rpmbuild/SOURCES/linux-4.18.0-372.9.1.el8.tar.xz  ~/code/

cp ~/rpmbuild/SOURCES/x509.genkey ~/linux-4.18/certs/

cd ~/rpmbuild/SOURCES/

openssl x509 -inform der -in rockydup1.x509 -out rockydup1.pem

openssl x509 -inform der -in rockykpatch1.x509 -out rockykpatch1.pem

cat rockydup1.pem rockykpatch1.pem > rocky.pem

pwd

cd ~/linux-4.18/

cp /home/wy/rpmbuild/SOURCES/rocky.pem ./certs/

ls

ls certs/

cd ..

拷贝编译的配置文件

~/linux-4.18.0-372.9.1.el8 cp ../config-4.18.0-372.9.1.el8.x86_64 .config

make  -j16

一路回车就可以

make modules_install

make install

reboot

遇到的问题:

make[2]: *** No rule to make target needed by ‘certs/x509_certificate_list’. Stop

解决办法:

cp ~/rpmbuild/SOURCES/x509.genkey ~/linux-4.18/certs/

cd ~/rpmbuild/SOURCES/

openssl x509 -inform der -in rockydup1.x509 -out rockydup1.pem

openssl x509 -inform der -in rockykpatch1.x509 -out rockykpatch1.pem

cat rockydup1.pem rockykpatch1.pem > rocky.pem

pwd

cd ~/linux-4.18/

cp /home/wy/rpmbuild/SOURCES/rocky.pem ./certs/

重新编译内核

参考链接:

» Fedora / RedHat / CentOS7 / CentOS8 – compiling the latest kernel – updated 2020-01 | dwav
es.de

Signed kernel module support - Gentoo Wiki

Kernel module signing facility — The Linux Kernel documentation

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值