introduced, including coverage of core dump analysis. Many more tools are presented and explained,
with examples including strace, ltrace, top, and ps, and the memory profilers mtrace and dmalloc.
The chapter concludes with an introduction to the more important binary utilities, including the
powerful readelf utility.
Chapter 14, "Kernel Debugging Techniques," provides a detailed examination of many debugging
techniques useful for debugging inside the Linux kernel. We introduce the use of the kernel debugger
KGDB, and present many useful debugging techniques using the combination of gdb and KGDB as
debugging tools. Included is an introduction to using hardware JTAG debuggers and some tips for
analyzing failures when the kernel won't boot.
Chapter 15, "Debugging Embedded Linux Applications," moves the debugging context from the kernel
to your application programs. We continue to build on the gdb examples from the previous two
chapters, and we present techniques for multithreaded and multiprocess debugging.
Chapter 16, "Porting Linux," introduces the issues related to porting Linux to your custom board. We
walk through a simple example and highlight the steps taken to produce a working Linux kernel on a
custom PowerPC board. Several important concepts are presented that have trapped many
newcomers to Linux kernel porting. Together with the techniques presented in Chapters 13 and 14,
you should be ready to tackle your own custom board port after reading this chapter.
Chapter 17, "Linux and Real Time," provides an introduction to one of the more exciting
developments in embedded Linux: configuring for real time via the CONFIG_RT option. We cover the
features available with RT and how they can be used in a design. We also present techniques for
measuring latency in your application configuration.
The appendixes cover the GNU Public License, U-Boot Configurable Commands, BusyBox Commands,
SDRAM Interface Considerations, resources for the open source developer, and a sample
configuration file for one of the more popular hardware JTAG debuggers, the BDI-2000.
Follow Along
You will benefit most from this book if you can divide your time between the pages of this book and
your favorite Linux workstation. Grab an old x86 computer to experiment on an embedded system.
Even better, if you have access to a single-board computer based on another architecture, use that.
You will benefit from learning the layout and organization of a very large code base (the Linux
kernel), and you will gain significant knowledge and experience as you poke around the kernel and
learn by doing.
Look at the code and try to understand the examples produced in this book. Experiment with
different settings, configuration options, and hardware devices. Much can be gained in terms of
knowledge, and besides, it's loads of fun!
GPL Copyright Notice
Portions of open-source code reproduced in this book are copyrighted by a large number of individual
and corporate contributors. The code reproduced here has been licensed under the terms of the GNU
Public License or GPL.