Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is different between u-boot.bin and u-boot.img

I just compiled the U-Boot bootloader and I see a few file names in the u-boot program directory which are:

u-boot.bin
u-boot.img
u-boot.lds
u-boot.srec

Basically, I'm interested in the files with extensions .img and .bin. What is different between them? Is u-boot.img for SD card and u-boot.bin for flashing to NAND ?

like image 618
FanQt Avatar asked Apr 07 '15 14:04

FanQt


1 Answers

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, loading u-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: TI OMAP Boot Sequence

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.

like image 102
shibley Avatar answered Sep 27 '22 22:09

shibley