13

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 ?

Cœur
  • 37,241
  • 25
  • 195
  • 267
FanQt
  • 218
  • 1
  • 3
  • 9

1 Answers1

24

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.

shibley
  • 1,528
  • 1
  • 17
  • 23
  • I'm Lost. So what is role MLO ? Whether is u-boot.bin + MLO = u-boot.img ? So for what single u-boot.bin. When I should be use u-boot.bin and when I should be used u-boot.img ? – FanQt Apr 07 '15 at 15:45
  • Super ! Now I see this conception. In my device using u-boot-img. It's read all data form SD card. My device is TI Sitara am335x. In worked kit each I recived from vendor is on card find file MLO + u-boot.img+uEnv.txt+uImage. What is content of headers in u-boot.img ? – FanQt Apr 07 '15 at 17:17
  • I stiil see as You added new information which are very helpful and professjonal. Thank You. So, it remains my analysis of the documentation this MPU, and learn, learn, learn. – FanQt Apr 07 '15 at 17:37