基于龙芯2k1000 SoC芯片嵌入式系统快速启动设计

 2022-05-17 09:05

论文总字数:28242字

摘 要

嵌入式Linux操作系统有着稳定高效的特点,Linux操作系统完全开源,免费而且应用支持软件非常广泛,因此越来越多的应用在云计算,服务器以及一些智能联网设备中。随着5G时代、物联网与车联网时代的来临,以Linux内核为基础的物联设备与消费类电子产品将会越来越普及,Linux操作系统也将会在嵌入式领域得到更广泛的应用。

论文主要是对龙芯嵌入式系统启动过程进行分析,并对启动耗时部分进行相应的优化。主要工作包括开发环境的搭建,pmon阶段启动分析与优化,内核启动分析与优化,根文件系统的制作等,最后在龙芯2k1000处理器上进行验证。优化方案主要是对启动过程的三个阶段进行优化,在pmon阶段主要是对pmon进行相应的配置、裁剪与代码优化。内核阶段主要是通过裁剪内核,预设lpj,优化内核参数等方案。文件系统方面主要是通过制作根文件系统进行优化。

优化后的系统在龙芯2k1000开发平台上验证,启动时间从优化前的68秒提高到39秒,很好的完成了课题的既定指标。

关键词: linux,启动优化,pmon,内核裁剪,根文件系统

ABSTRACT

The embedded Linux operating system is stable and efficient. The Linux operating system is completely open source, free and has a wide range of application support software. Therefore, more and more applications are in cloud computing, servers and some intelligent networking devices. With the advent of the 5G era, the Internet of Things and the era of Internet of Vehicles, IoT devices and consumer electronics based on the Linux kernel will become more and more popular, and the Linux operating system will be more widely used in the embedded field.

The paper mainly analyzes the startup process of the Loongson embedded system and optimizes the time-consuming part of the startup. The main work includes the construction of the development environment, the analysis and optimization of the pmon phase, the analysis and optimization of the kernel startup, the production of the root file system, and finally the verification on the Loongson 2k1000 processor. The optimization scheme is mainly to optimize the three phases of the startup process. In the pmon phase, the pmon is configured, tailored and code optimized. The kernel phase is mainly through cutting the kernel, presetting lpj, optimizing kernel parameters and other schemes. The file system aspect is mainly optimized by making a root file system.

The optimized system was verified on the Loongson 2k1000 development platform, and the startup time was increased from 68 seconds before optimization to 39 seconds, which was a good indicator of the project.

keyword: linux,booting optimization,pmon,kernel clipping, root file systems

目 录

摘要 I

ABSTRACT II

第一章 绪论 1

1.1 课题背景与研究意义 1

1.2 嵌入式系统快速启动研究现状 1

1.3 课题研究内容与目标 2

1.4 论文结构 3

第二章 龙芯开发环境搭建与介绍 4

2.1 交叉编译工具环境搭建 4

2.1.1 交叉编译器 4

2.1.2 交叉编译工具安装 5

2.2 pmon开发环境搭建 5

2.3 内核开发环境搭建 6

2.4 根文件系统制作环境搭建 7

2.5 本章小结 8

第三章 龙芯pmon分析与优化 9

3.1 Pmon结构 9

3.1.1 pmon目录结构 9

3.1.2 Targets目录组成 10

3.2 Pmon启动分析 10

3.2.1 pmon-运行框架 10

3.2.2 pmon-汇编部分启动流程 11

3.2.3 pmon-C代码部分启动流程 12

3.2.4 pmon阶段耗时分析 13

3.3 pmon优化 14

3.3.1 pmon conf文件配置 14

3.3.2 减少pmon阶段串口冗余信息打印 15

3.4 本章小结 15

第四章 内核启动分析与优化 16

4.1 内核启动流程 16

4.1.1 内核启动流程图 16

4.1.2 内核启动流程分析 17

4.1.3 内核阶段耗时分析 18

4.2 内核配置与编译 18

4.2.1 内核配置过程分析 18

4.2.2 内核配置选项简介 19

4.2.3 内核编译过程 20

4.3 内核启动优化 21

4.3.1 内核裁剪 21

4.3.2 预设lpj 21

4.3.3 内核参数优化 22

4.3.4 关闭串口控制台 23

4.4 本章小结 23

第五章 龙芯文件系统分析与根文件系统制作 24

5.1 基于systemd操作系统的用户空间启动流程 24

5.1.1 Syatemd与system V区别 24

5.1.2 基于systemd的linux启动流程 24

5.2 文件系统的优化分析 24

5.3 根文件系统制作 25

5.3.1 根文件系统目录组成与介绍 25

5.3.2 根文件系统制作 26

5.4 本章小结 27

第六章 启动时间测试与对比 28

6.1 启动时间测量工具 28

6.2 优化前后启动时间的测量与对比 29

6.3 本章小结 30

第七章 总结与展望 31

7.1 总结 31

7.2 展望 31

参考文献 32

致 谢 33

绪论

本章主要介绍基于龙芯嵌入式系统快速启动设的课题研究背景与研究意义,并简要分析了目前国内外对嵌入式快速启动优化的方向以及本毕业课题的研究内容与研究目标。

课题背景与研究意义

剩余内容已隐藏,请支付后下载全文,论文总字数:28242字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;