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!
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.
Appendix A contains the text of the GNU General Public License.
I am constantly amazed by the graciousness of open source developers. I am humbled by the talent in our community that often far exceeds my own. During the course of this project, I reached out to many people in the Linux and open source community with questions. Most often my questions were quickly answered and with encouragement. In no particular order, I'd like to express my gratitude to the following members of the Linux and open source community who have contributed answers to my questions:
Dan Malek provided inspiriation for some of the contents of Chapter 2, "Your First Embedded Experience."
Dan Kegel and Daniel Jacobowitz patiently answered my toolchain questions.
Scott Anderson provided the original ideas for the gdb macros presented in Chapter 14, "Kernel Debugging Techniques."
Brad Dixon continues to challenge and expand my technical vision through his own.
George Davis answered my ARM questions.
Jim Lewis provided comments and suggestions on the MTD coverage.
Cal Erickson answered my gdb use questions.
John Twomey advised on Chapter 3, "Processor Basics."
Lee Revell, Sven-Thorsten Dietrich, and Daniel Walker advised on real time Linux content.
Many thanks to AMCC, Embedded Planet, Ultimate Solutions, and United Electronic Industries for providing hardware for the examples. Many thanks to my employer, Monta Vista Software, for tolerating the occasional distraction and for providing software for some of the examples. Many others contributed ideas, encouragement, and support over the course of the project. To them I am also grateful.
I wish to acknowledge my sincere appreciation to my primary review team, who promptly read each chapter and provided excellent feedback, comments, and ideas. Thank you Arnold Robbins, Sandy Terrace, Kurt Lloyd, and Rob Farber. Many thanks to Arnold for helping this newbie learn the ropes of writing a technical book. While every attempt has been made to eliminate mistakes, those that remain are solely my own.
I want to thank Mark L. Taub for bringing this project to fruition and for his encouragement and infinite patience! I wish to thank the production team including Kristy Hart, Jennifer Cramer, Krista Hansing, and Cheryl Lenser.
And finally, a very special and heartfelt thank you to Cary Dillman who read each chapter as it was written, and for her constant encouragement and her occasional sacrifice throughout the project.
Chris Hallinan
Christopher Hallinanis currently field applications engineer for Monta Vista Software, living and working in Massachusetts. Chris has spent more than 25 years in the networking and communications marketplace mostly in various product development roles, where he developed a strong background in the space where hardware meets software. Prior to joining Monta Vista, Chris spent four years as an independent Linux consultant providing custom Linux board ports, device drivers, and bootloaders. Chris's introduction to the open source community was through contributions to the popular U-Boot bootloader. When not messing about with Linux, he is often found singing and playing a Taylor or Martin.
The move away from proprietary operating systems is causing quite a stir in the corporate boardrooms of many traditional embedded operating system (OS) companies. For many well-founded reasons, Linux is being adopted as the operating system in many products beyond its traditional stronghold in server applications. Examples of these embedded systems include cellular phones, DVD players, video games, digital cameras, network switches, and wireless networking gear. It is quite possible that Linux is already in your home or your automobile.
Because of the numerous economic and technical benefits, we are seeing strong growth in the adoption of Linux for embedded devices. This trend has crossed virtually all markets and technologies. Linux has been adopted for embedded products in the worldwide public switched telephone network, global data networks, wireless cellular handsets, and the equipment that operates these networks. Linux has enjoyed success in automobile applications, consumer products such as games and PDAs, printers, enterprise switches and routers, and many other products. The adoption rate of embedded Linux continues to grow, with no end in sight.
Some of the reasons for the growth of embedded Linux are as follows:
• Linux has emerged as a mature, high-performance, stable alternative to traditional proprietary embedded operating systems.
• Linux supports a huge variety of applications and networking protocols.
• Linux is scalable, from small consumer-oriented devices to large, heavy-iron, carrier-class switches and routers.
• Linux can be deployed without the royalties required by traditional proprietary embedded operating systems.
• Linux has attracted a huge number of active developers, enabling rapid support of new hardware architectures, platforms, and devices.
• An increasing number of hardware and software vendors, including virtually all the top-tier manufacturers and ISVs, now support Linux.
For these and other reasons, we are seeing an accelerated adoption rate of Linux in many common household items, ranging from high-definition television sets to cellular handsets.
1.2. Embedded Linux Today
It might come as no surprise that Linux has experienced significant growth in the embedded space. Indeed, the fact that you are reading this book indicates that it has touched your own life. It is difficult to estimate the market size because many companies still build their own embedded Linux distributions.
LinuxDevices.com, the popular news and information portal founded by Rich Lehrbaum, conducts an annual survey of the embedded Linux market. In its latest survey, they report that Linux has emerged as the dominant operating system used in thousands of new designs each year. In fact, nearly half of respondents reported using Linux in an embedded design, while the nearest competing operating system was reportedly used by only about one in every eight respondents. Commercial operating systems that once dominated the embedded market were reportedly used by fewer than one in ten respondents. Even if you find reason to dispute these results, no one can ignore the momentum in the embedded Linux marketplace today.
1.3. Open Source and the GPL
One of the fundamental factors driving the adoption of Linux is the fact that it is open source . The Linux kernel is licensed under the terms of the GNU GPL [1] See Appendix A, "GNU Public License," for the complete text of the license.
(General Public License), which leads to the popular myth that Linux is free. [2] Most professional development managers agree: You can download Linux without charge, but there is a cost (often a substantial one) for development and deployment of any OS on an embedded platform. See Section 1.3.1, "Free Versus Freedom," for a discussion of cost elements.
In fact, the second paragraph of the GNU GPL declares: "When we speak of free software, we are referring to freedom, not price." The GPL license is remarkably short and easy to read. Among the most important key characteristics:
Читать дальше