Components of Embedded Linux Systems
1. Hardware
2. Kernel
3. Applications (forming the root file system)
Main Tasks in Building Embedded Linux Systems
1. Kernel Part
2. Application Part
Development of Embedded Linux can generally be divided into three levels: boot loading the kernel, constructing the file system, and graphical user interface. The file system, as an important component of the operating system, determines how the information of the operating system and user data is organized on the storage device. Research, design, and development of embedded file systems have gradually become a focus in the field of embedded system research.
Kernel Trimming
Before trimming the kernel, it is essential to clarify which drivers and modules are needed, and then only select the necessary drivers and modules. For example, if the system does not require network support, the network module can be removed.
The kernel is generally stored in a compressed format and will decompress itself during system startup.
The kernel remains resident in memory, and when an application needs to be called, the required program is loaded from the disk into memory for execution.
Components of Embedded Systems
1. Embedded Hardware (Embedded Processors and Embedded Peripherals)
2. Embedded Operating Systems
3. Embedded Application Software
Embedded Processors
The core of embedded systems is various types of embedded processors. The main difference between embedded CPUs and general-purpose CPUs is that embedded CPUs mostly operate in systems specifically designed for particular user groups, integrating many tasks that general-purpose CPUs would perform on circuit boards into the chip itself, thus facilitating the miniaturization of embedded systems while also achieving high efficiency and reliability.
The architecture of embedded processors has evolved from CISC (Complex Instruction Set) to RISC (Reduced Instruction Set) and Compact RISC, with bit sizes gradually developing from 4-bit, 8-bit, 16-bit, and 32-bit to 64-bit. Currently, commonly used embedded processors can be divided into low-end embedded microcontrollers (Micro Controller Unit, MCU), mid-to-high-end embedded microprocessors (Embedded Micro Processor Unit, EMPU), embedded DSP processors (Embedded Digital Signal Processor, EDSP) used in computer communication fields, and highly integrated embedded system-on-chip (System On Chip, SOC).
Almost every semiconductor manufacturer produces embedded processors, and more companies are starting to have their own processor design departments. According to incomplete statistics, there are already over 1000 types of embedded processors worldwide, with more than 30 popular architectures.
Embedded Peripherals
In the hardware system of embedded systems, besides the central control components (MCU, DSP, EMPU, SOC), other components used to perform auxiliary functions such as storage, communication, debugging, and display can be considered embedded peripherals. Currently, commonly used embedded peripherals can be categorized into three types based on functionality: storage devices, communication devices, and display devices.
Storage devices are primarily used for various data storage, commonly including static volatile memory (RAM, SRAM), dynamic memory (DRAM), and non-volatile memory (ROM, EPROM, EEPROM, FLASH). Among these, FLASH has been widely used in the embedded field due to its high rewrite count, fast storage speed, large storage capacity, and low price.
Most communication devices currently in use can be directly applied in embedded systems, including RS-232 interfaces (serial communication interfaces), SPI (Serial Peripheral Interface), IrDA (Infrared Interface), I2C (Inter-Integrated Circuit), USB (Universal Serial Bus interface), Ethernet (Ethernet interface), etc.
Due to the special nature of embedded applications, peripheral display devices such as cathode ray tubes (CRT), liquid crystal displays (LCD), and touch panels are typically used.
Embedded Operating Systems
To facilitate and expedite the development of embedded systems, it is necessary to have software modules specifically responsible for managing memory allocation, interrupt handling, task scheduling, etc. This is the embedded operating system. The embedded operating system is the system software that supports embedded applications and is a crucial component of embedded systems, typically including hardware-related low-level drivers, system kernels, device driver interfaces, communication protocols, and graphical user interfaces (GUI).
Embedded operating systems possess the basic characteristics of general-purpose operating systems, such as effectively managing complex system resources, abstracting hardware, and providing library functions, driver programs, and development toolkits. However, compared to general-purpose operating systems, embedded operating systems exhibit more distinctive features in terms of system real-time performance, hardware dependence, software embedding, and application specificity.
Embedded operating systems can be divided into two major categories based on application scenarios: one category is non-real-time systems aimed at consumer electronics, including personal digital assistants (PDAs), mobile phones, set-top boxes (STBs), etc.; the other category is real-time operating systems aimed at control, communication, and medical fields, such as WindRiver’s VxWorks and QNX Software Systems’ QNX.
A real-time system (Real Time System) is one that can complete system functions within a specified or determined time and respond promptly to external and internal events within synchronous or asynchronous times. In real-time systems, the correctness of operations depends not only on the correctness of logical design but also on the timing of these operations. This means that real-time systems have very strict requirements on logic and timing control, and deviations in logic and timing control can lead to severe consequences.
The real-time performance of a system is primarily measured by three performance indicators: response time, survival time, and throughput:
Response Time
Is the time taken by the real-time system from recognizing an external event to responding.
Survival Time
Is the valid waiting time for data; data is only valid within this time frame.
Throughput
Is the total number of events that the system can process within a given time; throughput is usually slightly less than the inverse of the average response time.
Embedded Application Software
Embedded application software is computer software designed for specific application domains, based on a fixed hardware platform, to achieve user-defined goals. Since user tasks may have time and precision requirements, some embedded application software needs support from specific embedded operating systems. Embedded application software differs from general application software in that it not only requires accuracy, safety, and stability to meet practical application needs but also needs to be optimized as much as possible to reduce resource consumption and lower hardware costs.
Steps to Design and Build Embedded Linux Systems
Currently, the main embedded systems include Windows CE, VxWorks, QNX, etc., which all have advantages such as good real-time performance, system reliability, and task processing randomness. However, their prices are generally high, which many developers cannot afford. Therefore, the Linux operating system has become the preferred choice for embedded operating systems.
Reasons Why Linux Operating System is the Preferred Embedded OS
Before trimming the kernel, it is essential to clarify which drivers and modules are needed, and then only select the necessary drivers and modules. For example, if the system does not require network support, the network module can be removed. The kernel is generally stored in a compressed format and will decompress itself during system startup. The kernel remains resident in memory, and when an application needs to be called, the required program is loaded from the disk into memory for execution.
1. Electronic publication, why not have a copy!
2.Why does C language (function calls) require a stack while assembly language does not?
3.Deep learning models too large? This company runs them directly on Raspberry Pi
4.Ten classic “programmer” documentaries; if you haven’t seen them, don’t call yourself experienced!
5.Latest predictions from Silicon Valley: The world in 10 years will be unimaginable!
6.Which is more exhausting,