Embedded Linux System Design and Development
Total Page:16
File Type:pdf, Size:1020Kb
Au0586 half title page 11/17/05 2:05 PM Page 1 EMBEDDED LINUX SYSTEM DESIGN AND DEVELOPMENT Au0586 title page 11/17/05 2:04 PM Page 1 EMBEDDED LINUX SYSTEM DESIGN AND DEVELOPMENT TEAM FLY P. Raghavan • Amol Lad • Sriram Neelakandan Boca Raton New York Published in 2006 by Auerbach Publications Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2006 by Taylor & Francis Group, LLC Auerbach is an imprint of Taylor & Francis Group No claim to original U.S. Government works Printed in the United States of America on acid-free paper 10987654321 International Standard Book Number-10: 0-8493-4058-6 (Hardcover) International Standard Book Number-13: 978-0-8493-4058-1 (Hardcover) Library of Congress Card Number 2005048179 This book contains information obtained from authentic and highly regarded sources. Reprinted material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and the publisher cannot assume responsibility for the validity of all materials or for the consequences of their use. No part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC) 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Library of Congress Cataloging-in-Publication Data Raghavan, P. (Pichai), 1973- Embedded Linux system design and development / P. Raghavan, Amol Lad, Sriram Neelakandan. p. cm. Includes bibliographical references and index. ISBN 0-8493-4058-6 (alk. paper) 1. Linux. 2. Operating systems (Computers) 3. Embedded computer systems. I. Lad, Amol. II. Neelakandan, Sriram. III. Title. QA76.76.O63R335 2005 005.4'32--dc22 2005048179 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com Taylor & Francis Group and the Auerbach Publications Web site at is the Academic Division of T&F Informa plc. http://www.auerbach-publications.com All source code in the book is released under GNU GPL v2. It can be used as desired under terms and conditions of GNU GPL v2. Trademarks Ⅲ MIPS is a registered trademark and YAMON is a trademark of MIPS Technologies. Ⅲ IBM and ClearCase are registered trademarks and PowerPC is a trademark of International Business Machines Corporation. Ⅲ UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Limited. Ⅲ X11 is a trademark of Massachusetts Institute of Technology. Ⅲ NEC is a registered trademark of NEC Corporation Ⅲ HP is a registered trademark of Hewlett-Packard Company. Ⅲ ColdFire is a registered trademark and Motorola is a trademark of Motorola, Inc Ⅲ Microblaze is trademark of Xilinx Inc Ⅲ Red Hat is a registered trademark and eCos and RedBoot are trademarks of Red Hat, Inc. Ⅲ uClinux is a registered trademark of Arcturus Networks Inc Ⅲ Linux is a registered trademark of Linus Torvalds Ⅲ GoAhead is a registered trademark of GoAhead Software, Inc Ⅲ RTLinux is a registered trademark and FSMLabs, RTLinuxPro and RTCore are trademarks of Finite State Machine Labs, Inc Ⅲ Debian is a registered trademark of Software in the Public Interest, Inc Ⅲ LMBench is a trademark of BitMover, Inc Ⅲ VRTX is a trademark of Microtech Research Inc Ⅲ VxWorks and pSOS are registered trademarks of Wind River Systems, Inc Ⅲ Trolltech is registered trademark and Qt is a trademark of Trolltech in Norway, the United States and other countries Ⅲ OpenGL is a registered trademark of Silicon Graphics, Inc Ⅲ Perforce is a registered trademark of Perforce Software, Inc Ⅲ Eclipse is trademark of Eclipse Foundation, Inc Ⅲ KDE and K Desktop Environment are trademarks of KDE Ⅲ FFmpeg is a trademark of Fabrice Bellard, originator of the FFmpeg project Ⅲ NVIDIA is a registered trademark of NVIDIA Corporation in the United States and other countries Ⅲ ViewML is a registered trademark of Century Software Inc Ⅲ QNX and Neutrino are registered trademarks of QNX Software Systems Ltd Ⅲ Nucleus is a trademark of Accelerated Technology, Inc Ⅲ Accelerated Technology is a registered trademark of Mentor Graphics Corporation Ⅲ ARM and StrongARM are registered trademarks and ARM7 and ARM9 are trademarks of Advanced RISC Machines, Ltd. Ⅲ AMD is a registered trademark of Advanced Micro Devices, Inc. Ⅲ Intel and Pentium are registered trademarks and i386 and XScale are trademarks of Intel Corporation. Ⅲ Sharp is a registered trademark of Sharp Electronics Corp. Ⅲ SPARC is a registered trademark of SPARC International, Inc., and is used under license by Sun Microsystems, Inc. Ⅲ Toshiba is a registered trademark of the Toshiba Corporation. Ⅲ MontaVista is registered trademark of MontaVista Software Inc. Ⅲ LynxOS and BlueCat are registered trademarks and LynuxWorks, SpyKer and VisualLynux are trademarks of LynuxWorks, Inc. Ⅲ Samsung is a registered trademark of Samsung Electronics America, Inc. and its related entities. Ⅲ Ericsson is a registered trademark of Ericsson, Inc. Ⅲ Atmel is registered trademarks of Atmel Corporation. Ⅲ TimeSys®, TimeStorm®, TimeStorm IDE™, TimeStorm LVS™, TimeStorm LDS™, TimeStorm LHD™, TimeSys Reservations™, TimeTrace®, Linux/RTTM and TimeWiz® are registered or unregistered trademarks of TimeSys Corporation in the United States and other countries. Ⅲ NeoMagic is registered trademark of NeoMagic Corporation. Ⅲ Transmeta is a trademark of Transmeta Corporation. Ⅲ Broadcom is a registered trademark of Broadcom Corporation and/or its subsidiaries. Ⅲ SuSE is a registered trademark of SuSE AG. vi Embedded Linux System Design and Development Ⅲ Borland is a registered trademark of Borland Software Corporation in the United States and other countries. Ⅲ Merant is a registered trademark of Merant. Ⅲ SnapGear is a registered trademark of SnapGear Inc. Ⅲ Matsushita is a trademark of the Matsushita Electric Corporation. Ⅲ I2C is a trademark of Philips Semiconductors Corporation. Ⅲ Philips® is a registered trademark of Philips Consumer Electronics Corporation. Ⅲ Cadenux is a trademark of Cadenux, LLC. Ⅲ ELinOS is a registered trademark of SYSGO AG. Ⅲ Metrowerks and CodeWarrior are trademarks of Metrowerks Corp. in the U.S. or other countries. Ⅲ FreeBSD is a registered trademark of the FreeBSD Foundation. Ⅲ IEEE and POSIX are registered trademarks of Institute of Electrical and Electronics Engineers, Inc. in the United States. Ⅲ Xtensa is a trademark belonging to Tensilica Inc. Ⅲ Fujitsu is a registered trademark of Fujitsu, Ltd. Ⅲ Firewire is a registered trademark of Apple computer. Ⅲ SuperH is a trademark of Hitachi, Ltd. Ⅲ Windows, WinCE and Microsoft are registered trademarks and MS-DOS and DirectX .are trademarks of Microsoft Corporation. Ⅲ Solaris and Java are registered trademarks and ChorusOS is a trademark of Sun Microsystems, Inc. in the U.S. or other countries. Ⅲ Symbian is a trademark of Symbian Ltd. Dedication Raghavan In memory of my late father Amol To Lord Krsna,... my parents, my wife Parul, and my brother Amit Sriram To my family and all Linux enthusiasts vii Contents 1 Intr oduction ............................................................................................. 1 1.1 History of Embedded Linux .................................................... 2 1.1.1 Year 1999 ..................................................................... 3 1.1.2 Year 2000 ..................................................................... 4 1.1.3 Year 2001 ..................................................................... 4 1.1.4 Year 2002 ..................................................................... 5 1.1.5 Year 2003 ..................................................................... 6 1.1.6 Year 2004 ..................................................................... 6 1.2 Why Embedded Linux? ............................................................ 7 1.2.1 Vendor Independence................................................. 7 1.2.2 Time to Market............................................................ 8 1.2.3 Varied Hardware Support ........................................... 8 1.2.4 Low Cost ...................................................................... 8 1.2.5 Open Source................................................................ 9 1.2.6 Standards (POSIX®) Compliance............................. 10 1.3 Embedded Linux Versus Desktop Linux .............................. 10 1.4 Frequently Asked Questions.................................................. 11 1.4.1 Is Linux Too Large?................................................... 11 1.4.2 Is Linux Real-Time Enough?..................................... 11 1.4.3 How Can I Protect My Proprietary Software?......... 12 1.4.4 Should I Buy a Commercial Embedded Linux Distribution?....................................................