Analysis of BSP in Embedded Linux System

An embedded system consists of a hardware environment, an embedded operating system, and an application. The hardware environment is the hardware platform on which the operating system and applications run. It has different requirements depending on the application. The diversity of the hardware platform is the main feature of the embedded system. How to make the embedded operating system run effectively on different hardware platforms is a key problem to be solved in the development of embedded systems. The solution is to provide a hardware-related layer between the hardware platform and the operating system to shield the differences between the hardware and provide a unified operating environment for the operating system. This hardware-related layer is the board-level support package BSP (Board) in the embedded system. Support Package (BSP).

BSP is the middle layer software between the hardware platform and the operating system in the embedded system. The main purpose is to shield the diversity of the underlying hardware, complete the direct operation of the hardware according to the requirements of the operating system, and provide the underlying hardware information to the operating system. Finally boot the operating system. BSP has the characteristics of hardware correlation and operating system correlation. Its main functions include:

(1) Initialize the underlying hardware to provide the underlying hardware information for the operating system;

(2) Initializing related hardware devices, mainly storage devices and communication devices;

(3) Check if the system hardware is normal;

(4) Load the operating system and start the system to run.

BSP is relative to the operating system. Different operating systems have different definitions of BSPs, and the functions required by BSPs are different. In the embedded Linux system, the main hardware is initialized and the operating system is booted. At the same time, the BSP is related to the hardware, and the initialization operation of the hardware is also considered. These initialization operations are mainly to correctly configure the relevant registers and coprocessors such as CPU, memory, and interrupts. In different development stages, because the core and file system are in different locations, the BSP has to do different things: during the development and debugging phase, the BSP needs to be able to communicate with the host and download the core from the host; in the target product, the BSP needs Ability to load cores from non-volatile storage devices.