What does the second bootloader need? why different bootloaders, like the first stage and the second stage?

I know that the first stage bootloader will perform basic hardware initializations and will call the second stage bootloader, such as u-boot. But I still do not understand why we need several stages of bootloaders.

Why don't we have only one bootloader where we run one image to initialize the equipment? What would be the disadvantages associated with only one stage of loading bootloaders directly from the kernel image? to make it clearer, using ARM CORTEX A8 for black beagle, where I place the boot MLO, U and kernel image in the boot port, as my bootloader of my level initializes your external RAM, where the U-boot is copied, which initializes a few additional peripherals why can't I pick up a kernel image directly instead of a second stage bootloader

+4
source share
4 answers

, bootsectors 512 . , 512 , , .

, , . , 512 . , 32- ​​ 16- . . : 32- , . 512 . - 16- .

512 (Single Stage Loader), - Second Stage. Second Stage 16 , ( ) . 32- .

, , , 512- . Second Stage , Loader . .

MEMORY, , MEMORY → >

+4

.

, , ? . , .

, . , . , , .

- , , . , . , , , . . , . , .

, .

+2

1) 512- , - .

2) Embedded systems , , NO-FLASH-, rootfile, SD-, USB-Pendrive, , , x-loader ( , , 2-bootloader (u-boot) )

+2

AM3359, Beaglebone Black, ROM 64KiB. , SYSBOOT, MLO - . 26 AM335x Technical .

, de facto, MLO/u-boot-spl, SDRAM , , , SRAM 128KiB.

, , u-boot, , , C AM3359 Starterware, , , ARM, .

thumb2 .

, u-boot, MLO/u-boot-spl u-boot, AM3359 SRAM 128KiB.

In conclusion, you are right that having three steps of the boot process (boot ROM + MLO + u-boot) on Beaglebone Black is not a technical limitation - two (boot ROM + MLO) may be enough if you can allow the luxury not to reuse an existing, proven , a free and widely used bootloader code.

0
source

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


All Articles