Embedded Linux Primer : A Practical Real-World Approach
Embedded Linux Primer : A Practical Real-World Approach
Click to enlarge
Author(s): Hallinan, Christopher
ISBN No.: 9780137017836
Pages: 656
Year: 201010
Format: Trade Cloth (Hard Cover)
Price: $ 71.15
Dispatch delay: Dispatched between 7 to 15 days
Status: Available

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 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 3.


1.3 Intel Atom(tm) 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(tm) 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 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 5.


1.3 Bootstrap Loader 105 5.1.4 Boot Messages 106 5.2 Initialization Flow of Control 109 5.2.1 Kernel Entry Point: head.o 111 5.


2.2 Kernel Startup: main.c 113 5.2.3 Architecture Setup 114 5.3 Kernel Command-Line Processing 115 5.3.1 The __setup Macro 116 5.


4 Subsystem Initialization 122 5.4.1 The *__initcall Macros 122 5.5 The init Thread 125 5.5.1 Initialization Via initcalls 126 5.5.2 initcall_debug 127 5.


5.3 Final Boot Steps 127 5.6 Summary 129 5.6.1 Suggestions for Additional Reading 130 Chapter 6 User Space Initialization 131 6.1 Root File System 132 6.1.1 FHS: File System Hierarchy Standard 133 6.


1.2 File System Layout 133 6.1.3 Minimal File System 134 6.1.4 The Embedded Root FS Challenge 136 6.1.5 Trial-and-Error Method 137 6.


1.6 Automated File System Build Tools 137 6.2 Kernel''s Last Boot Steps 137 6.2.1 First User Space Program 139 6.2.2 Resolving Dependencies 139 6.2.


3 Customized Initial Process 140 6.3 The init Process 140 6.3.1 inittab 143 6.3.2 Sample Web Server Startup Script 145 6.4 Initial RAM Disk 146 6.4.


1 Booting with initrd 147 6.4.2 Bootloader Support for initrd 148 6.4.3 initrd Magic: linuxrc 150 6.4.4 The initrd Plumbing 151 6.4.


5 Building an initrd Image 152 6.5 Using initramfs 153 6.5.1 Customizing initramfs 154 6.6 Shutdown 156 6.7 Summary 156 6.7.1 Suggestions for Additional Reading 157 Chapter 7 Bootloaders 159 7.


1 Role of a Bootloader 160 7.2 Bootloader Challenges 161 7.2.1 DRAM Controller 161 7.2.2 Flash Versus RAM 162 7.2.3 Image Complexity 162 7.


2.4 Execution Context 165 7.3 A Universal Bootloader: Das U-Boot 166 7.3.1 Obtaining U-Boot 166 7.3.2 Configuring U-Boot 167 7.3.


3 U-Boot Monitor Commands 169 7.3.4 Network Operations 170 7.3.5 Storage Subsystems 173 7.3.6 Booting from Disk 174 7.4 Porting U-Boot 174 7.


4.1 EP405 U-Boot Port 175 7.4.2 U-Boot Makefile Configuration Target 176 7.4.3 EP405 First Build 177 7.4.4 EP405 Processor Initialization 178 7.


4.5 Board-Specific Initialization 181 7.4.6 Porting Summary 184 7.4.7 U-Boot Image Format 185 7.5 Device Tree Blob (Flat Device Tree 187 7.5.


1 Device Tree Source 189 7.5.2 Device Tree Compiler 192 7.5.3 Alternative Kernel Images Using DTB 193 7.6 Other Bootloaders 194 7.6.1 Lilo 194 7.


6.2 GRUB 195 7.6.3 Still More Bootloaders 197 7.7 Summary 197 7.7.1 Suggestions for Additional Reading 198 Chapter 8 Device Driver Basics 201 8.1 Device Driver Concepts 202 8.


1.1 Loadable Modules 203 8.1.2 Device Driver Architecture 204 8.1.3 Minimal Device Driver Example 204 8.1.4 Module Build Infrastructure 205 8.


1.5 Installing a Device Driver 209 8.1.6 Loading a Module 210 8.1.7 Module Parameters 211 8.2 Module Utilities 212 8.2.


1 insmod 212 8.2.2 lsmod 213 8.2.3 modprobe 213 8.2.4 depmod 214 8.2.


5 rmmod 215 8.2.6 modinfo 216 8.3 Driver Methods 217 8.3.1 Driver File System Operations 217 8.3.2 Allocation of Device Numbers 220 8.


3.3 Device Nodes and mknod 220 8.4 Bringing It All Together 222 8.5 Building Out-of-Tree Drivers 223 8.6 Device Drivers and the GPL 224 8.7 Summary 225 8.7.1 Suggestions for Additional Reading 226 Chapter 9 File Systems 227 9.


1 Linux File System Concepts 228 9.1.1 Partitions 229 9.2 ext2 230 9.2.1 Mounting a File System 232 9.2.2 Checking File System Integrity 233 9.


3 ext3 235 9.4 ext4 237 9.5 ReiserFS 238 9.6 JFFS2 239 9.6.1 Building a JFFS2 Image 240 9.7 cramfs 242 9.8 Network File System 244 9.


8.1 Root File System on NFS 246 9.9 Pseudo File Systems 248 9.9.1 /proc File System 249 9.9.2 sysfs 252 9.10 Other File Systems 255 9.


11 Building a Simple File System 256 9.12 Summary 258 9.12.1 Suggestions for Additional Reading 259 Chapter 10 MTD Subsystem 261 10.1 MTD Overview 262 10.1.1 Enabling MTD Services 263 10.1.


2 MTD Basics 265 10.1.3 Configuring MTD on Your Target 267 10.2 MTD Partitions 267 10.2.1 Redboot Partition Table Partitioning 269 10.2.2 Kernel Command-Line Partitioning 273 10.


2.3 Mapping Driver 274 10.2.4 Flash Chip Drivers 276 10.2.5 Board-Specific Initialization 276 10.3 MTD Utilities 279 10.3.


1 JFFS2 Root File System 281 10.4 UBI File System 284 10.4.1 Configuring for UBIFS 284 10.4.2 Building a UBIFS Image 284 10.4.3 Using UBIFS as the Root File System 287 10.


5 Summary 287 10.5.1 Suggestions for Additional Reading 288 Chapter 11 BusyBox 289 11.1 Introduction to BusyBox 290 11.1.1 BusyBox Is Easy 291 11.2 BusyBox Configuration 291 11.2.


1 Cross-Compiling BusyBox 293 11.3 BusyBox Operation 293 11.3.1 BusyBox init 297 11.3.2 Sample rcS Initialization Script 299 11.3.3 BusyBox Target Installation 300 11.


3.4 BusyBox Applets 302 11.4 Summary 303 11.4.1 Suggestions for Additional Reading 304 Chapter 12 Embedded Development Environment 305 12.1 Cross-Development Environment 306 12.1.1 "Hello World" Embedded 307 12.


2 Host System Requirements 311 12.2.1 Hardware Debug Probe 311 12.3 Hosting Target Boards 312 12.3.1 TFTP Server 312 12.3.2 BOOTP/DHCP Server 313 12.


3.3 NFS Server 316 12.3.4 Target NFS Root Mount 318 12.3.5 U-Boot NFS Root Mount Example 320 12.4 Summary 322 12.4.


1 Suggestions for Additional Reading 323 Chapter 13 Development Tools 325 13.1 GNU Debugger (GDB) 326 13.1.1 Debugging a Core Dump 327 13.1.2.


To be able to view the table of contents for this publication then please subscribe by clicking the button below...
To be able to view the full description for this publication then please subscribe by clicking the button below...