描述u-boot启动流程
时间: 2024-04-08 11:25:04 浏览: 109
u-boot启动流程如下:
1. Boot ROM会加载u-boot SPL(Secondary Program Loader),SPL是一个小型的bootloader,主要负责初始化DDR、设置栈、解压u-boot image等操作。
2. SPL会加载完整版的u-boot,u-boot会进行硬件初始化,包括串口、网卡、USB等外设的初始化,还会进行内存映射、环境变量的设置等操作。
3. u-boot会加载内核镜像,通过bootm命令将内核镜像从Flash中加载到RAM中,然后跳转到内核的入口地址开始执行内核。
代码示例:
```
U-Boot SPL 2021.01-rc4-00000-gd7f6c8d-dirty (Jan 06 2021 - 16:22:08 +0800)
Trying to boot from MMC1
U-Boot 2021.01-rc4-00000-gd7f6c8d-dirty (Jan 06 2021 - 16:22:08 +0800)
CPU: Freescale i.MX6ULL rev1.0 792 MHz (running at 396 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 44C
Reset cause: POR
Model: TechNexion PICO-PI-IMX6ULL
DRAM: 512 MiB
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x11
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@020b4000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:1...
Found U-Boot script /boot.scr
reading /boot.scr
```
阅读全文