Differences between Bootloader and bootstrap

Source: Internet
Author: User

Differences between Bootloader and bootstrap
As we can see in "embedded Linux primer", there are still some differences and inaccuracies,
For example, bootstrap and bootstrap loader seem to be different on PC, but they still do not affect understanding.
Http://www.devbone.com/leadbbs/MINI/Default.asp? 100-2246-0-0-0-0-a-.htm
Another example is Redboot (RedHat embedded debug and bootstrap). In essence, it is a bootloader with a bootstrap name, which is depressing.
Http://sourceware.org/redboot/

This is only applicable to the embedded + ARM + Linux environment.

Bootloader is translated into (Phase 1) Boot Loader
Bootstrap loader is translated as the second-stage boot loader.

Bootloader can be understood without much explanation-the first program executed after power-on will never depend on the kernel. For example, uboot and Vivi
Bootstrap, the second-stage bootstrap loader, is the kernel code (not compiled into vmlinux, but executable images such as zimage contain Bootstrap) and serves as the bond between Bootloader and kernel image.
Bootstrap usually verifies the kernel image, decompress the kernel image, re-deploys the kernel image to the memory, and provides the appropriate context for Kernel execution (nothing more than shutting down, enabling command cache and data cache, and setting the C Language running Environment)

Execution Process
Power on --> bootloader --> Bootstrap (head. O) --> kernel vmlinux (head. O) --> kernel start_kernel (main. O)
The above two heads. O are not the same
Bootstrap uses/ARCH/ARM/boot/compressed/head. S.
The kernel vmlinux uses/ARCH/ARM/kernel/head. S.
Although they are all head. O, they are not in the same era. Since then, bootstrap and kernel vmlinux are separated.
You can see that Uncompressing Linux... Done, booting the kernel. also belongs to bootstrap.
When the second line of kernel version information is printed, it will be the real kernel main. O era.
In a strict sense, make is the most important file to generate vmlinux.
After removing symbols, tags, and annotations, an image is generated.
Gzipzip is converted into piggy.gz
Next, a file named Piggy. S is compiled into piggy. O.
The idea is that there are only seven lines of code, but piggy.gz can only be included.
. Section. piggydata, # alloc
. Globl input_data
Input_data:
. Incbin "arch/ARM/boot/compressed/piggy.gz"
. Globl input_data_end
Input_data_end:

Then, piggy. O is linked with bootstrap Code such as Misc. O and head. O to form zimage and other images that can be guided into a compositing image.
Among them, MISC. O is responsible for decompression and head. O head_xx.o is responsible for kernel context initialization.

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.