PRENTICEHALLPRENTICEHALL OPEN SOURCE SOFTWAREDEVELOPMENT SERIESEmbeddedLinux PrimerSecond EditionAPracticalReal-WorldApproachChristopherHallinan
ptg
ContentsForeword for the First Edition.CXForeword for the Second Edition.xxviPrefacexviiAcknowledgments for theFirst Edition..xxxiiAcknowledgmentsfortheSecondEdition..xxxVAbout the Author.xxxviChapter1 Introduction.1.1WhyLinux?..21.2EmbeddedLinuxToday31.3OpenSourceandtheGPL3.41.3.1FreeVersusFreedom1.4Standards and Relevant Bodies.51.4.1LinuxStandardBase51.4.2Linux Foundation61.4.36Carrier-Grade Linux1.4.4MobileLinuxInitiative:Moblin.71.4.57Service AvailabilityForum.81.5Summary81.5.1Suggestions forAdditional Readingvii
ptg vii 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 Download at www.wowebook.com
viliEmbedded Linux Primer, Second EditionChapter 2The Big Picture.L2.1 Embedded or Not?10112.1.1 BIOS Versus Bootloader122.2AnatomyofanEmbeddedSystem..132.2.1Typical Embedded Linux Setup.142.2.2Starting theTarget Board2.2.3 Booting the Kernel...162.2.4 Kernel Initialization:Overview.18.. 192.2.5First User Space Process: init....202.3StorageConsiderations.202.3.1Flash Memory.222.3.2NANDFlash...232.3.3Flash Usage....242.3.4FlashFile Systems2.3.525MemorySpace...262.3.6Execution Contexts..282.3.7Process Virtual Memory...302.3.8Cross-DevelopmentEnvironment.322.4Embedded LinuxDistributions.32.4.1Commercial LinuxDistributions.......332.4.2Do-It-Yourself Linux Distributions..342.5Summary.352.5.1 Suggestions forAdditionalReadingChapter3ProcessorBasics...37383.1Stand-AloneProcessorIBM970FX393.1.13.1.2IntelPentiumM.39
ptg 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 Download at www.wowebook.com
ixContents3.1.3IntelAtomTM40.403.1.4FreescaleMPC7448..413.1.5CompanionChipsets.433.2Integrated Processors: Systems on Chip..443.2.1 Power Architecture...443.2.2FreescalePowerArchitecture..453.2.3FreescalePowerQUICCI..463.2.4FreescalePowerQUICCII..473.2.5PowerQUICCIIPro..FreescalePowerQUICCIII..483.2.6Freescale QorIQTM.483.2.7.503.2.8AMCCPowerArchitecture3.2.9MIPS....53..543.2.10BroadcomMIPS3.2.11OtherMIPS..55ARM..553.2.123.2.13TIARM..563.2.14.58FreescaleARM.3.2.15OtherARMProcessors59..593.3Other Architectures....603.4HardwarePlatforms..603.4.1CompactPCI3.4.2ATCA..60..613.5Summary.623.5.1 Suggestions forAdditional Reading
ptg 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 3.2.10 Broadcom MIPS . . 54 3.2.11 Other MIPS . 55 3.2.12 ARM . 55 3.2.13 TI ARM . . 56 3.2.14 Freescale ARM . . 58 3.2.15 Other ARM Processors . . 59 3.3 Other Architectures . 59 3.4 Hardware Platforms . . 60 3.4.1 CompactPCI . . 60 3.4.2 ATCA . . 60 3.5 Summary . . 61 3.5.1 Suggestions for Additional Reading . . 62 Download at www.wowebook.com
Embedded Linux Primer, Second Edition.63Chapter4TheLinuxKernel:ADifferentPerspective.644.1Background.654.1.1 Kernel Versions4.1.2Kernel SourceRepositories..67.684.1.3UsinggittoDownloadaKernel...684.2LinuxKernel Construction..694.2.1Top-Level Source Directory.694.2.2CompilingtheKernel..724.2.3TheKernel Proper:vmlinux4.2.4Kernel Image Components.....734.2.5SubdirectoryLayout..774.3Kernel Build System..78...784.3.1 TheDot-Config....804.3.2 ConfigurationEditor(s).834.3.3MakefileTargets894.4Kernel Configuratior4.4.1 Custom Configuration Options.......914.4.2Kernel Makefiles.95964.5KernelDocumentation4.6ObtainingaCustomLinuxKernel..964.6.1What Else DoI Need?.974.7Summary.974.7.1 SuggestionsforAdditionalReading..98..99Chapter5 Kernel Initialization..1005.1CompositeKernel Image:PiggyandFriends1035.1.1TheImage Object..5.1.2Architecture Objects.......104
ptg x Embedded Linux Primer, Second Edition Chapter 4 The Linux Kernel: A Different Perspective .63 4.1 Background . . 64 4.1.1 Kernel Versions . 65 4.1.2 Kernel Source Repositories . 67 4.1.3 Using git to Download a Kernel . 68 4.2 Linux Kernel Construction. . 68 4.2.1 Top-Level Source Directory . . 69 4.2.2 Compiling the Kernel . . 69 4.2.3 The Kernel Proper: vmlinux . . 72 4.2.4 Kernel Image Components . 73 4.2.5 Subdirectory Layout . 77 4.3 Kernel Build System . . 78 4.3.1 The Dot-Config . 78 4.3.2 Configuration Editor(s) . 80 4.3.3 Makefile Targets . 83 4.4 Kernel Configuration . . 89 4.4.1 Custom Configuration Options . . 91 4.4.2 Kernel Makefiles . 95 4.5 Kernel Documentation . 96 4.6 Obtaining a Custom Linux Kernel . . 96 4.6.1 What Else Do I Need? . 97 4.7 Summary . . 97 4.7.1 Suggestions for Additional Reading . 98 Chapter 5 Kernel Initialization .99 5.1 Composite Kernel Image: Piggy and Friends . . 100 5.1.1 The Image Object . 103 5.1.2 Architecture Objects . 104 Download at www.wowebook.com