一、准备好编译需要的工具 automake、make、g++(包含gcc)、bison、flex、libelf-dev、libssl-dev、bc。 懒人模式三条命令: sudo apt install -y automake make g++ bison flex libelf-dev libssl-dev bc sudo apt install build-essential libncurses5-dev -y sudo apt-get build-dep linux 二、步骤 1、先到清华大学镜像源:https://mirror.tuna.tsinghua.edu.cn/kernel/v5.x/, 下载内核源码 linux-5.6.12.tar.gz文件, 2、解压(提取)tar zxvf kernel-5.6.12.tar.gz, cd linux-5.6.12 进入内核源码文件夹目录。 3、配置: make menuconfig Tab 键选择 Save 即可。 4、编辑一下生成的隐藏文件 .config,把以下这行KEY的值改成空: CONFIG_SYSTEM_TRUSTED_KEYS="" 5、然后,禁用签名验证,下面两条命令: scripts/config --disable MODULE_SIG scripts/config --disable DEBUG_INFO 6、最后,生成 deb 包: make deb-pkg 7、deb 包生成完了就安装: dpkg -i linux-headers-*_amd64.deb dpkg -i linux-image-*_amd64.deb dpkg -i linux-libc-dev*.deb 8、重启 deepin V20,新版本5.6.12内核就可以用了。 ############################################################ 三、其它事项 重启,检查新内核: uname -r 删除旧内核: sudo apt remove --purge linux-image-5.3.0-3-amd64 不确定的话可以先查看有哪些旧内核: dpkg -l | grep linux-image | awk '{print$2}' 此命令我得到两条结果: linux-image-5.3.0-3-amd64-unsigned linux-image-5.6.12 linux-image-deepin-amd64 注意:惊喜发现自动删除了系统原来自带的第一个4.19.*旧版本内核了,只保留最新的两个。 |