Entering the world of Embedded Linux

Source: Internet
Author: User

Author: Xiao wenpeng
Embedded systems are application-oriented, computer-based, and software and hardware can be tailored. They are suitable for dedicated computer systems with strict requirements on functions, reliability, cost, volume, and power consumption. The most typical feature of embedded systems is that they are closely related to people's daily lives. Any ordinary person may have various types of electronic products that use embedded technology, from Mini digital devices such as MP3 and PDA to Information appliances, Smart appliances, and on-board GIS.

4-layer Embedded System
According to the International Institute of Electrical and Electronics Engineers (IEEE), embedded systems are "devices for controlling, monitoring, or auxiliary equipment, machines, and workshops ". Generally, the architecture of the entire embedded system can be divided into four parts: Embedded Processor, embedded peripheral device, embedded operating system and embedded application software.
The core of an embedded system is various types of embedded processors. The biggest difference between an embedded processor and a general-purpose processor is that most embedded CPUs work in systems specially designed for specific user groups, it integrates many tasks completed by the Board into the chip of the general-purpose CPU, which facilitates the design of embedded systems in a small manner and has high efficiency and reliability.
In the hardware part of the embedded system, apart from the central control components, other components used to complete storage, communication, debugging, display, and other auxiliary functions can be counted as embedded peripheral devices. Currently, commonly used embedded peripheral devices can be divided into storage devices, communication devices, and display devices by function.
To make the development of embedded systems more convenient and convenient, a software module is required to manage functions such as memory allocation, interrupt processing, and task scheduling. This is an embedded operating system. Embedded operating systems are system software used to support embedded applications and are an extremely important part of embedded systems, it usually includes underlying hardware-related drivers, system kernels, device driver interfaces, communication protocols, and graphical user interfaces (GUI. Embedded operating systems have the basic features of general operating systems. For example, they can effectively manage complex system resources, abstract hardware, and provide database functions, drivers, and development tool sets. However, compared with general operating systems, embedded operating systems are more distinctive in terms of real-time system performance, hardware dependence, software solidification, and application specialization.
Embedded Application Software is a computer software based on a fixed hardware platform for specific application fields to achieve user expectations. Because user tasks may have time and precision requirements, some embedded applications require the support of specific embedded operating systems. Embedded Application Software is different from common application software. It not only requires accuracy, security, and stability to meet the needs of practical applications, but also needs to be optimized as much as possible, to reduce the consumption of system resources and reduce hardware costs.

Popular embedded Linux
Since the advent of Linux in 1991, Linux has developed into one of the powerful and well-designed operating systems in just over a decade. It can not only fight against various traditional commercial operating systems, it has also developed rapidly in the emerging field of embedded operating systems. Embedded Linux refers to a memory chip or single chip microcomputer with a capacity of only a few K or several M bytes after small-scale cropping of standard Linux, A Linux operating system suitable for specific embedded applications. The Development and Research of Embedded Linux is a hotspot in the field of operating systems. At present, about half of the developed embedded systems use Linux. The reason why Linux can achieve such brilliant results in the embedded system market is inseparable from its own excellent features.
· Extensive hardware support. Linux supports multiple architectures such as x86, arm, MIPS, Alpha, and PowerPC. It has been successfully transplanted to dozens of hardware platforms and can run on almost all popular CPUs. Linux has rich driver resources, supports various mainstream hardware devices and the latest hardware technology, and even runs on a processor without a Storage Management Unit (MMU, these further promote the application of Linux in embedded systems.
· Efficient and stable kernel. The efficiency and stability of the Linux kernel have been proven by many facts in various fields. The Linux kernel design is extremely sophisticated, it is divided into five parts: process scheduling, memory management, inter-process communication, Virtual File System, and network interface. Its unique module mechanism can be tailored to users' needs, inserts or removes some modules from the kernel in real time. These features make Linux kernel very small and suitable for embedded systems.
· Open source code, rich software. Linux is an open-source free operating system that provides users with the maximum degree of freedom. Because embedded systems are very different and often need to be modified and optimized for specific applications, it is crucial to obtain the source code. Linux has rich software resources. Almost every general program can be found on Linux, and the number of programs is increasing. Embedded Application Software Development on Linux generally does not need to start from scratch. Instead, a similar free software can be used as a prototype for secondary development.
· Excellent development tools. The key to developing embedded systems is to have a complete set of development and debugging tools. The traditional embedded development and debugging tool is an in-circuit emulator (ICE). It replaces the target board Microprocessor and provides a complete simulation environment for the target program, this allows developers to have a very clear understanding of the program's working status on the target board, facilitating program monitoring and debugging. Online simulators are very expensive and only suitable for very low-level debugging. If you are using Embedded Linux, once the software and hardware support normal serial port functions, even if you do not need an online simulator, you can perform development and debugging well, thus saving a lot of development costs. Embedded Linux provides developers with a complete tool chain, which allows developers to conveniently debug the operating system and application software.
· Comprehensive network communication and file management mechanisms. Since its birth, Linux has been closely related to the Internet. It supports various standard Internet protocols and can be easily transplanted to embedded systems. In addition, Linux also supports ext2, FAT32, romfs and other file systems, which lay a good foundation for the development of embedded system applications.

Three challenges
At present, the R & D boom of Embedded Linux systems is booming and occupies a large market share, except for some traditional Linux companies (such as RedHat) in addition to the development and application of embedded Linux, enterprises such as Intel and Motorola have begun to study embedded Linux. Although the prospects are brilliant, there is still a gap between the research results of Embedded Linux and the real requirements of the market. To develop a truly mature embedded Linux system, efforts also need to be made from the following aspects:
· Improve System timeliness. Although Linux has been successfully applied to PDA, mobile phone, on-board TV, set-top box, network microwave oven and other embedded devices, however, it cannot be directly applied in scenarios with strict real-time requirements such as medical, aviation, transportation, and industrial control, because the existing Linux system is a common operating system, although it also uses many technologies to speed up system operation and response, and complies with posix1003.1b standards, it is not essentially an embedded real-time operating system. The Linux kernel scheduling policy basically follows the UNIX system and has many defects when it is directly applied to the embedded real-time environment, such as the interruption of the kernel thread being shut down, time-based scheduling policies have time uncertainty and lack of high-precision timers. Because of this, using Linux as the underlying operating system, real-time transformation is carried out on it to build an embedded system with real-time processing capabilities, which is an increasingly popular solution.
· Improve the kernel structure. The Linux kernel uses a monolithic. The entire kernel is a separate and very large program. Although this allows direct communication between all parts of the system, this effectively shortens the switching time between tasks and increases the system response speed. However, it is not consistent with the characteristics of low storage capacity and limited resources of embedded systems. Embedded systems often use another architecture called microkernel, that is, the kernel itself only provides some of the most basic operating system functions, such as task scheduling, memory management, and interrupt processing. Additional functions such as file systems and network protocols run in the user space and can be selected based on actual needs. Microkernel greatly reduces the size of the kernel, facilitates maintenance and transplantation, and better meets the requirements of embedded systems.
· Improve the integrated development platform. Introducing the embedded Linux Integrated Development Platform is an internal requirement for further development and application of embedded Linux. Traditionally, embedded systems are designed for specific application scenarios, and software and hardware must work closely together. However, with the continuous expansion of embedded systems and application fields, the emergence of embedded operating systems has become an inevitable trend, because only in this way can the embedded systems develop in a hierarchical and modular manner. Obviously, the embedded integrated development platform is also in line with the above development trends. An excellent embedded integrated development environment can provide relatively complete simulation functions, it can achieve synchronous development of embedded application software and embedded hardware, thus getting rid of "development of embedded application software depends on development of embedded hardware, the disadvantage is the premise of developing embedded hardware. A complete embedded integrated development platform usually includes compiler, connector, debugger, tracker, optimizer and integrated user interface. At present, there is a big gap between Linux and commercial embedded operating systems such as Windows CE in the research of customized platforms based on graphic interfaces. The overall integrated development environment needs to be improved and improved.

How to implement real-time Linux
To improve the system's real-time performance is to implement real-time Linux. Its development has the following four ideas:
· Provides support for hard real-time data. The specific methods include improving clock accuracy, solving the problem of interruption sealing and kernel state cannot be preemptible, representing the RT-Linux and Kurt-Linux systems. In fact, most real-time Linux systems use ideas similar to RT-Linux to improve clock accuracy and software interrupt manager. In general, there is a conflict between kernel support and the use of the rich system calls of traditional Linux, so that RT-Linux alone implements an independent small hardware real-time operating system. With the introduction of software to simulate terminal controllers, improve clock accuracy, and seize the kernel, this contradiction is gradually resolved.
· Provides support for real-time multimedia applications, including introducing novel scheduling algorithms (network packet scheduling, process scheduling, and disk scheduling ).
· Introduce a novel scheduling framework and resource management ideas to better support QoS requirements in the network system, such as the idea of Operating System Scheduling in the vertical structure of silk and the idea of hierarchical scheduling in qlinux, and a general scheduling framework proposed by red-Linux and the concept of Resource Reservation in Linux/rk.
· Convenient Implementation of task QoS management interface functions and management programs, such as the concept of Resource Reservation for various resources in the operating system proposed by Linux/rk; in Linux-SRT, APIs and reserve (Reserved) concepts are added to facilitate the use of new real-time scheduling support.
In actual systems, the specific use of real-time Linux technology depends on the specific system requirements. For example, if a system does not have strict requirements on real-time performance, but is not a soft real-time system, you can refer to some ideas that can seize the kernel to improve the Linux response speed.

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.