Boot Loading and download modes of bootloader
Start the loading mode:
This Bootstrap mode is also known as the autonomous (autonomous) bootstrap mode, that is, the bootloader loads the operating system to ram from a solid-state storage device of the target machine and runs it as a pilot, no user intervention is involved in the entire process. This Bootstrap mode is a commonly used Bootstrap mode in normal operating mode of bootloader. Therefore, during the release of embedded productsCodeStart the boot guide.
Download mode:
In this mode, the bootloader on the target machine will download files from the host by means of serial port connection or network connection, such as downloading applications.Program, Data files, kernel images, etc. Files downloaded from the host are usually first saved to the ram of the target host by bootloader, and then written to the solid state storage device of the target host. Then, the kernel is started. This Bootstrap mode of bootloader is usually used in system development and updating.
Bootloader stage1 usually includes the following steps (in the order of execution ):
1. Hardware Device Initialization
2. Prepare a ram space for stage2.
3. Copy stage2 to the ram space.
4. Set the stack.
5. Jump to the C entry of stage2.
Bootloader stage2 usually includes the following steps (in the order of execution ):
1. Initialize the hardware required for this phase.
2. Memory Map of the system ).
3. Load the kernel and root file system from the flash to the ram space.
4. Set startup parameters for the kernel.
5. Call the kernel.