最近一直在研究bootloader之vboot,vboot短小精悍,如果只是用来进行系统的引导,而不要提供其他复杂的功能时候,我认为这是绝佳的上选。这里以MINI2440开发板配套的源码进行分析。这个源码只支持曾NANDFLASH进行启动。由于代码精短,总的代码量不超过4K,所以,就不需要像uboot那样需要将启动代码分两段进行运行,而是可以直接在芯片自带的ram里面进行运行。当然,如果要想使用复杂的功能,那只能选择其他的bootloader了,但是对vboot深入的了解,很有利于学习其它复杂的启动代码。需要的读者,可以留言留下邮箱。
Recently I has been studying vboot bootloader, it is very short and is used for system start, does not provide other complex functions, I think it is a wonderful choice. Here MINI2440 development board matching source code analysis. This source only supports the NANDFLASH start it at a time. JingDuan because the code, the code to the amount of not more than 4 k, so you don't need like uboot will need to run the startup code is divided into two parts, but it can be run directly in the chip and memory. And, of course, if you want to use complex function, it can only choose other bootloader, but vboot advanced knowledge, very conducive to learning other complex startup code.
整个文件主要有以下几个文件组成。使用gnu编译器编译。用在arm上是用arm-linux-gcc编译
244x_lib.c
244x_lib.h
bitfield.h
def.h
hardware.h
head.S
main.c
Makefile
mem.lds
nand.c
nand.h
parameters.h
s3c2440.h
smdk2440.h
以上就是所包括的几个文件。具体的一个个来看下。
1、mem.lds
此文件是一个链接脚本文件。这个文件,应该最先看。关于链接脚本文件的详细讲解,我专门转载了一篇文章,有需要的可以查看下。
SECTIONS {
1 . = 000000;
2 .m