基于 ARM920T 和嵌入式 linux 的 bootloader 设计摘要:以 ARM920T 和嵌入式 linux 为平台,并根据方便移植和通用性的要求,按依赖于 cpu 与否和执行效率的要求分两部分设计出嵌入式引导程序(bootloader),第一部分用汇编编写,第二部分用 C 语言编写。在中断处理、硬件初始化以及地址映射和最终引导 linux 内核等一系列关键技术上做了详细的设计并给出了一般性的方案,该设计思路对其它不同的处理器和应用系统也有很好的借鉴价值。 关键词: ARM MMU BootLoader 嵌入式系统Abstract Based one ARM920T and embedded linux system, according to the convenience for transplant, versatility, relies on cpu or not and executive efficiency designed bootloader as two parts. Part1 is writen by assembly language, part two is desgined by c language .In essential technology such as the booloader start, the interrupt processing,the hardware initialization as well as the address mapping and boot linux kernel and so on given detailed design and general plan.this design mentality had the very good model value to other different processors and application system. Keywords: ARM MMU Bootloader embedded system 1.引言在嵌入式开发中其中不可避免的一环就是 bootloader 的设计[1],它统筹软硬件资源,使得资源最优配置,嵌入式系统对功耗,性能,以及成本要求很苛刻,它要求在达到用户要求的前提下把成本和资源利用降为最低,Booloader 不是驱动开发的一部分,但一个好的 booloader 可以决定该产品在市场上的成败[2]。采用 Samsung 公司的 ARM920T[3]处理器与 Linux2.4.18 嵌入式操作系统,根据处理速度和效率的不同采用分阶段实现的方法,在具体实现时不拘泥于该处理器和操作系统版本,使之更有普遍性和通用性。2.bootloader 概述引导加载程序 bootloader 是系统加电后运行的第一段代码[4],功能类似 pc 机的BIOS,在 ARM 中一般都是位于地址 0x00000000,这段代码可以实现初始化硬件设备,建立内存空间映射图,从而将系统的软硬件带到一个合适的状态,以便最终为调用操作系统内核和用户应用程序准备好正确的环境。Bootloader 的启动可以单阶段也可以多阶段,为了方便...