导语
内容提要
克里斯·西蒙兹著的《精通嵌入式Linux编程(影印版)(英文版)》带领你检视整个产品周期,深入讲解每个产品阶段用到的组件和选项。首先学习的是工具链、bootloader、Linux内核以及根文件系统的配置方法。然后学习使用两种最常用的构建系统(Buildroot和Yocto Project)来加快和简化开发过程。打下了坚实的基础之后,接下来要讲述如何发挥出raw NAND/NOR flash memory(闪存)和managed flash(管理闪存)eMMC芯片的效用,其中包括延长设备生寸期以及执行可靠性in-field更新的机制。随后要讲到POSIX线程的用法,这对于最终设备的响应性以及性能有着极大的影响。最后会介绍一些性能分析技术以及使用perf和ftrace跟踪应用程序和内核代码。本书适合于熟悉嵌入式系统,希望学习如何制造一流设备的Linux开发人员以及系统程序员。要求读者具备基本的C语言基础和系统编程经验。
目录
Preface
Chapter 1: Starting Out
Selecting the right operating system
The players
Project lifecycle
The four elements of embedded Linux
Open source
Licenses
Hardware for embedded Linux
Hardware used in this book
The BeagleBone Black
QEMU
Software used in this book
Summary
Chapter 2: Learning About Toolchains
What is a toolchain?
Types of toolchain - native versus cross toolchain
CPU architectures
Choosing the C library
Finding a toolchain
Building a toolchain using crosstooI-NG
Installing crosstooI-NG
Selecting the toolchain
Anatomy of a toolchain
Finding out about your cross compiler
The sysroot, library, and header files
Other tools in the toolchain
Looking at the components of the C library
Linking with libraries: static and dynamic linking
Static libraries
Shared libraries
Understanding shared library version numbers
The art of cross compiling
Simple makefiles
Autotools
An example: SQLite
Package configuration
Problems with cross compiling
Summary
Chapter 3: All About Bootloaders
What does a bootloader do?
The boot sequence
Phase 1: ROM code
Phase 2: SPL
Phase 3: TPL
Booting with UEFI firmware
Moving from bootloader to kernel
Introducing device trees
Device tree basics
The reg property
Phandles and interrupts
Device tree include files
Compiling a device tree
Choosing a bootloader
U-Boot
Building U-Boot
Installing U-Boot
Using U-Boot
Environment variables
Boot image format
Loading images
Booting Linux
Automating the boot with U-Boot scripts
Porting U-Boot to a new board
Kconfig and U-Boot
Board-specific files
Configuration header files
Building and testing
……
Chapter 4 Porting and configuring the Kernel
Chapter 5 Building a Root Filesystem
Chapter 6 Selecting a Build System
Chapter 7 Creating a Storage Strategy
Chapter 8 Introducing Device Drivers
Chapter 9 Starting up-the init Program
Chapter 10 Learning About Processes and Threads
Chapter 11 Managing Memory
Chapter 12 Debugging with GDB
Chapter 13 Profiling and Tracing
Chapter 14 Real-time Programming