- Learning Embedded Linux Using the Yocto Project
- Alexandru Vaduva
- 637字
- 2021-07-16 13:49:33
Delving into the bootloader cycle
As mentioned previously, the bootloader is the component that is first run after initializing the system, and prepares the entire ecosystem for the operating system boot process. This process differs from one architecture to the other. For example, for the x86 architecture, the processor has access to BIOS, a piece of software available in a nonvolatile memory, which is usually a ROM. Its role starts out after resetting the system when it is executed and initializes the hardware components that will later be used by the first stage bootloader. It also executes the first stage of the bootloader.
The first stage bootloader is very small in terms of dimensions - in general, it is only 512 bytes and resides on a volatile memory. It performs the initialization for the full bootloader during the second stage. The second stage bootloaders usually reside next to the first stage ones, they contain the most number of features and do most of the work. They also know how to interpret various filesystem formats, mostly because the kernel is loaded from a filesystem.
For x86 processors, there are more bootloader solutions that are available:
- GRUB: The Grand Unified Bootloader is the most used and powerful bootloader available for Linux systems from desktop PC platforms. It is a component of the GNU Project and is one of the most potent bootloaders available for x86 architecture systems. This is because it is able to understand a large variety of filesystems and kernel images formats. It is able to change the the boot configuration during boot time. GRUB also has support for a network boot and command-line interface. It has a configuration file that is processed at boot time and can be modified. More information about it can be found at http://www.gnu.org/software/grub/.
- Lilo: The Linux Loader a bootloader mostly used in commercial Linux distributions. Similar to the previous point, it is available for desktop PC platforms. It has more than one component, the first component for historical reasons is available on the first sector of a disk drive; it is the bootstrap component. Due to the same historical reasons, it is limited to the 512 bytes dimension and it loads and offers control to the second stage bootloader that does most of the bootloader's work. Lilo has a configuration utility that is mainly used as a source of information for the Linux kernel booting process. More information about it can be found at http://www.tldp.org/HOWTO/LILO.html.
- Syslinux: It is used for removable media or network booting. Syslinux is a Linux operating system bootloader that runs on MS-DOS or Windows FAT filesystems and is mainly used for rescue and first time installations of Linux. More information on it can be found at http://www.kernel.org/pub/linux/utils/boot/syslinux/.
For most embedded systems, this booting process does not apply, although there are some that replicate this behavior. There are two types of situations that will be presented next. The first one is a situation where the code execution starts from a fixed address location, and the second one refers to a situation where the CPU has a code available in the ROM memory that is called.

The right-hand side of the image is presented as the previously mentioned booting mechanism. In this case, the hardware requires a NOR flash memory chip, available at the start address to assure the start of the code execution.
A NOR memory is preferred over the NAND one because it allows random address access. It is the place where the first stage bootloader is programmed to start the execution, and this doesn't make it the most practical mechanism of booting.
Although it is not the most practical method used for the bootloader boot process, it is still available. However, it somehow becomes usable only on boards that are not suitable for more potent booting options.
- DB2 V9權(quán)威指南
- 手機(jī)安全和可信應(yīng)用開發(fā)指南:TrustZone與OP-TEE技術(shù)詳解
- WebAssembly實(shí)戰(zhàn)
- Magento 2 Theme Design(Second Edition)
- Learning ASP.NET Core 2.0
- Java Web應(yīng)用開發(fā)技術(shù)與案例教程(第2版)
- Getting Started with SQL Server 2012 Cube Development
- Java程序設(shè)計(jì):原理與范例
- Java系統(tǒng)化項(xiàng)目開發(fā)教程
- RealSenseTM互動(dòng)開發(fā)實(shí)戰(zhàn)
- Delphi開發(fā)典型模塊大全(修訂版)
- C++程序設(shè)計(jì)
- Mastering PowerCLI
- 少兒編程輕松學(xué)(全2冊(cè))
- Elastix Unified Communications Server Cookbook