首页天道酬勤安卓kernel编译,Linux kernel开发

安卓kernel编译,Linux kernel开发

admin 05-12 17:47 189次浏览

目录

一、安装依赖关系

二、下载、解压缩、创建. config文件

三.内核编译和打包

四.升级内核

第一次尝试编译Linux内核,记录进程,然后下载Linux内核(Linux-4.19.178 ) 3359 download.csdn.net/download/qpe ity/1559

另一方面,安装依存关系的安装依存关系ncurses-devel、lfutils-libelf-devel、bc。

yuminstallncurses-develelfutils-libelf-devel BC二、下载、解压缩、创建. config文件到官网https://www.kernel.org/相应的linule 从/boot目录中,复制现有版本的内核编译config配置文件,将其置于新的内核源解压缩目录中,然后将其重命名为. config的隐藏文件。 可以运行make menuconfig,打开文本界面的“编译选项”菜单窗口,并调整加载到内核中的模块编译选项。 具体选项根据实际需要进行调整。

wget 3359 mirrors.tuna.Tsinghua.edu.cn/kernel/v4.x/Linux-4.19.178.tar.xztarxvjflinux-4.19.178 .

或者

检查cat/proc/CPU info (组模型名称)的条件,充分利用硬件。 以及make -j编译。

[ root @ toy sources ] # echo $ [ nproc ]2[ root @ toy sources ] # cat/proc/CPU info|grep ' model name '|WC-L2 make rpm

或者

make自然铃RPM-pkg ##只构建二进制rpm软件包

[root@toy linux-4.19.178]$ make自然铃rpm-pkg.. CP system.map/root/rpmbuild/buildroot/kernel-4 buildroot/kernel-4.19.178-2.x86 _ 64/boot/config-2 rpmbuild/buildroot/kernel-4.19.178-2.x86 _ BRP-compressprocessingfiles 3360 kernel-4.19.178-2.x86 _ 64提供者3360 kernel=4. 19.178-2 kernel (x86-64=自然铃/sh /自然铃/sh /自然铃/shrequires ) rpmlib ) 3360 rpm lires=3.0.4-1rpm lib (文件大小)=4.6.0-1rpmlib ) rpmlib 自然铃shrequires(Postun ) : /自然铃/shprocessingfiles 3360密钥头-4. 19.178-2.x86 _ 64 provides 3360密钥头=4. 19.178密钥头edfilenames )=3.0.4-1rpmlib ) filedigests )4.6.0-0=4.0-1 obsoletes : kernel-headers wrote :/root/kernel-4.19.178-2.x86 _ 64 kernel-headers-4.19.178-2.x86 _ 64.rpm executing (% clean ) : /自然铃/rpm-tmp.qfp gg kernel-4.19.178-2.x86 _ 64 exit 0四、升级内核rpm -ivh安装新内核将保留旧内核并可退回然后,在grub2-set-default工具中设置默认启动内核,在grub2-editenv list中进行检查,确保无误,然后重新启动。 启动后,默认内核是升级的内核。

[ root @ toy x86 _ 64 ] # rpm-iv hkernel-4.19.178-2.x86 _ 64.rpm [ root @ toy~] # grub2- editenvliststsaved _ saved ] thenmenuentry _ id _ option='-- id ' menu entry _ id _ option=' ' exportmenuentry _ id _ optionmenuentry ' centos lion SOS----不确定性$ menu entry _ id _ option ' GNU Linux-3.3 aff-8305-b 92138 c 900 de ' { menu entry ' centos Linux (3.3 ) '-- class centos---class GNU-Linux---class GNU---class OS---unrestricted $ menu entry _ id _ option ' 0-rescue-853 cf 882 e 9e 4451 c 87 d 05 C2 a 97 a F6 f 78 )7(酷睿) ) ) ) ) ) '-- class centos---class GNU-lilie tion ' GNU Linux-0-ced-090 a39b5- e2e5- 4a ff-8305-b 92138 c 900 de ' { [ root @ toy~] # grub2- set-default ' centos grub2- editenvlistsaved _ entry=centos Linux (4. 19.178 )7 (Core ) [ root @ toy~] # rebootconnectionclosing .

无法使用useState挂钩限制功能RocketMQ 消息失败重试 解析——图解nginx gzip动态压缩和静态压缩怎么配置
centos7本地yum源,linux如何配置本地yum linux,ubuntu和fedora
相关内容