前段时间使用TI的am4378芯片,发现系统在SD卡启动的时候,启动文件使用的是MLO和uboot.img;而Norflash和eMMC启动的时候使用的是 uboot-spl.bin和uboot.bin,有如下疑问:
1. MLO和Uboot-spl.bin有什么区别?uboot.img和uboot.bin有什么区别?
2. 为什么后者需要Norflash再配合eMMC,而不是直接eMMC?
---------------------------------------------------------------------------------------------
For MLO use the spl/u-boot-spl.bin file. The difference between u-boot-spl.bin and MLO is that u-boot-spl.bin does not contain header information. Peripheral boot needs an MLO without header
理解:MLO只是比uboot-spl.bin多个Header,如果没记错的话是叫GP Header。但是问题是MLO和uboot-spl.bin是分开编译,分别使用不同的config文件,所以MLO只是简单的在uboot-spl.bin上加1个Header不成立,否则一次做完即可。
u-boot.bin
is the binary compiled U-Boot bootloader.
u-boot.img
contains u-boot.bin
along with an additional header to be used by the boot ROM to determine how and where to load and execute U-Boot.
The way in which these files are deployed can depend upon the nature of your device, its boot ROM and where the files are loaded from.
Boot ROMs are generally provided by the SoC/CPU vendor.
- These days, many boot ROMs are capable of loading
u-boot.img
, reading the file's header, loadingu-boot.bin
into memory and finally executing it. - Some boot ROMs are complex enough to load
u-boot.bin
directly or even the OS kernel. - While others may load an intermediate bootloader (MLO/X-Loader) first which then takes responsibility for loading U-Boot as the secondary bootloader once external memory is initialized.
This image depicts the latter case as implemented by some TI OMAP processors:
This boot process is reduced by some devices by moving many of the X-Loader tasks into U-Boot and placing boot parameters (such as memory addresses) into the header of u-boot.img
avoiding the need for an intermediate bootloader.
You will need to investigate the properties of your device to determine how you should go about deploying U-Boot.
理解:uboot.img只是比uboot.bin多了个头,而这个头包括了如何/从哪里执行这个uboot. uboot.bin一般是按照具体地址烧写,而uboot.img则包含地址等信息,无需按照地址下载,所以这个也决定了uboot.bin适用于Norflash,而uboot.img更适合SD卡。