Barebox is a highly configurable bootloader tool.
Barebox is a basically a very small “linux kernel” in one binary file.
Barebox can implement a configurable booting sequence via a module named “bootchooser”. It is done by parameters `remaining atteptes` `priority`
Barebox can store information about the booting process and pass it to the booted Linux kernel via a module named “state”
Proper booting can be confirmed via the “barebox-state” module from the already booted Linux.
Bootloader
The First stage Boot Loader is situated in the Read Only Memory (ROM). The code situated in the ROM is the first block of code which automatically runs on device start-up or reset.
First stage of a boot loader with respect to NetworkThe first stage boot loader sets up the basic network connection. After the establishment of the connections, the client system communicates with the server through the Dynamic Host Configuration Protocol (DHCP) request (that is the client is requesting for a private IP address from the DHCP server). Once the private IP address is received from the DHCP Server a Bootstrap Protocol (BOOTP) request is made. Finally, a Trivial File Transfer Protocol (TFTP) request is done to start the second stage boot loader. The First stage boot loader has to store in ROM, and so it needs to be kept small. But the second stage loader may be larger than the size of ROM, because it gets loaded over the entire network.
First stage of a boot loader with respect to Operating System
First stage of a boot loader is a program stored in the (Master Boot Record) MBR. Master Boot Record has the information regarding basic disk Input-Output operations and also the capability to handle those basic operations. But these operations do not fully accomplish to load the Operating System, because the size of MBR boot loader is only 448 bytes. The job of he First stage of the boot loader is simply to load the second stage, that is, New Technology File System (NTFS), which is a 16,512-bytes sector to load the Operating System kernel.
原文:https://www.cnblogs.com/anyu686/p/12825135.html