OpenEuler2203编译打包升级高版本kernel6.6版本内核 |
发表者:admin分类:应用服务2024-07-17 10:15:04 阅读[279] |
OpenEuler2203编译打包升级高版本kernel6.6版本内核
一,使用以下方法,编译官方提供的内核版本。
git clone https://gitee.com/openeuler/kernel.git
cd kernel/
git checkout OLK-6.6
make openeuler_defconfig
make -j4
yum install elfutils-libelf-devel dwarves openssl-devel rsync -y
make binrpm-pkg -j64
cd kernel
rpm -ivh ./rpmbuild/RPMS/x86_64/kernel-6.6.0+-2.x86_64.rpm
yum install ./rpmbuild/RPMS/x86_64/kernel-headers-6.6.0+-2.x86_64.rpm
二,kernel内核官网最新版6.6.40编译方法
1,下载对应版本的内核源码包并解压
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/linux-6.6.40.tar.gz
tar -zxvf linux-6.6.40.tar.gz -C /usr/src/
2,下载openeuler官网内核源码打包文件
这里主要是借用内核编译配置文件,这样就不用编译时作选择了。
wget https://mirror.nju.edu.cn/openeuler/openEuler-24.03-LTS/everything/x86_64/Packages/kernel-source-6.6.0-28.0.0.34.oe2403.x86_64.rpm
rpm -ivh kernel-source-6.6.0-28.0.0.34.oe2403.x86_64.rpm
3,安装依赖包
yum -y install elfutils-libelf-devel dwarves openssl-devel rsync
4,编译内核
cd /usr/src/
cp /usr/src/linux-6.6.0-28.0.0.34.oe2403.x86_64/arch/x86/configs/openeuler_defconfig /usr/src/linux-6.6.40/arch/x86/configs/
make openeuler_defconfig
make -j4
5,打包内核RPM包
make binrpm-pkg -j64
6,安装RPM包
rpm -ivh ./rpmbuild/RPMS/x86_64/kernel-6.6.40-2.x86_64.rpm
rpm -ivh ./rpmbuild/RPMS/x86_64/kernel-headers-6.6.40-2.x86_64.rpm
或是
rpm -Uvh ./rpmbuild/RPMS/x86_64/ kernel-headers-6.6.40-2.x86_64.rpm
7,修改启动项
grub2-set-default 0
8,重启系统,查看内核信息
[root@k8sm1 ~]# uname -a
Linux k8sm1 6.6.40 #2 SMP Thu Jul 18 15:16:11 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
转载请标明出处【OpenEuler2203编译打包升级高版本kernel6.6版本内核】。
《www.micoder.cc》
虚拟化云计算,系统运维,安全技术服务.
Tags: | [阅读全文...] |
最新评论