Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U.S. Corporate and Government Sales (800) 382-3419 [email protected] For sales outside the United States, please contact: International Sales [email protected] Visit us on the Web: informit.com/aw Library of Congress Cataloging-in-Publication Data: Hallinan, Christopher. Embedded Linux primer : a practical real-world approach / Christopher Hallinan. p. cm. ISBN 978-0-13-701783-6 (hardback : alk. paper) 1. Linux. 2. Operating systems (Computers) 3. Embedded computer systems--Programming. I. Title. QA76.76.O63H34462 2011 005.4’32--dc22 2010032891 Copyright © 2011 Pearson Education, Inc. All rights reserved. Printed in the United States of America. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, write to: Pearson Education, Inc. Rights and Contracts Department 501 Boylston Street, Suite 900 Boston, MA 02116 Fax (617) 671-3447 ISBN-13: 978-0-137-01783-6 ISBN-10: 0-137-01783-9 Text printed in the United States on recycled paper at Courier in Westford, Massachusetts. First printing September 2010 Editor-in-Chief: Mark L. Taub Executive Acquisitions Editor: Debra Williams Cauley Development Editor: Michael Thurston Managing Editor: Kristy Hart Project Editors: Alexandra Maurer and Jovana San Nicolas-Shirley Copy Editor: Gayle Johnson Indexer: Heather McNeill Proofreader: Sarah Kearns Technical Reviewers: Robert P.J. Day, Kurt Lloyd, Jon Masters, Sandra Terrace, and Mark A. Yoder Publishing Coordinator: Kim Boedigheimer Cover Designer: Alan Clements Compositor: Tricia Bronkella Contents Foreword for the First Edition .......................................................................................xxv Foreword for the Second Edition ..................................................................................xxvi Preface .........................................................................................................................xxvii Acknowledgments for the First Edition ......................................................................xxxiii Acknowledgments for the Second Edition ...................................................................xxxv About the Author .......................................................................................................xxxvi Chapter 1 Introduction............................................................................................1 1.1 Why Linux? .............................................................................................................2 1.2 Embedded Linux Today ..........................................................................................3 1.3 Open Source and the GPL ...................................................................................... 3 1.3.1 Free Versus Freedom ........................................................................................4 1.4 Standards and Relevant Bodies ................................................................................5 1.4.1 Linux Standard Base ........................................................................................ 5 1.4.2 Linux Foundation ............................................................................................6 1.4.3 Carrier-Grade Linux ........................................................................................6 1.4.4 Mobile Linux Initiative: Moblin....................................................................... 7 1.4.5 Service Availability Forum................................................................................ 7 1.5 Summary .................................................................................................................8 1.5.1 Suggestions for Additional Reading ..................................................................8 vii viii Embedded Linux Primer, Second Edition Chapter 2 The Big Picture .......................................................................................9 2.1 Embedded or Not? ................................................................................................10 2.1.1 BIOS Versus Bootloader ................................................................................11 2.2 Anatomy of an Embedded System .........................................................................12 2.2.1 Typical Embedded Linux Setup ..................................................................... 13 2.2.2 Starting the Target Board ............................................................................... 14 2.2.3 Booting the Kernel .........................................................................................16 2.2.4 Kernel Initialization: Overview ...................................................................... 18 2.2.5 First User Space Process: init ....................................................................... 19 2.3 Storage Considerations ..........................................................................................20 2.3.1 Flash Memory ................................................................................................20 2.3.2 NAND Flash .................................................................................................22 2.3.3 Flash Usage ....................................................................................................23 2.3.4 Flash File Systems .......................................................................................... 24 2.3.5 Memory Space ...............................................................................................25 2.3.6 Execution Contexts ........................................................................................26 2.3.7 Process Virtual Memory .................................................................................28 2.3.8 Cross-Development Environment ..................................................................30 2.4 Embedded Linux Distributions .............................................................................32 2.4.1 Commercial Linux Distributions ................................................................... 33 2.4.2 Do-It-Yourself Linux Distributions ................................................................33 2.5 Summary ...............................................................................................................34 2.5.1 Suggestions for Additional Reading ................................................................35 Chapter 3 Processor Basics ....................................................................................37 3.1 Stand-Alone Processors ..........................................................................................38 3.1.1 IBM 970FX ...................................................................................................39 3.1.2 Intel Pentium M ............................................................................................ 39 Contents ix 3.1.3 Intel Atom™ .................................................................................................40 3.1.4 Freescale MPC7448 .......................................................................................40 3.1.5 Companion Chipsets .....................................................................................41 3.2 Integrated Processors: Systems on Chip .................................................................43 3.2.1 Power Architecture .........................................................................................44 3.2.2 Freescale Power Architecture .......................................................................... 44 3.2.3 Freescale PowerQUICC I ...............................................................................45 3.2.4 Freescale PowerQUICC II ............................................................................. 46 3.2.5 PowerQUICC II Pro ......................................................................................47 3.2.6 Freescale PowerQUICC III ............................................................................48 3.2.7 Freescale QorIQ™ ........................................................................................48 3.2.8 AMCC Power Architecture ............................................................................50 3.2.9 MIPS .............................................................................................................53
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages93 Page
-
File Size-