Reading Notes Building embedded linux system Chapter 3 hardware support

Source: Internet
Author: User
Document directory
  • CPU Introduction
  • Bus and Interface)
  • I/O
  • Storage
  • Network
  • System Monitoring

These days, the progress is slow and reading is a bit boring. Let's start with Chapter 3: hardware support. I have read the CHM of the first version. I don't know if it's all about it or if it's a lot richer than the second version.

In this chapter, we will discuss the structure without MMU. Although this is already supported in linux 2.6, it is an 8-bit low-price lattice microprocessor for printing and home entertainment, this book does not cover these aspects, for 32-bit CPUs.

CPU Introduction

ARM: I have heard of many terminals, such as iPod and iPhone. ARM uses Reduce Intruction Set Computing )『It is different from the x86 CPU that uses CISC (responsible for computing instruction sets. The circuit can be made more compact with low power consumption and low cost without BIOS.

.
Unlike other chip manufacturers (such as IMB and Intel), ARM does not produce its own chips. It designs chips for its customers based on ARM's architecture, these chips have common ARM commands
To make the above software compatible, this does not mean that the same programming and development can be performed on the ARM section, but the compilation or binary code is consistent in the same revised architecture. The revised architecture includes
ARMv4T, ARMv5TE (Xscale), ARMv6 (ARMv6KZ is used for Apple iPhone) and other family series.

AVR32: Sorry, I have never heard of it. It is the same manufacturer as AVR (8-bit processor), but its structure is irrelevant. It supports general DSP and JAVA acceleration commands, and is compatible with 16-bit commands and extended 32-bit commands. AVR32 was developed in 2006. Currently, Linux kernel supports the at32ap model.

Intel
X86: Everyone looks familiar with this, including Intel and AMD. A new trend is SoC. Although it is widely used in Linux systems, its share in embedded OS
It is relatively small because of its complexity, power utilization (being improved), and price. Now, the X86 architecture has a built-in Debugger in the Linux kernel.

M32r: The word FPGA mentioned in it needs to be learned from online communism.ASIC (Application Specific Intergrated
Circuits) is a specialized integrated circuit designed and manufactured according to the requirements of specific users and the needs of specific electronic systems. Currently, CPLD (Complex Programmable Logic Device) and
FPGA (Field Programmable Logical array) is one of the most popular ASIC design methods. FPGA (Field Programmable Gate Array) is one of the most integrated circuits (ASIC). You can reconfigure the logic modules and I/O modules in FPGA, to implement user logic,
It is also used to simulate the CPU. The user puts the FPGA programming data in the Flash chip, loads it into the FPGA Through power-on, and initializes it. You can also program it online to implement
Line refactoring. This feature allows you to build a CPU that is customized in real time based on different computing tasks.

M32r is a simple introduction for PDA, camera, and engine control.

MISP: used for game consoles and other electronic devices. Similar to arm
The core license is provided to a third party, which is different from arm, but different series of MISP commands are very different. MISP does not support Linux as intel
X86 and PowerPC, some of which were still used for Embedded grass group systems, such as montavista.

Motorola 68000: it is an old architecture that can be used in embedded operating systems and is rarely used now.

PowerPC: It is widely used in Workstations (Apple Macs) and embedded operating systems. It is jointly initiated by IBM, apple, and Freescale.

Superh: Developed by Hitachi, similar to arm and MISP. Sh-1 and sh-2 are supported by some Linux systems without MMU and sh-3 | 4 | 5.

Bus and Interface)

The bus and interfaces connect the CPU and peripherals. First, the famous PCI with 120i/O Lines
32 bitpci, 64-bit PCI on the 184 line, and PCI-express on the new serial port. To enable the driver to work, PCI requires software support. The first step is
During bootup, the PCI device is initialized and configured. for PC devices, the BIOS completes the process. The kernel obtains PCI information from the BIOS table, but the kernel can also
Initialize and be specified for PCI. Both methods provide an API to the device driver, so that they can obtain device information and control the device.

Expresscard replaces PCMCIA, which is commonly used in mobile computers. PCI/104, PCI/104-Express, and SCSI are also introduced.

Compact PCI should be the plug-in ports that we previously engaged in VxWorks that can be plugged into multiple sections. Its interface is pin and supports hot swapping (hot
Swap ). There are three types of hot swapping: 1. Basic hot swapping, which requires operations on the console; 2. Full hot swapping. The system automatically performs hot swapping and displays the relevant LED display through the push or exit of the operator's mobile card.
Light; 3. high reliability, each section is monitored. If the section is finished, it is closed and the standby section is started. This is seen in many basic telecom devices and is also the environment used by VxWorks. Developing
Compactpcie increases throughput and provides some advantages of PCI-Express.

USB, glossary first, universal
Serial Bus. Ieee1394 (FireWire) in Linux
The 2.6 version is well supported. Linux also supports InfiniBand, a high-performance Optical switching interface consisting of 1-12 point-to-point connections, with the maximum throughput
2-Gbps, with very low end-to-end latency for high-performance computing, especially in supercomputers. I2C (Inter-Integrated
Circuit, an integrated circuit) is initially used by Philips for communication between TV internal components. Currently, it is common in embedded devices to provide wired data interaction, such as LCD driver, DSP
And is widely used in sensor detection. I2C uses two wires to connect the device. One is a serial clock cable and the other is a plug-in line data cable. One Party that initializes transaction is the master,
Although multiple masters are allowed, most applications only have one master.

I/O

Kernel supports two types of I/O devices. One is native, and the other is connected to an I/O device through the USB layer. The USB driver is also based on a direct-connection device, and a USB stack is added.

Serial Port. We use RS232 as the most common interface. This is a hardware interface. The kernel does not need to provide support. Instead, it contains the driver for realizing the RS232 communication chip UART (Universal asynchronous sending and receiving ).
In drivers/char/serical. c. Linux processes the serial device as a terminal device, regardless of the underlying hardware and related drivers, from/dev/ttyS0
To/dev/ttyS191.

Parallel Port is rarely used in embedded operating systems. It is usually used for printers, but USB or IEEE1394 can be used for printing.
There are very few cases. One application scenario is multibit.
I/O, which can be connected to LEDs at the same port. In different positions of the program, add commands to display different LEDs, so as to track the running position of the program.

Modem: and Unix 1
Linux regards Modem as a serial port. For a real modem, it is controlled by the same driver through the/dev serial port device interface. There are some new "modem" in The Sound Card
WinModems is a slightly modified version. The OS software can run them, just like a Modem device, but it is currently only supported by Windows.
Some projects do not provide uniform support for various WinModems.

DAQ: Data Collector, which converts physical events into an electrical value in the factory and science lab room through a converter and samples the data. On UNIX or other operating systems

Comedi package is an excuse for the main DAQ Linux device. It can adapt to many DAQ sections. Comedi also provides Comedilib, a unified API for upper-layer software, Kcomedilib, and kernel module API.

Keyboard: in traditional embedded systems, the keyboard is regarded as a clumsy thing. Many embedded systems that are accessible to customers now have some type of keyboard, such as a Bluetooth keyboard. Keyboard input as the terminal
Input, which belongs to the terminal I/O driver. There are other ways to avoid using the physical keyboard for terminal input, such as key input (Mobile Phone mode), writing recognition, etc.
The input word requires temrminal I/O programming.

Mouse uses touch screens on many terminals. In linux, it indicates that the input event of the device is in/dev/input. However, programmers do not need to perform operations at such a low level. There are many convenient APIs that can obtain indication input.

Display: displays some support in the kernel, but most of them are provided to upper-layer programs. The most common graphic interface in Linux is X Window.
System, there are other packages. X window
System provides the basic graphic Window environment. Without advanced lib, you can check their GUI in GNOME and QT projects. Many famous embedded Linux devices provide their own
. In terms of sound, many projects provide sound
Server, a software on the pretext of device, famous for its PulseAudio (PA) and JACK. These high-level audio services have their APIs or support ALSA
API standard. Printing is not common in embedded operating systems, but it is difficult for home routers, office printing servers, and even PDAs to communicate with remote printers. Although the printers are not directly connected
These devices. Linux supports CPUS (General Unix Printing System) to configure and manage printing devices.

Storage

Embedded Operating System requires at least
A solid-state storage is used to store the earliest stage of the boot process. This storage is also used by Linux Embedded OS for subsequent operations, including code execution and data acquisition. Linux terminology
Medium, MTDs (memory technology devices) includes from the drive ROM to NOR/NAND
Flash card storage, the difference between them is very large, in the linux kernel provides a unified layer for seamless connection to the low MTD chip and into the user Module (user)
Module ).

PATA and SATA are both ATA standards, that is, what is often said
IDE. IDE is commonly used in workstations and servers to store OS bootloader and root
The file system may also include the swap, but in many embedded operating systems, not all have the ATA/ide capabilities. If you want to use the IDE hard disk in the system, but not in Flash
Monitors with ATA capabilities (boot
Monitor) or the boot loader, you need to put the kernel and the boot monitor together in flash or ROM to get it when the system is enabled, and then set the boot Monitor
Program so that it can use this kernel at startup to access the IDE disk. Compactflash and SD do not belong to MTD, which can be well supported by Linux.

Network

Ethernet and infrared networks are introduced in the network section (which requires close distance, so it is better to prevent intrusion ).

Wireless Network 802.11, that is, WiFi, 802.11 has a, B, G, n, a uses a 5 GHz frequency, provides a bandwidth of 54mbps, B uses a GHz frequency, increase
The bandwidth is 11 Mbps, the G bandwidth is 54 Mbps, and the N bandwidth is 24 8 Mbps. Linux supports B, G, and N. It is said that a has a high power consumption, short distance, and poor penetration ability. Gnome Project
NetworkManager provides a graphical interface. In linux2.6, stack was rewritten to better support the latest chips.

Bluetooth devices do not need to be configured as part of the wipivonet. Devices automatically detect other devices and publish their services so that other piconet devices can use these services. The Bluetooth stack of Linux is bluez with GPL.

All of the above are general networks and industrial networks. In industrial applications, due to electromagnetic and other environmental characteristics, general network types cannot be used in some cases. For example, can, which is developed by automobile manufacturing, is the most popular fieldid. Linux supports can at 2.6.25. Modbus is also available.

System Monitoring

Although we reduce errors during design and development, hardware and software errors are always hard to be completely avoided. Therefore, system monitoring is required for error detection and recovery. Linux supports two types of system monitoring
Control: watchdog timer and hardware health check (for example, whether the voltage meets the requirements, whether the temperature is overheated, etc.), watchdog
Timer can be software or hardware, and determines whether to reboot the system by clearing it regularly. Hardware health check is a hardware method. Linux Kernel supports many watchdog
Timer, you can try your best to configure watchdog in the kernel menu
In the cards sub-menu. We can check it in/dev/watchdog. This requires that the watchdog monitor program be rewritten periodically to avoid reboot of the system. Linux
The lm_sensors project supports some hardware detection devices.

Related Article

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.