1.报错情况(make -j$(nproc) deb-pkg | tee log)后查看日志报下面错误
debian/rules:6: recipe for target ‘build’ failed
scripts/Makefile.package:73: recipe for target ‘deb-pkg’ failed
Makefile:1430: recipe for target ‘deb-pkg’ failed
2.查了一圈我的理解:因为下载的实时内核和自己本身内核不一样,但是中间为了方便设置新内核的.config文件,是采用了cp -v /boot/config-$(uname -r) .config这个命令直接将本来的内核配置复制过去,但是有可能因为两个内核之间的配置项是不一致的,所以出现编译问题~(如果不对欢迎友友评价或留言批评指出)
3.我的整个安装过程严格参考
https://frankaemika.github.io/docs/installation_linux.html
然后我是在ubuntu18.04上面安装,所以我是装的5.4.*内核,具体*号取哪个版本,我是看的
https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.4/older/ 这里有什么版本和我相进就取哪个,因为我装了好几个版本,发现都是同样上面1的错误,同时看到有博客是说只要和自己内核前两位这个一样(eg:我的5.4.0-126,那可以选5.4.*都可以)应该都没问题,不用纠结。
4.上面报错解决方案:
https://askubuntu.com/questions/1327749
底下有一堆解决方案,我试过的方案:
(not work)
cd /path/to/your/kernel/source/file
sudo gedit .config
然后修改
SYSTEM_BLACKLIST_KEYRING = y
to
SYSTEM_BLACKLIST_KEYRING = N
(work)
cd /path/to/your/kernel/source/file
sudo gedit .config
修改下面语句(work)
CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem
# CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"
CONFIG_SYSTEM_TRUSTED_KEYS=""
5.补充warning的解决方案
problem:
warning: the frame size of 1040 bytes is larger than 1024 bytes。
Solution:
https://blog.youkuaiyun.com/ztguang/article/details/52924331
cd /path/to/your/kernel/source/file
sudo gedit .config
修改下面语句
CONFIG_FRAME_WARN=1024
#CONFIG_FRAME_WARN=1024 // alter this line
CONFIG_FRAME_WARN=4096