Book Description
Product Description
There's a great deal of excitement surrounding the use of Linux in embedded systems -- for everything from cell phones to car ABS systems and water-filtration plants -- but not a lot of practical information. Building Embedded Linux Systems offers an in-depth, hard-core guide to putting together embedded systems based on Linux.
Updated for the latest version of the Linux kernel, this new edition gives you the basics of building embedded Linux systems, along with the configuration, setup, and use of more than 40 different open source and free software packages in common use. The book also looks at the strengths and weaknesses of using Linux in an embedded system, plus a discussion of licensing issues, and an introduction to real-time, with a discussion of real-time options for Linux.
This indispensable book features arcane and previously undocumented procedures for:
- Building your own GNU development toolchain
- Using an efficient embedded development framework
- Selecting, configuring, building, and installing a target-specific kernel
- Creating a complete target root filesystem
- Setting up, manipulating, and using solid-state storage devices
- Installing and configuring a bootloader for the target
- Cross-compiling a slew of utilities and packages
- Debugging your embedded system using a plethora of tools and techniques
- Using the uClibc, BusyBox, U-Boot, OpenSSH, thttpd, tftp, strace, and gdb packages
By presenting how to build the operating system components from pristine sources and how to find more documentation or help, Building Embedded Linux Systems greatly simplifies the task of keeping complete control over your embedded operating system.
From the Publisher
About the Author
Karim Yaghmour is the founder and president of Opersys, a company providing expertise and courses on the use of open source and free software in embedded systems, and Kryptiva, a a provider of email security services. Being himself an active member of the open source and free software community, Karim has firmly established Opersys's services around the core values of knowledge sharing and technical quality promoted by this community. As part of his community involvement, Karim is the maintainer of the Linux Trace Toolkit and the author of a series of white-papers that led to the implementation of the Adeos nanokernel, which allows multiple operating systems to exist side-by-side.
Karim's quest for understanding how things work started at a very young age when he took it upon himself to break open all the radios and cassette players he could lay his hands on in order to "fix" them. Very early, he developed a keen interest in operating system internals and embedded systems. He now holds a B.Eng. and an M.A.Sc. from the Ecole Polytechnique de Montreal. While everyone was hacking away at Linux, Karim even took a detour to write his own distributed micro-kernel in order to get to the bottom of operating system design and implementation. When not working on software, Karim indulges in his passion for history, philosophy, sociology, and humanities in general. He's especially addicted to essays and novels by Umberto Eco and Gerald Messadie.
Jonathan Masters works on the Linux kernel for Red Hat.
Gilad Ben-Yossef is the cofounder and CTO of Codefidence TD. and has been assisting OEMs make use of free and open source software in commercial products and services since 1998. He is also cofounder of Hamakor, an NPO devoted to the promotion of FOSS in Israel, and a founding organizer of "August Penguin," an Israeli community FOSS conference.
Gilad is a member of the Israeli chapter of Mensa, the Israeli Information Technology Association and the Israeli chapter of the Internet Society. He holds a B.A. in Computer Science from Tel-Aviv Jaffa Academic College.
When not trying to make FOSS software do something the authors never intended, Gilad likes to SCUBA dive, read science fiction and spend time with his wife Limor and his and two adorable girls, Almog and Yael.
Philippe Gerum is the founder and maintainer of the Adeos and Xenomai projects.
Excerpted from Building Embedded Linux Systems by Karim Yaghmour. Copyright © 2003. Reprinted by permission. All rights reserved.
The kernel is the central software component of all Linux systems. Its capabilities very much dictate the capabilities of the entire system. If the kernel you use fails to support one of your targets hardware components, for instance, this component will be useless as long as this specific kernel runs on your target.
Many books and online documentation already discuss the kernels internals, its programming, its setup, and its use in user systems at length. I will not, therefore, cover these issues here. If you are interested in such issues, have a look at Running Linux, Linux Device Drivers, and Understanding the Linux Kernel by OReilly.
These books cover the kernels setup and use, its programming, and its internals, respectively. You may also want to take a look at the Linux Kernel HOWTO available from the LDP.
Our discussion will be limited to issues about the preparation of a Linux kernel for use in an embedded system. Specifically, we will discuss kernel selection, configuration, compilation, and installation. Each step will get us closer to the goal of obtaining a functional kernel with its related modules for our target system. Our discussion will end with coverage of the aspects of the kernels operation that are specific to embedded systems.
Selecting a Kernel
Though there is only one main repository for the kernel, the versions available from that site arent always appropriate for all the architectures supported by Linux. In fact, these versions will often not even build for, much less run on, some of the most popular architectures in embedded Linux systems. This is primarily because the development of Linux for these architectures isnt synchronized with the main kernel releases.
To have a working kernel for your target, you need to obtain one of the versions made available by the development team in charge of your targets underlying processor architecture. Since each architecture is maintained by a different team, the site of choice for a kernel varies accordingly. Table 5-1 provides a list of locations where you will find the most appropriate kernel for your architecture, along with the means of download available from that site. As you can see, most of these sites are the same ones I recommended for each architecture in Chapter 3. That said, these are not the only kernel locations for each target.
Other locations may also provide versions for your target. To begin with, some of these sites have mirrors that provide the same content. Then there are the kernels provided by various individuals, companies, and organizations. Exercise caution if you intend to use the latter type of kernel, as these kernels may not be supported by the community* and you may be forced to rely on the providers support, if available, in case of problems.
Once you have found the download site that is most appropriate for you, you will need to select a kernel version from that site. This is a difficult decision, as some versions have broken features, even if the same features were fully functional in older versions. The best way to find this sort of information is to stay in touch with the community maintaining the kernel for your architecture. This doesnt mean sending any emails or contacting anyone, but it involves subscribing to the appropriate mailing lists and keeping watch of the important notices on that list and on the ports main web site.
Some of these sites, such as the ARM site, dont necessarily distribute full kernels. Rather, they distribute patches to the official kernel. To obtain the appropriate kernel for your architecture, you must then download the kernel from the main repository and apply to it the appropriate patch provided by your ports site. --This text refers to an out of print or unavailable edition of this title.