Introduction p. 1 Why Linux? p. 2 Embedded Linux Today p. 3 Open Source and the GPL p. 3 Free Versus Freedom p. 4 Standards and Relevant Bodies p.

Similar documents
Embedded Linux Primer, Second Edition

D1 - Embedded Linux. Building and installing an embedded and real-time Linux platform. Objectives. Course environment.

D1Y - Embedded Linux with Yocto

Embedded Linux system development training 5-day session

D1S - Embedded Linux with Ac6 System Workbench

Debugging Linux With LinuxScope-JTD

Kernel Internals. Course Duration: 5 days. Pre-Requisites : Course Objective: Course Outline

EMBEDDED LINUX ON ARM9 Weekend Workshop

Linux Kernel Architecture

UFCETW-20-2 Examination Answer all questions in Section A (60 marks) and 2 questions from Section B (40 marks)

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu

Developing Environment for Intel Mainstone Board

PL-I Assignment Broup B-Ass 5 BIOS & UEFI

Kernel Boot-Time Optimization

Porting Linux to a New Architecture

Porting Linux to a New Architecture

Advanced Operating Systems and Virtualization. Alessandro Pellegrini A.Y. 2017/2018

D-TACQ 2G Programmer's Guide

U-boot Porting guide. Saurin Suthar. Dashboard April 2007 Issue

Acknowledgments About the Authors

Reverse Engineering NAND Flash

Embedded Linux Architecture

Yocto Project & Embedded Linux

Embedded Linux kernel and driver development training 5-day session

PathFinder-XD for MIPS Powered Devices. Simulator

Boot. How OS boots

CSE 265: System and Network Administration

CSE 265: System and Network Administration

First Steps. esom/sk4 esom/3517 Embedded Linux Starter Kit

Update on boot time reduction techniques

Oracle Linux 7: System Administration Ed 2 Duration: 5 Days

Embedded Linux Conference Europe Sascha Hauer

Embedded Systems Programming

The Linux IPL Procedure

Building, Running and Monitoring the Linux kernel

CompTIA Linux+/LPIC-1 COPYRIGHTED MATERIAL

Intro to Segmentation Fault Handling in Linux. By Khanh Ngo-Duy

LinuxScope-JTD Installation Guide. Version 4.0.0

Contents. Foreword...xxi Preface...xxiii Acknowledgments...xxix About the Author...xxx

Evaluation of MIPS Prelinking

Loadable Kernel Modules

Adding hardware support to Buildroot

MODULE 02. Installation

Faculty of Computer Science Institute for System Architecture, Operating Systems Group. Complex Lab Operating Systems 2016 Winter Term.

Certification. System Initialization and Services

Oracle Linux 7: System Administration Ed 1

Track Two Building an Internet Radio with the TI Sitara AM3517 using LinuxLink

ECEN 449: Microprocessor System Design Department of Electrical and Computer Engineering Texas A&M University

Debugging Kernel without Debugger

RTOS Debugger for Linux - Run Mode

Embedded lightweight unix

Make Your Own Linux Module CS 444/544

Linux Kernel Compilation

bdigdb for BDI2000 PowerPC4xx version

Oracle Linux 7: System Administration Ed 1

CREATION OF A MINIMAL STAND ALONE RTAI SYSTEM ================================================

Oracle Linux 7: System Administration Ed 2 NE

Oracle Linux 7: System Administration Ed 1 LVC

ECE 598 Advanced Operating Systems Lecture 2

PathFinder-XD for MIPS support for Broadcom Devices

Development Environment of Embedded System

Embedded Real-Time Linux for Cable Robot Control

Contents. 1.1 What Operating Systems Do Computer-System Organization Computer-System Architecture 12. Operating-System Structures

DTK2410 Specification

Introduction to Embedded Bootloader. Intel SSG/SSD/UEFI

CST8177 Linux II. Linux Boot Process

Configuring and Building Palacios/Linux

Arch Linux Grub You Need To Load The Kernel First

Debugging Linux systems using GDB and QEMU. Khem Raj

The State of Kernel Debugging Technology. Jason Wessel - Product Architect for WR Linux Core Runtime - Kernel.org KDB/KGDB Maintainer

Firmware for Embedded Computing. National Chiao Tung University Chun-Jen Tsai 3/10/2011

Booting Linux Fast & Fancy. Embedded Linux Conference Europe Cambridge, Robert Schwebel

The Right Approach to Minimal Boot Times

Azure Sphere: Fitting Linux Security in 4 MiB of RAM. Ryan Fairfax Principal Software Engineering Lead Microsoft

Requirements for Building and Using the Kernel

Systems Programming. Fatih Kesgin &Yusuf Yaslan Istanbul Technical University Computer Engineering Department 18/10/2005

Outline Background Jaluna-1 Presentation Jaluna-2 Presentation Overview Use Cases Architecture Features Copyright Jaluna SA. All rights reserved

Compute Node Design for DAQ and Trigger Subsystem in Giessen. Justus Liebig University in Giessen

Porting Linux to a new SoC

Linux Driver and Embedded Developer

U-Boot and Linux Kernel Debug using CCSv5

Release Note MPI/XMP-Linux Support Package

Linux Kernel Module Programming. Tushar B. Kute,

PEEDI. Development tools Waidhausenstrasse 13/ Vienna Austria Tel: Fax: Web:

ARM Linux & GNU. Philippe Robin. Beijing June 2004

If you don't care about how it works but you just would like that it works read here. Other wise jump to the next chapter.

Contents in Detail. Acknowledgments

OM-Cube Project. Contents. V. Hiribarren - N. Marchand - N. Talfer OM-Cube Project 1. V. Hiribarren - N. Marchand - N. Talfer OM-Cube Project 2

First Steps. esom/sk5 esom/3517 Embedded Linux Starter Kit

Chapter 6. Boot time configuration. Chapter 6 Boot time configuration

MV 4412 Android 4.0 Compilation

Eclipse-Based CodeWarrior Debugger

Contents. 1.1 What Operating Systems Do Computer-System Organization Computer-System Architecture 12. Operating-System Structures

Petitboot - A kexec based bootloader. Geoff Levand - Linux Plumbers Conference 2012 August 29-31, San Diego, CA

Using kgdb and the kgdb Internals

The kernel is not to be confused with the Basic Input/Output System (BIOS).

9/19/18. COS 318: Operating Systems. Overview. Important Times. Hardware of A Typical Computer. Today CPU. I/O bus. Network

Bare Metal User Guide

MV V310 Android 4.0 Compilation

Hardware Assisted Debug with Embedix Linux

Transcription:

Foreword p. xix Preface p. xxi Acknowledgments p. xxvii About the Author p. xxix Introduction p. 1 Why Linux? p. 2 Embedded Linux Today p. 3 Open Source and the GPL p. 3 Free Versus Freedom p. 4 Standards and Relevant Bodies p. 5 Linux Standard Base p. 5 Open Source Development Labs p. 5 Chapter Summary p. 7 Suggestions for Additional Reading p. 7 Your First Embedded Experience p. 9 Embedded or Not? p. 10 BIOS Versus Bootloader p. 11 Anatomy of an Embedded System p. 12 Typical Embedded Linux Setup p. 14 Starting the Target Board p. 15 Booting the Kernel p. 16 Kernel Initialization: Overview p. 17 First User Space Process: init p. 19 Storage Considerations p. 19 Flash Memory p. 20 NAND Flash p. 22 Flash Usage p. 23 Flash File Systems p. 24 Memory Space p. 25 Execution Contexts p. 26 Process Virtual Memory p. 28 Cross-Development Environment p. 30 Embedded Linux Distributions p. 32 Commercial Linux Distributions p. 33 Do-It-Yourself Linux Distributions p. 34 Chapter Summary p. 34 Suggestions for Additional Reading p. 35 Processor Basics p. 37 Stand-alone Processors p. 38 IBM 970FX p. 39 Intel Pentium M p. 39

Freescale MPC7448 p. 40 Companion Chipsets p. 41 Integrated Processors: Systems on Chip p. 43 PowerPC p. 44 AMCC PowerPC p. 44 Freescale PowerPC p. 47 MIPS p. 52 Broadcom MIPS p. 53 AMD MIPS p. 55 Other MIPS p. 56 ARM p. 56 TI ARM p. 56 Freescale ARM p. 58 Intel ARM XScale p. 59 Other ARM p. 60 Other Architectures p. 60 Hardware Platforms p. 61 CompactPCI p. 61 ATCA p. 61 Chapter Summary p. 62 Suggestions For Additional Reading p. 63 The Linux Kernel-A Different Perspective p. 65 Background p. 66 Kernel Versions p. 67 Kernel Source Repositories p. 69 Linux Kernel Construction p. 70 Top-Level Source Directory p. 70 Compiling the Kernel p. 71 The Kernel Proper: vmlinux p. 73 Kernel Image Components p. 75 Subdirectory Layout p. 79 Kernel Build System p. 79 The Dot-Config p. 80 Configuration Editor(s) p. 82 Makefile Targets p. 85 Kernel Configuration p. 88 Custom Configuration Options p. 90 Kernel Makefiles p. 94 Kernel Documentation p. 95 Obtaining a Linux Kernel p. 96 What Else Do I Need? p. 96

Chapter Summary p. 97 Suggestions for Additional Reading p. 98 Kernel Initialization p. 99 Composite Kernel Image: Piggy and Friends p. 100 The Image Object p. 103 Architecture Objects p. 104 Bootstrap Loader p. 105 Boot Messages p. 106 Initialization Flow of Control p. 109 Kernel Entry Point: head.o p. 111 Kernel Startup: main.c p. 113 Architecture Setup p. 114 Kernel Command Line Processing p. 114 The_setup Macro p. 116 Subsystem Initialization p. 121 The*_initcall Macros p. 122 The init Thread p. 123 Initialization via initcalls p. 125 Final Boot Steps p. 126 Chapter Summary p. 128 Suggestions for Additional Reading p. 128 System Initialization p. 129 Root File System p. 130 FHS: File System Hierarchy Standard p. 131 File System Layout p. 131 Minimal File System p. 132 The Root FS Challenge p. 134 Trial-and-Error Method p. 135 Automated File System Build Tools p. 135 Kernel's Last Boot Steps p. 136 First User Space Program p. 137 Resolving Dependencies p. 138 Customized Initial Process p. 138 The Init Process p. 139 inittab p. 142 Example Web Server Startup Script p. 144 Initial RAM Disk p. 145 Initial RAM Disk Purpose p. 146 Booting with initrd p. 146 Bootloader Support for initrd p. 147 initrd Magic: linuxrc p. 149

The initrd Plumbing p. 150 Building an initrd Image p. 151 Using initramfs p. 152 Shutdown p. 153 Chapter Summary p. 154 Suggestions for Additional Reading p. 155 Bootloaders p. 157 Role of a Bootloader p. 158 Bootloader Challenges p. 159 DRAM Controller p. 159 Flash Versus RAM p. 160 Image Complexity p. 160 Execution Context p. 163 A Universal Bootloader: Das U-Boot p. 164 System Configuration: U-Boot p. 164 U-Boot Command Sets p. 167 Network Operations p. 167 Storage Subsystems p. 170 Booting from Disk: U-Boot p. 171 Porting U-Boot p. 172 EP405 U-Boot Port p. 172 U-Boot Makefile Configuration Target p. 174 EP405 Processor Initialization p. 174 Board-Specific Initialization p. 177 Porting Summary p. 180 U-Boot Image Format p. 181 Other Bootloaders p. 183 Lilo p. 183 GRUB p. 184 Still More Bootloaders p. 186 Chapter Summary p. 186 Suggestions for Additional Reading p. 187 Device Driver Basics p. 189 Device Driver Concepts p. 190 Loadable Modules p. 191 Device Driver Architecture p. 192 Minimal Device Driver Example p. 192 Module Build Infrastructure p. 193 Installing Your Device Driver p. 197 Loading Your Module p. 198 Module Utilities p. 199

insmod p. 199 Module Parameters p. 199 lsmod p. 201 modprobe p. 201 depmod p. 203 rmmod p. 203 modinfo p. 204 Driver Methods p. 205 Driver File System Operations p. 205 Device Nodes and mknod p. 208 Bringing It All Together p. 209 Device Drivers and the GPL p. 211 Chapter Summary p. 211 Suggestions for Additional Reading p. 212 File Systems p. 213 Linux File System Concepts p. 214 Partitions p. 214 ext2 p. 216 Mounting a File System p. 218 Checking File System Integrity p. 219 ext3 p. 221 ReiserFS p. 224 JFFS2 p. 225 cramfs p. 228 Network File System p. 230 Root File System on NFS p. 232 Pseudo File Systems p. 234 Proc File System p. 234 sysfs p. 238 Other File Systems p. 240 Building a Simple File System p. 242 Chapter Summary p. 243 Suggestions for Additional Reading p. 244 MTD Subsystem p. 247 Enabling MTD Services p. 248 Building MTD p. 250 MTD Basics p. 251 Configuring MTD p. 253 MTD Partitions p. 253 Redboot Partition Table Partitioning p. 255 Kernel Command Line Partitioning p. 259

Mapping Driver p. 260 Flash Chip Drivers p. 262 Board-Specific Initialization p. 263 MTD Utilities p. 265 JFFS2 Root File System p. 268 Chapter Summary p. 270 Suggestions for Additional Reading p. 271 BusyBox p. 273 Introduction to BusyBox p. 274 BusyBox is Easy p. 275 BusyBox Configuration p. 275 Cross-Compiling BusyBox p. 277 BusyBox Operation p. 278 BusyBox Init p. 281 Example rcs Initialization Script p. 283 BusyBox Target Installation p. 284 BusyBox Commands p. 286 Chapter Summary p. 288 Suggestions for Additional Reading p. 288 Embedded Development Environment p. 289 Cross-Development Environment p. 290 "Hello World"-Embedded p. 291 Host System Requirements p. 295 Hardware Debug Probe p. 296 Hosting Target Boards p. 296 TFTP Server p. 296 BOOTP/DHCP Server p. 298 NFS Server p. 300 Target NFS Root Mount p. 302 U-Boot NFS Root Mount Example p. 304 Chapter Summary p. 306 Suggestions for Additional Reading p. 307 Development Tools p. 309 GNU Debugger (GDB) p. 310 Debugging a Core Dump p. 311 Invoking GDB p. 313 Debug Session in GDB p. 315 Data Display Debugger p. 317 cbrowser/cscope p. 319 Tracing and Profiling Tools p. 321 strace p. 321

strace Variations p. 325 ltrace p. 327 ps p. 328 top p. 330 mtrace p. 332 dmalloc p. 334 Kernel Oops p. 337 Binary Utilities p. 340 readelf p. 340 Examining Debug Info Using readelf p. 342 objdump p. 344 objcopy p. 345 Miscellaneous Binary Utilities p. 346 strip p. 346 addr2line p. 346 strings p. 347 ldd p. 347 nm p. 348 prelink p. 349 Chapter Summary p. 349 Suggestions for Additional Reading p. 350 Kernel Debugging Techniques p. 351 Challenges to Kernel Debugging p. 352 Using KGDB for Kernel Debugging p. 353 KGDB Kernel Configuration p. 355 Target Boot with KGDB Support p. 355 Useful Kernel Breakpoints p. 358 Debugging the Linux Kernel p. 360 gdb Remote Serial Protocol p. 361 Debugging Optimized Kernel Code p. 364 gdb User-Defined Commands p. 369 Useful Kernel gdb Macros p. 370 Debugging Loadable Modules p. 378 printk Debugging p. 383 Magic SysReq Key p. 384 Hardware-Assisted Debugging p. 385 Programming Flash Using a JTAG Probe p. 387 Debugging with a JTAG Probe p. 389 When It Doesn't Boot p. 392 Early Serial Debug Output p. 393 Dumping the printk Log Buffer p. 394

KGDB on Panic p. 396 Chapter Summary p. 397 Suggestions for Additional Reading p. 398 Debugging Embedded Linux Applications p. 399 Target Debugging p. 400 Remote (Cross) Debugging p. 400 gdbserver p. 403 Debugging with Shared Libraries p. 405 Shared Library Events in GDB p. 407 Debugging Multiple Tasks p. 411 Debugging Multiple Processes p. 411 Debugging Multithreaded Applications p. 414 Debugging Bootloader/Flash Code p. 417 Additional Remote Debug Options p. 417 Debugging via Serial Port p. 418 Attaching to a Running Process p. 418 Chapter Summary p. 419 Suggestions for Additional Reading p. 419 Porting Linux p. 421 Linux Source Organization p. 422 The Architecture Branch p. 422 Custom Linux for Your Board p. 424 Prerequisites and Assumptions p. 426 Customizing Kernel Initialization p. 427 Static Kernel Command Line p. 429 Platform Initialization p. 431 Early Variable Access p. 435 Board Information Structure p. 436 Machine-Dependent Calls p. 438 Putting It All Together p. 439 Other Architectures p. 442 Chapter Summary p. 442 Suggestions for Additional Reading p. 443 Linux and Real Time p. 445 What Is Real Time? p. 446 Soft Real Time p. 446 Hard Real Time p. 446 Linux Scheduling p. 447 Latency p. 447 Kernel Preemption p. 449 Impediments to Preemption p. 449

Preemption Models p. 451 SMP Kernel p. 452 Sources of Preemption Latency p. 453 Real-Time Kernel Patch p. 453 Real-Time Features p. 455 O(1) Scheduler p. 458 Creating a Real-Time Process p. 458 Critical Section Management p. 459 Debugging the Real-Time Kernel p. 460 Soft Lockup Detection p. 460 Preemption Debugging p. 461 Debug Wakeup Timing p. 461 Wakeup Latency History p. 462 Interrupt Off Timing p. 462 Interrupt Off History p. 462 Latency Tracing p. 464 Debugging Deadlock Conditions p. 466 Runtime Control of Locking Mode p. 467 Chapter Summary p. 467 Suggestions for Additional Reading p. 467 GNU Public License p. 469 U-Boot Configurable Commands p. 479 BusyBox Commands p. 483 SDRAM Interface Considerations p. 491 SDRAM Basics p. 492 SDRAM Refresh p. 493 Clocking p. 494 SDRAM Setup p. 495 Summary p. 500 Suggestions for Additional Reading p. 500 Open Source Resources p. 501 Sample BDI-2000 Configuration File p. 505 Index p. 513 Table of Contents provided by Blackwell's Book Services and R.R. Bowker. Used with permission.