1.Linux启动分成4个阶段 – ROM, SPL, u-boot, Kernel:
• 1 –
ROM BL Reads from initialized persistent storage (selected by boot mode)
SPL into internal Ram
• 2 –
SPL does additional setup and reads from persistent storage the next stage
u-boot into DDR
• 3 –
u-boot continues the processor setup and reads the kernel into DDR
• 4 –
Linux kernel boot and initializesuser run time environment
2.每个阶段的启动模式
通常可以通过NAND, I2C, MMC, SPI, Serial或者Ethernet启动
3.U-boot启动信息
打印显示的启动参数和启动命令
U-Boot > printenv
baudrate=115200
bootargs_defaults=setenv bootargs console=${console} ${optargs}
bootcmd=if mmc rescan; then echo SD/MMC found on device ${mmc_dev};if run
loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n
$uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run mmc_load_uimage; then run
mmc_args;bootm ${kloadaddr};fi;fi;run nand_boot;
4.linux kernel
uboot输出的信息:
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.2.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3163488 Bytes = 3 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
bootdelay=3
bootenv=uEnv.txt
bootfile=uImage
console=ttyO0,115200n8
kloadaddr=0x80007fc0
loadaddr=0x82000000
上面这些信息都在uImage中的“uImage header Info"中。
5.启动过程的内存映射(am335x)
• SPL is loaded into internal RAM
• U-Boot is loaded first into DDR
• U-Boot then loads the uImage from where directed
• U-Boot performs a checksum and then relocates (if required) the Kernel found in the uImage to the load address
• U-Boot then jumps to the entry address specified in the uImage header, linux boot starts at this point
• Please note the addresses used here are for reference only and do not apply to all devices