What happens between u-boot.bin and u-boot.img

I just compiled the U-Boot loader, and I see several file names in the u-boot program directory, which are:

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

In principle, I am interested in files with the extensions .img and .bin . What is different between them? Is u-boot.img for SD card and u-boot.bin for blinking on NAND?

+6
source share
1 answer

u-boot.bin is the U-Boot binary compiled bootloader.

u-boot.img contains u-boot.bin along with an additional header that will be used by the boot ROM to determine how and where to download and execute U-Boot.

The way you deploy these files may depend on the nature of your device, its boot ROM, and where the files are downloaded from.

Boot ROMs are usually provided by the SoC / CPU vendor. These days, many boot ROMs can load u-boot.img by reading the file header, loading u-boot.bin into memory, and finally executing it. Some boot ROMs are complicated enough to load u-boot.bin directly or even the OS kernel. While others may first boot the intermediate bootloader (MLO / X-Loader), which then takes responsibility for loading the U-Boot as a secondary bootloader after initializing the external memory.

This image shows the last case implemented by some TI OMAP processors: TI OMAP Boot Sequence

This boot process is reduced to some devices by moving many X-Loader tasks to U-Boot and placing boot parameters (such as memory addresses) in the u-boot.img , avoiding the need for an intermediate bootloader.

You will need to examine the properties of your device to determine how you should deploy U-Boot.

+10
source

Source: https://habr.com/ru/post/984794/


All Articles