bootloader role, why do you need bootloader?

Source: Internet
Author: User
Tags prepare

1, the role of bootloader

Simply put,BootLoader is a small program that runs before the operating system runs. With this applet, you can initialize the hardware device to bring the system's hardware and software environment to a suitable state to prepare for the final call to the operating system. The starting process for bootloader is divided into two stages stage1 and Stage2.

Stage1 are all compiled by the Assembly, and its main work is (1) Initializing hardware devices, (2) Prepare the stack segment for the Stager2 C locale for the stage2 of the Loaded Bootlodader (3) copy of the bootloader Stage2 to Ram space (4).

Stage2 is written all by C, and its main work is (1) Initialize the hardware device (2) to be used in this phase, the kernel image and the root file system image read from Flash to RAM (3) call the kernel

2, why need bootloader.

Each of these different CPU architectures has different bootloader. In addition to the CPU-dependent architecture, Bootloader also relies on the configuration of embedded board-level devices, such as the hardware address assignment of the Board card, the peripheral chip type, and so on. In other words, for two different development boards, even if they are built on the same CPU, but if their hardware resources or configuration is inconsistent, want to run the Bootloader program on a Development Board can also run on another board, or need to make changes.

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.