U—Boot在mini2440平台上的移植过程分析

2012-04-29 08:45:24李宇飞嵇启春刘浩洋
计算机时代 2012年11期

李宇飞 嵇启春 刘浩洋

(西安建筑科技大学信息与控制工程学院, 陕西 西安 710055)

摘要: 引导加载程序是嵌入式系统开发的重要环节,它使得操作系统和硬件平台联系起来,对嵌入式系统的后继软件开发十分重要。为此,介绍了当前嵌入式开发中功能强大、稳定可靠的引导加载程序U-Boot的目录结构、启动流程及其移植的思路和引导内核的方法;给出了移植Uboot-2010-06到ARM微处理器S3C2440上所需操作环境的搭建,具体代码的修改,具体参数的设置,以及所需的操作命令等要点。最后将编译生成的U-Boot.bin文件下载到ARM微处理器S3C2440上,测试显示,U-Boot可以达到设计的功能要求并能够稳定运行,而且通过对其进行正确的配置可以引导内核。

关键词: 嵌入式系统; Bootloader; U-Boot; S3C2440; Linux

中图分类号:TP319文献标志码:A 文章编号:1006-8228(2012)11-04-04

Analysis of transplant process of U-boot to platform based on mini2440

Li Yufei, Ji Qichun, Liu Haoyang

(Xi'an University of Architecture and Technology, Xi'an, Shanxi 710055, China)

Abstract: Bootloader (boot loader) plays an important part in combining the operating system with hardware platform, and also is crucial for embedded system of software development. Directory structure, workflow, a porting thought and a booting kernel method of a powerful, stable U-Boot program in the development of the current embedded systems are proposed. The problems in transplanting uboot-2010-06 to S3C2440 are discussed, including particularly the environment establishment, the specific changes to the file, the specific settings to parameter and the demand of operation command. Finally the compiled U-Boot.bin will be downloaded to ARM microprocessor. The result shows that U-boot can reach the project request, operate steadily and boot the kernel successfully through the proper configuration.

Key words: embedded system; Bootloader; U-Boot; S3C2440; Linux

0 引言

在嵌入式软件开发中,嵌入式Linux系统通常包括引导加载程序、Linux内核、文件系统和用户应用程序四部分[1]。引导加载程序包括固化在固件(firm-ware)中的boot代码(可选)和Bootloder。简言之,Bootloader就是在操作系统内核运行之前运行的一段小程序,它在系统上电时开始执行,初始化硬件设备、准备好软件环境,最后调用操作系统内核[2]。由于Bootloader的实现非常依赖于具体的硬件,即使是基于同一种处理器构建的不同开发板,具有相同的CPU,它的外设(比如FLASH)也可能不同,所以不可能有一个通用的Bootloader来支持所有的CPU,而可能的是,让一个Bootloader代码支持多种不同的构架和操作系统,并让它有很好的可移植性。U-Boot就是支持多平台多操作系统的一个杰出代表,移植U-Boot是为下一步引导内核和文件系统做准备,但U-Boot移植完成后由于开发途径的不同还需要做些设置才能引导内核和文件系统。……

登录APP查看全文