当前位置: 首页 > article >正文

ubuntu编译龙蜥6.6内核源码

1.下载龙蜥内核源码

1.备份apt源

mv /etc/apt/sources.list  /etc/apt/sources.list.bak   

2.配置阿里云apt源

sudo bash -c "cat << EOF > /etc/apt/sources.list && apt update
   deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
   deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
   deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
   deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
   deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
   deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
   deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
   deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
   deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
   deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
   EOF"

3.安装git

sudo apt update 
sudo apt install git

4.下载龙蜥内核源码

git clone https://gitee.com/anolis/cloud-kernel.git -b release/release-6.6.52-2.y
cd  cloud-kernel-release-release-6.6.52-2.y

2.编译6.6.52内核

1.安装编译内核时依赖需安装包:

sudo apt update
sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev bc rsync cpio liblz4-tool zstd libncurses5-dev coreutils  debhelper

2.编译内核

sudo make menuconfig
sudo make -j8
sudo make modules_install
sudo make install
 sudo update-grub

3.报错1:如果报错显示

make[1]: *** [/home/a/cloud-kernel-release-release-6.6.52-2.y/Makefile:1921:.] 错误 2
make: *** [Makefile:234:__sub-make] 错误 2

就需要执行make显示如下报错

a@a-Lenovo-Product:~/cloud-kernel-release-release-6.6.52-2.y$ make
  CALL    scripts/checksyscalls.sh
  DESCEND objtool
  INSTALL libsubcmd_headers
make[3]: *** 没有规则可制作目标“debian/canonical-certs.pem”,由“certs/x509_certificate_list” 需求。 停止。
make[2]: *** [scripts/Makefile.build:480:certs] 错误 2
make[1]: *** [/home/a/cloud-kernel-release-release-6.6.52-2.y/Makefile:1921:.] 错误 2
make: *** [Makefile:234:__sub-make] 错误 2

需要禁用.config下的certs.pem

sudo vim .config
禁用如下:
#CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
# CONFIG_MODULE_SIG_KEY_TYPE_ECDSA is not set
CONFIG_SYSTEM_TRUSTED_KEYRING=y
#CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"
CONFIG_SYSTEM_EXTRA_CERTIFICATE=y
CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096
CONFIG_SECONDARY_TRUSTED_KEYRING=y
CONFIG_SYSTEM_BLACKLIST_KEYRING=y
CONFIG_SYSTEM_BLACKLIST_HASH_LIST=""
CONFIG_SYSTEM_REVOCATION_LIST=y
#CONFIG_SYSTEM_REVOCATION_KEYS="debian/canonical-revoked-certs.pem"

在这里插入图片描述


http://www.kler.cn/a/488094.html

相关文章:

  • 新兴的开源 AI Agent 智能体全景技术栈
  • 详细分析 Git 分支重命名与同步操作
  • 详解Sonar与Jenkins 的集成使用!
  • Vue进阶(贰幺贰)npm run build多环境编译
  • Ubuntu 20.04安装gcc
  • 国产游戏崛起,燕云十六移动端1.9上线,ToDesk云电脑先开玩
  • Swin Transformer模型详解(附pytorch实现)
  • AAAI2023《Controllable Image Captioning via Prompting》
  • 小程序与内嵌网页的数据通信
  • 数据集-目标检测系列- 石榴 检测数据集 pomegranate >> DataBall
  • docker 安装 fastdfs
  • hive迁移后修复分区慢,怎么办?
  • 学前端 4 个月想进中厂,该怎么做?
  • Shader->LinearGradient线性渐变着色器详解
  • 如何提升scrapy的效率
  • 理解 Tomcat 架构
  • SpringBoot多数据源架构实现
  • RocketMQ 和 Kafka 有什么区别?
  • 【Maui】导航栏样式调整
  • LLaMA-Factory web微调大模型并导出大模型
  • 计算机网络基础——网络协议
  • 科大讯飞Java面试题及参考答案 (120道-上)
  • MySQL8 使用 ProxySQL 来实现 MySQL 主从同步的读写分离和负载均衡
  • 一分钟了解git全局配置
  • 03_Redis基本操作
  • CTF随题思路—MiscMeowMeowMeow