Bootloader stage1 and stage2

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.