For starters, you will need a toolchain. Gcc and binutils are available from www.fsf.org and other mirrors around the world. Both are required to compile the kernel and user-space applications for your project. These are distributed primarily in source code form, and you must compile the tools to suit your particular cross-development environment. Patches are often required to the most recent "stable" source trees of these utilities, especially when they will be used beyond the x86/IA32 architecture. The patches can usually be found at the same location as the base packages. The challenge is to discover which patch you need for your particular problem and/or architecture.
This chapter covered many subjects in a broad-brush fashion. Now you have a proper perspective for the material to follow in subsequent chapters. In later chapters, this perspective will be expanded to develop the skills and knowledge required to be successful in your next embedded project.
• Embedded systems share some common attributes. Often resources are limited, and user interfaces are simple or nonexistent, and are often designed for a specific purpose.
• The bootloader is a critical component of a typical embedded system. If your embedded system is based on a custom-designed board, you must provide a bootloader as part of your design. Often this is just a porting effort of an existing bootloader.
• Several software components are required to boot a custom board, including the bootloader and the kernel and file system image.
• Flash memory is widely used as a storage medium in embedded Linux systems. We introduced the concept of Flash memory and expand on this coverage in Chapters 9 and 10.
• An application program, also called a process, lives in its own virtual memory space assigned by the kernel. Application programs are said to run in user space.
• A properly equipped and configured cross-development environment is crucial to the embedded developer. We devote an entire chapter to this important subject in Chapter 12.
• You need an embedded Linux distribution to begin development of your embedded target. Embedded distributions contain many components, compiled and optimized for your chosen architecture.
2.5.1. Suggestions for Additional Reading
Linux Kernel Development , 2nd Edition
Robert Love
Novell Press, 2005
Understanding the Linux Kernel
Daniel P. Bovet & Marco Cesati
O'Reilly & Associates, Inc., 2002
Understanding the Linux Virtual Memory Manager
Bruce Perens
Prentice Hall, 2004
Chapter 3. Processor Basics
In this chapter, we present some basic information to help you navigate the huge sea of embedded processor choices. We look at some of the processors on the market and the types of features they contain. Stand-alone processors are highlighted first. These tend to be the most powerful processors and require external chipsets to form complete systems. Next we present some of the many integrated processors that are supported under Linux. Finally, we look at some of the common hardware platforms in use today.
Literally dozens of embedded processors are available to choose from in a given embedded design. For the purposes of this chapter, we limit the available discussion to those that contain a hardware memory-management unit and, of course, to those that are supported under Linux. One of the fundamental architectural design aspects of Linux is that it is a virtual memory operating system. [16] Linux has support for some basic processors that do not contain MMUs, but this is not considered a mainstream use of Linux.
Employing Linux on a processor that does not contain an MMU gives up one of the more valuable architectural features of the kernel and is beyond the scope of this book.
3.1. Stand-alone Processors
Stand-alone processors refer to processor chips that are dedicated solely to the processing function. As opposed to integrated processors, stand-alone processors require additional support circuitry for their basic operation. In many cases, this means a chipset or custom logic surrounding the processor to handle functions such as DRAM controller, system bus addressing configuration, and external peripheral devices such as keyboard controllers and serial ports. Stand-alone processors often offer the highest overall CPU performance.
Numerous processors exist in both 32-bit and 64-bit implementations [17] 32-bit and 64-bit refer to the native width of the processor's main facilities, such as its execution units, register file and address bus.
that have seen widespread use in embedded systems. These include the IBM PowerPC 970FX, the Intel Pentium M, and the Freescale MPC74xx Host Processors, among others.
Here we present a sample from each of the major manufactures of stand-alone processors. These processors are well supported under Linux and have been used in many embedded Linux designs.
The IBM 970FX processor core is a high-performance 64-bit capable stand-alone processor. The 970FX is a superscalar architecture. This means the core is capable of fetching, issuing, and obtaining results from more than one instruction at a time. This is done through a pipelining architecture, which provides the effect of multiple streams of instruction simultaneously. The IBM 970FX contains up to 25 stages of pipelining, depending on the instruction stream and operations contained therein.
Some of the key features of the 970FX are as follows:
• A 64-bit implementation of the popular PowerPC architecture
• Deeply pipelined design, for very-high-performance computing applications
• Static and dynamic power-management features
• Multiple sleep modes, to minimize power requirements and maximize battery life
• Dynamically adjustable clock rates, supporting lower-power modes
• Optimized for high-performance, low-latency storage management
The IBM 970FX has been incorporated into a number of high-end server blades and computing platforms, including IBM's own Blade Server platform.
Certainly one of the most popular architectures, x86 in both 32- and 64-bit flavors (more properly called IA32 and IA64, respectively) has been employed for embedded devices in a variety of applications. In the most common form, these platforms are based on a variety of commercial off-the-shelf (COTS) hardware implementations. Numerous manufacturers supply x86 single-board computers and complete platforms in a variety of form factors. See Section 3.2, "Integrated Processors: Systems on Chip," later in this chapter for a discussion of the more common platforms in use today.
The Intel Pentium M has been used in a wide variety of laptop computers and has found a niche in embedded products. Like the IBM 970FX processor, the Pentium M is a superscalar architecture. These characteristics make it attractive in embedded applications:
• The Pentium M is based on the popular x86 architecture, and thus is widely supported by a large ecosystem of hardware and software vendors.
• It consumes less power than other x86 processors.
• Advanced power-management features enable low-power operating modes and multiple sleep modes.
• Dynamic clock speed capability enhances battery-powered operations such as standby.
• On chip thermal monitoring enables automatic transition to lower power modes, to reduce power consumption in overtemperature conditions.
• Multiple frequency and voltage operating points (dynamically selectable) are designed to maximize battery life in portable equipment.
Читать дальше