Book Image

Mastering Embedded Linux Programming

By : Chris Simmonds
Book Image

Mastering Embedded Linux Programming

By: Chris Simmonds

Overview of this book

Mastering Embedded Linux Programming takes you through the product cycle and gives you an in-depth description of the components and options that are available at each stage. You will begin by learning about toolchains, bootloaders, the Linux kernel, and how to configure a root filesystem to create a basic working device. You will then learn how to use the two most commonly used build systems, Buildroot and Yocto, to speed up and simplify the development process. Building on this solid base, the next section considers how to make best use of raw NAND/NOR flash memory and managed flash eMMC chips, including mechanisms for increasing the lifetime of the devices and to perform reliable in-field updates. Next, you need to consider what techniques are best suited to writing applications for your device. We will then see how functions are split between processes and the usage of POSIX threads, which have a big impact on the responsiveness and performance of the final device The closing sections look at the techniques available to developers for profiling and tracing applications and kernel code using perf and ftrace.
Table of Contents (22 chapters)
Mastering Embedded Linux Programming
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Index

A

  • Application Binary Interface (ABI)
    • about / CPU architectures
  • applications
    • debugging, GDB used / Debugging applications using GDB
  • ARM machine numbers
    • references / Without a device tree
  • Autotools
    • about / Autotools
    • SQLite library / An example: SQLite

B

  • Babeltrace
    • URL / Using LTTng
  • Barebox
    • about / Barebox
    • URL / Barebox
    • reference / Barebox
    • obtaining / Getting Barebox
    • building / Building Barebox
  • BCH (Bose-Chaudhuri-Hocquenghem)
    • about / NAND flash
  • BeagleBoard
    • URL / The BeagleBone Black
  • BeagleBone Black
    • about / The BeagleBone Black
    / BeagleBone Black
  • binutils
    • URL / What is a toolchain?
  • block devices
    • defining / Block devices
  • board-specific files
    • about / Board-specific files
  • board vendors
    • about / The players
  • bootloader / The four elements of embedded Linux
    • defining / What does a bootloader do?
    • moving, to kernel / Moving from bootloader to kernel
    • selecting / Choosing a bootloader
  • boot ramdisk
    • creating / Creating a boot ramdisk
    • standalone ramdisk / Standalone ramdisk
    • ramdisk, booting / Booting the ramdisk
    • booting, with QEMU / Booting with QEMU
    • BeagleBone Black, booting / Booting the BeagleBone Black
    • proc, mounting / Mounting proc
    • ramdisk cpio, building / Building a ramdisk cpio into the kernel image
    • kernel, building with ramdisk / Another way to build a kernel with ramdisk
    • initrd format / The old initrd format
  • boot sequence
    • about / The boot sequence
    • ROM code / Phase 1: ROM code
    • SPL / Phase 2: SPL
    • TPL / Phase 3: TPL
  • BSD (Berkeley Software Distribution)
    • about / Licenses
  • Buildroot
    • init scripts / Buildroot init scripts
    • setting up / Setting up Buildroot
  • Buildroot menuconfig
    • BR2_LINUX_KERNEL_TOOL_PERF / Building perf with Buildroot
    • BR2_ENABLE_DEBUG / Building perf with Buildroot
    • BR2_STRIP = none / Building perf with Buildroot
  • Buildroot project
    • URL / Buildroot
    • defining / Buildroot, Background
    • reference / Buildroot
    • stable releases and support / Stable releases and support
    • installing / Installing
    • configuring / Configuring
    • running / Running, Overlay
    • package, adding / Adding a package
    • license compliance / License compliance
  • Buildroot User Manual
    • URL / Installing
    • references / Further reading
  • build systems
    • defining / Build systems
  • BusyBox
    • about / BusyBox to the rescue!
    • building / Building BusyBox
    • URL / Building BusyBox
    • alternative, ToyBox / ToyBox – an alternative to BusyBox
    • init program / BusyBox init

C

  • Callgrind
    • about / Callgrind
  • C development toolkit (CDT)
    • about / Eclipse
  • character devices
    • defining / Character devices
  • C libraries
    • glibc / Choosing the C library
    • eglibc / Choosing the C library
    • uClibc / Choosing the C library
    • musl libc / Choosing the C library
  • C library
    • selecting / Choosing the C library
    • components / Looking at the components of the C library
  • CMake
    • URL / The art of cross compiling
  • code
    • adding / Adding your own code
  • commands, toolchain
    • addr2line / Other tools in the toolchain
    • ar / Other tools in the toolchain
    • as / Other tools in the toolchain
    • c++filt / Other tools in the toolchain
    • cpp / Other tools in the toolchain
    • elfedit / Other tools in the toolchain
    • g++ / Other tools in the toolchain
    • gcc / Other tools in the toolchain
    • gcov / Other tools in the toolchain
    • Gdb / Other tools in the toolchain
    • gprof / Other tools in the toolchain
    • ld / Other tools in the toolchain
    • nm / Other tools in the toolchain
    • objcopy / Other tools in the toolchain
    • objdump / Other tools in the toolchain
    • ranlib / Other tools in the toolchain
    • readelf / Other tools in the toolchain
    • size / Other tools in the toolchain
    • strings / Other tools in the toolchain
    • strip / Other tools in the toolchain
  • common flash interface (CFI)
    • about / NOR flash
  • CompactFlash (CF)
    • about / Other types of managed flash
  • compiling
    • about / Compiling
  • Completely Fair Scheduler (CFS)
    • about / Timeshare policies
  • components, GNU toolchain
    • Binutils / What is a toolchain?
    • GNU Compiler Collection () / What is a toolchain?
    • C library / What is a toolchain?
  • configuration header files
    • about / Configuration header files
  • copy-on-write (CoW)
    • about / Creating a new process
  • core files
    • about / Core files
    • GDB, using / Using GDB to look at core files
  • CPU architects
    • about / The players
  • CPU architecture
    • about / CPU architectures
  • croostool-NG downloads section
    • URL / Installing crosstool-NG
  • cross compiling
    • URL / What is a toolchain?
    • defining / The art of cross compiling
    • makefiles / Simple makefiles
    • Autotools / Autotools
    • package configuration utility / Package configuration
    • problems / Problems with cross compiling
  • Cross Linux From Scratch
    • URL / Finding a toolchain
  • crosstool
    • URL / Building a toolchain using crosstool-NG
  • crosstool-NG
    • URL / Building a toolchain using crosstool-NG
  • cross toolchain
    • versus native toolchain / Types of toolchain - native versus cross toolchain
    • about / Types of toolchain - native versus cross toolchain
  • custom BSP
    • creating / Creating a custom BSP
    • U-Boot / U-Boot
    • Linux / Linux
    • build / Build
  • cyclictest
    • about / cyclictest

D

  • daemon process
    • starting / Starting a daemon process
  • Data display debugger (DDD) / Data display debugger
  • debug
    • defining / Preparing to debug
  • debug session
    • starting / Starting to debug
  • device drivers
    • defining / The role of device drivers
    • character / The role of device drivers
    • block / The role of device drivers
    • network / The role of device drivers
    • finding / Finding the right device driver
    • in user-space / Device drivers in user-space
    • GPIO / GPIO
    • LEDs / LEDs
    • I2C / I2C
    • SPI / SPI
    • anatomy / Anatomy of a device driver
    • compiling / Compile and load
    • loading / Compile and load
  • device nodes
    • about / Device nodes, A better way of managing device nodes
    • example, using devtmpfs / An example using devtmpfs
    • example, using mdev / An example using mdev
    • static device nodes / Are static device nodes so bad after all?
  • device tables
    • filesystem images, creating with / Creating filesystem images with device tables
  • device trees
    • about / Introducing device trees
    • URL / Introducing device trees
    • defining / Device tree basics
    • reg property / The reg property
    • phandles / Phandles and interrupts
    • interrupts / Phandles and interrupts
    • include files / Device tree include files
    • compiling / Compiling a device tree, Compiling device trees
  • drivers
    • finding, at runtime / Finding out about drivers at runtime
    • sysfs, defining / Getting information from sysfs
    • /sys/devices / The devices: /sys/devices
    • /sys/class / The drivers: /sys/class
    • /sys/block / The block drivers: /sys/block
  • dynamic linking
    • defining / Linking with libraries: static and dynamic linking

E

  • Eclipse / Eclipse
  • EFI System Partition (ESP)
    • about / Booting with UEFI firmware
  • eglibc
    • URL / Choosing the C library
  • elements, embedded Linux
    • toolchain / The four elements of embedded Linux
    • bootloader / The four elements of embedded Linux
    • kernel / The four elements of embedded Linux
    • root filesystem / The four elements of embedded Linux
  • embedded Linux
    • elements / The four elements of embedded Linux
  • Embedded MMC (eMMC)
    • about / eMMC
  • EmbToolkit
    • URL / What is a toolchain?, Build systems
  • events
    • tracing / Tracing events
  • example, kernel panic
    • about / Kernel panic
  • eXecute In Place (XIP)
    • about / NOR flash
  • Extended Application Binary Interface (EABI)
    • about / CPU architectures

F

  • field update
    • about / Updating in the field
    • granularity / Granularity: file, package, or image?
    • atomic image update / Atomic image update
  • file permissions
    • problems / Problems with file permissions
  • Filesystem
    • selecting / Filesystem choices
  • Filesystem Hierarchy Standard (FHS)
    • about / Directory layout, Additional reading
    • URL / Additional reading
  • filesystem images
    • creating, with device tables / Creating filesystem images with device tables
  • filesystems
    • mounting / Mounting filesystems
    • defining, for flash memory / Filesystems for flash memory
    • flash translation layers / Flash translation layers
  • filesystems, for managed flash
    • defining / Filesystems for managed flash
    • Flashbench / Flashbench
    • Discard and TRIM / Discard and TRIM
    • Ext4 / Ext4
    • F2FS / F2FS
    • FAT16/32 / FAT16/32
  • Filesystems, for NOR and NAND flash memory
    • about / Filesystems for NOR and NAND flash memory
    • JFFS2 / Filesystems for NOR and NAND flash memory, JFFS2
    • YAFFS2 / Filesystems for NOR and NAND flash memory, YAFFS2
    • UBIFS / Filesystems for NOR and NAND flash memory, UBI and UBIFS
    • UBI / UBI and UBIFS
  • Flash-Friendly File System (F2FS)
    • about / F2FS
  • Flashbench
    • about / Flashbench
    • URL / Flashbench
  • flash memory
    • accessing, from bootloader / Accessing flash memory from the bootloader
    • accessing, from Linux / Accessing flash memory from Linux
  • flash memory, from bootloader
    • U-Boot and NOR flash / U-Boot and NOR flash
    • U-Boot and NAND flash / U-Boot and NAND flash
    • U-Boot and MMC / U-Boot and MMC, SD and eMMC
    • SD / U-Boot and MMC, SD and eMMC
    • eMMC / U-Boot and MMC, SD and eMMC
  • flash memory, from Linux
    • memory technology devices (MTD) / Memory technology devices
    • MMC block driver / The MMC block driver
  • flash translation layer
    • about / Flash translation layers
    • deploying / Flash translation layers
  • forks and threads
    • debugging / Debugging forks and threads
  • Ftrace
    • about / Introducing Ftrace
    • preparing / Preparing to use Ftrace
    • CONFIG_FUNCTION_TRACER / Preparing to use Ftrace
    • CONFIG_FUNCTION_GRAPH_TRACER / Preparing to use Ftrace
    • CONFIG_DYNAMIC_FTRACE / Preparing to use Ftrace
    • using / Preparing to use Ftrace
    • dynamic Ftrace / Dynamic Ftrace and trace filters
    • trace filters / Dynamic Ftrace and trace filters
    • trace events / Trace events

G

  • GDB
    • used, for debugging applications / Debugging applications using GDB
    • and gdbserver, connecting / Connecting GDB and gdbserver
    • command files / GDB command files
  • GDB commands
    • about / Overview of GDB commands
    • breakpoints / Breakpoints
    • running and stepping / Running and stepping
    • information commands / Information commands
    • running, to breakpoint / Running to a breakpoint
  • gdbserver
    • used, for remote debugging / Remote debugging using gdbserver
    • and GDB, connecting / Connecting GDB and gdbserver
  • genext2fs utility
    • URL / Ext4
  • glibc
    • URL / Choosing the C library
  • GNU assembler
    • URL / What is a toolchain?
  • GNU Autoconf
    • URL / Autotools
  • GNU Automake
    • URL / Autotools
  • GNU components
    • CPU / CPU architectures
    • Vendor / CPU architectures
    • Kernel / CPU architectures
    • operating system / CPU architectures
  • GNU debugger
    • about / The GNU debugger
    • URL / The GNU debugger
    • user interfaces / GDB user interfaces
    • Terminal user interface (TUI) / Terminal user interface
    • Data display debugger (DDD) / Data display debugger
    • Eclipse / Eclipse
  • Gnulib
    • URL / Autotools
  • GNU Libtool
    • URL / Autotools
  • GNU project
    • URL / What is a toolchain?
  • GNU toolchain
    • components / What is a toolchain?
  • GPIO
    • about / GPIO
    • interrupts, handling from / Handling interrupts from GPIO
  • GPL
    • URL / Licensing
  • gprof
    • about / Other profilers: OProfile and gprof
  • GRUB 2
    • about / Booting with UEFI firmware
    • URL / Booting with UEFI firmware
  • gummiboot
    • about / Booting with UEFI firmware
    • URL / Booting with UEFI firmware

H

  • hardware, for embedded Linux
    • about / Hardware for embedded Linux
  • hardware configuration
    • discovering / Discovering hardware configuration
    • device trees / Device trees
    • platform data / Platform data
    • hardware, linking with device drivers / Linking hardware with device drivers
  • Heartbleed / The players
  • Helgrind
    • about / Helgrind
  • high resolution timers
    • about / High resolution timers

I

  • init program
    • defining / The init program
  • init programs
    • defining / Introducing the init programs
  • inter-process communication
    • defining / Inter-process communication
    • message-based IPC / Message-based IPC, Summary of message-based IPC
    • shared memory-based IPC / Shared memory-based IPC
  • inter process communication (IPC)
    • about / Process or thread?
  • interrupt shielding
    • about / Interrupt shielding
  • IOCTL
    • MEMGETINFO / The MTD character device, mtd
    • MEMERASE / The MTD character device, mtd
    • MEMWRITEOOB / The MTD character device, mtd
    • MEMREADOOB / The MTD character device, mtd
    • MEMLOCK / The MTD character device, mtd
    • MEMUNLOCK / The MTD character device, mtd
    • MEMGETREGIONCOUNT / The MTD character device, mtd
    • MEMGETREGIONINFO / The MTD character device, mtd
    • MEMGETOOBSEL / The MTD character device, mtd
    • MEMGETBADBLOCK / The MTD character device, mtd
    • MEMSETBADBLOCK / The MTD character device, mtd
    • OTPSELECT / The MTD character device, mtd
    • OTPGETREGIONCOUNT / The MTD character device, mtd
    • ECCGETLAYOUT / The MTD character device, mtd
    • OTPGETREGIONINFO / The MTD character device, mtd
  • ioctl functions
    • URL / The MTD character device, mtd
  • ISR (interrupt service routine)
    • about / Understanding scheduling latency
  • Itsy PacKage format (ipk)
    • about / Package formats and package managers

J

  • JFFS2
    • about / JFFS2
    • summary nodes / Summary nodes
    • clean markers / Clean markers
  • JFFS2 filesystem
    • creating / Creating a JFFS2 filesystem
  • just-in-time debugging
    • about / Just-in-time debugging

K

  • Kconfig
    • about / Kconfig and U-Boot
  • kernel / The four elements of embedded Linux
    • defining / What does the kernel do?
    • selecting / Choosing a kernel
    • development cycle / Kernel development cycle
    • stable and long term support releases / Stable and long term support releases
    • URL / Stable and long term support releases
    • vendor support / Vendor support
    • licensing / Licensing
    • building / Building the kernel
    • source, obtaining / Getting the source
    • configuration, defining / Understanding kernel configuration
    • identifying, LOCALVERSION used / Using LOCALVERSION to identify your kernel
    • modules / Kernel modules
    • booting / Booting your kernel
    • BeagleBone Black / BeagleBone Black
    • QEMU / QEMU
    • messages / Kernel messages
    • command line / Kernel command line
    • loading, TFTP used / Using TFTP to load the kernel
  • kernel boot messages
    • defining / Running
  • kernel code
    • debugging / Debugging kernel code
    • debugging, with kgdb / Debugging kernel code with kgdb
    • sample debug session / A sample debug session
    • early code, debugging / Debugging early code
    • modules, debugging / Debugging modules
    • debugging, with kdb / Debugging kernel code with kdb
    • oops, defining / Looking at an oops
    • oops, preserving / Preserving the oops
  • kernel device driver
    • writing / Writing a kernel device driver
    • character device interface, designing / Designing a character device interface
  • kernel image
    • compiling / Compiling the kernel image
  • kernel modules
    • about / Kernel modules
    • defining / Loading kernel modules
    • reasons / Loading kernel modules
  • kernel preemption
    • about / Kernel preemption
  • kernel sources
    • cleaning / Cleaning kernel sources
  • kernel space memory layout
    • defining / Kernel space memory layout
  • kgdb
    • kernel code, debugging with / Debugging kernel code with kgdb
    • URL / Debugging kernel code with kgdb

L

  • layers, Yocto Project
    • references / Layers
    • BitBake and recipes / BitBake and recipes
  • Lesser General Public License (LGPL)
    • about / Licenses
  • libraries
    • linking with / Linking with libraries: static and dynamic linking
  • licenses, open source / Licenses
  • Linaro
    • URL / Finding a toolchain
  • Linux
    • boot, automating with U-Boot scripts / Automating the boot with U-Boot scripts
    • porting, to new board / Porting Linux to a new board
    • porting, with device tree / With a device tree
    • porting, without device tree / Without a device tree
  • Linux-tiny or Linux Kernel Tinification
    • URL / How much memory does the kernel use?
  • Linux Kernel Newbies website
    • references / Kernel development cycle
  • Linux Weekly News
    • URL / Preserving the oops
  • LLVM project
    • URL / What is a toolchain?
  • logical erase blocks (LEB)
    • about / UBI
  • LTTng
    • about / Using LTTng
    • using / Using LTTng
    • URL / Using LTTng
    • components / Using LTTng
    • and Yocto / LTTng and the Yocto Project
    • and Buildroot / LTTng and Buildroot
    • for kernel tracing / Using LTTng for kernel tracing

M

  • managed flash
    • about / Managed flash
    • MultiMediaCard (MMC) / MultiMediaCard and secure digital cards
    • secure digital cards / MultiMediaCard and secure digital cards
    • eMMC / eMMC
    • defining / Other types of managed flash
  • memory
    • mapping, with mmap / Mapping memory with mmap
    • used, for applications / How much memory does my application use?
  • memory leaks
    • identifying / Identifying memory leaks
    • mtrace / mtrace
    • Valgrind / Valgrind
    • running out, of memory / Running out of memory
  • memory management unit (MMU)
    • about / Hardware for embedded Linux, Virtual memory basics
  • memory technology devices
    • MTD partitions / MTD partitions
    • MTD device drivers / MTD device drivers
    • MTD character device, mtd / The MTD character device, mtd
    • MTD block device, mtdblock / The MTD block device, mtdblock
    • kernel oops, logging to MTD / Logging kernel oops to MTD
    • NAND memory, simulating / Simulating NAND memory
  • memory technology devices (MTD) / Memory technology devices
  • memory usage
    • defining, for kernel / How much memory does the kernel use?
  • message-based IPC
    • about / Message-based IPC
    • Unix (or local) sockets / Unix (or local) sockets
    • FIFOs and named pipes / FIFOs and named pipes
    • POSIX message queues / POSIX message queues
  • mmap
    • memory, mapping with / Mapping memory with mmap
    • used, for allocating private memory / Using mmap to allocate private memory
    • used, for sharing memory / Using mmap to share memory
    • used, for accessing device memory / Using mmap to access device memory
  • MMC block driver
    • about / The MMC block driver
  • modules
    • compiling / Compiling modules
  • MultiMediaCard (MMC)
    • about / MultiMediaCard and secure digital cards
  • musl libc
    • URL / Choosing the C library
  • mutual exclusion
    • deadlock / Mutual exclusion
    • priority inversion / Mutual exclusion
    • poor performance / Mutual exclusion

N

  • NAND flash / NAND flash
  • Native POSIX Thread Library (NPTL)
    • about / Threads
  • native toolchain
    • versus cross toolchain / Types of toolchain - native versus cross toolchain
    • about / Types of toolchain - native versus cross toolchain
  • network
    • configuring / Configuring the network
    • components, for glibc / Network components for glibc
  • network devices
    • defining / Network devices
  • NFS
    • used, for mounting root filesystem / Mounting the root filesystem using NFS
  • non-determinism
    • sources, identifying / Identifying the sources of non-determinism
  • Ångström Distribution
    • URL / Background

O

  • observer effect
    • about / The observer effect
    • symbol tables / Symbol tables and compile flags
  • OEMs
    • about / The players
  • Old Application Binary Interface (OABI)
    • about / CPU architectures
  • OpenEmbedded
    • URL / Build systems, Background
  • open NAND flash interface (ONFi)
    • about / NAND flash
    • URL / NAND flash
  • open source
    • about / Open source
    • licenses / Licenses
  • open source community
    • about / The players
  • OpenWrt
    • URL / Background
  • operating system
    • selecting / Selecting the right operating system
  • OProfile
    • about / Other profilers: OProfile and gprof
    • reference / Other profilers: OProfile and gprof
  • out of band (OOB)
    • about / NAND flash
  • overlay
    • defining / Overlay

P

  • package configuration utility
    • URL / Package configuration
  • package formats
    • defining / Package formats and package managers
  • package managers
    • defining / Package formats and package managers
  • page faults
    • avoiding, in real-time application / Avoiding page faults in a real-time application
  • PCMCIA (Personal Computer Memory Card International Association
    • about / Other types of managed flash
  • per-process memory usage
    • about / Per-process memory usage
    • vss (virtual set size) / Per-process memory usage
    • rss (resident set size) / Per-process memory usage
    • top and ps, using / Using top and ps
    • smem, using / Using smem
    • tools, defining / Other tools to consider
  • perf
    • about / Introducing perf
    • kernel, configuring / Configuring the kernel for perf
    • building, with Yocto Project / Building perf with the Yocto Project
    • building, with Buildroot / Building perf with Buildroot
    • profiling with / Profiling with perf
    • call graphs / Call graphs
    • annotate / perf annotate
  • performance measurement unit (PMU) / Introducing perf
  • physical erase blocks (PEB)
    • about / UBI
  • poor man's profiler
    • URL / Poor man's profiler
  • preemptible kernel locks
    • about / Preemptible kernel locks
  • PREEMPT_RT patches
    • about / Getting the PREEMPT_RT patches
    • reference / Getting the PREEMPT_RT patches
  • process
    • defining / Process or thread?
    • creating / Creating a new process
    • terminating / Terminating a process
    • different program, running / Running a different program
    • daemons / Daemons
    • inter-process communication / Inter-process communication
  • processes
    • defining / Processes
  • process memory map
    • defining / Process memory map
  • proc filesystem
    • about / The proc and sysfs filesystems
  • procrank
    • URL / Other tools to consider
  • profiling
    • about / Beginning to profile
    • with top / Profiling with top
    • poor man's profiler / Poor man's profiler
  • program
    • executing / After the kernel has booted
  • project life-cycle
    • about / Project lifecycle
  • proportional set size (Pss)
    • about / Using smem
  • ps_mem
    • URL / Other tools to consider

Q

  • QEMU
    • about / QEMU
  • qemu-system-arm / QEMU
  • qemu-system-mips / QEMU
  • qemu-system-ppc / QEMU
  • qemu-system-x86 / QEMU

R

  • read-only compressed filesystems
    • about / Read-only compressed filesystems
    • squashfs / squashfs
  • read-only memory (ROM)
    • about / Storage options
  • real-time application
    • page faults, avoiding / Avoiding page faults in a real-time application
  • real-time Linux kernel (PREEMPT_RT)
    • about / The real-time Linux kernel (PREEMPT_RT)
  • real-time operating systems (RTOS)
    • about / Process or thread?
  • real-time policies
    • about / Real-time policies
    • SCHED_FIFO / Real-time policies
    • SCHED_RR / Real-time policies
  • real-time programming
    • about / What is real-time?
    • examples / What is real-time?
  • Red Hat Package Manager (RPM)
    • about / Package formats and package managers
  • roll your own (RYO) process
    • defining / No more rolling your own embedded Linux
  • root filesystem / The four elements of embedded Linux
    • defining / What should be in the root filesystem?
    • components / What should be in the root filesystem?
    • directory layout / Directory layout
    • staging directory / Staging directory
    • programs / Programs for the root filesystem
    • init program / The init program
    • shell / Shell
    • utilities / Utilities
    • BusyBox / BusyBox to the rescue!
    • libraries / Libraries for the root filesystem
    • size, reducing by stripping / Reducing size by stripping
    • transferring / Transfering the root filesystem to the target
    • ramdisk / Transfering the root filesystem to the target
    • disk image / Transfering the root filesystem to the target
    • network / Transfering the root filesystem to the target
    • mounting, NFS used / Mounting the root filesystem using NFS
    • testing, with QEMU / Testing with QEMU
    • testing, with BeagleBone Black / Testing with BeagleBone Black
  • root filesystem read-only
    • creating / Making the root filesystem read-only
  • root filesytem
    • mounting, onto SD card / Putting the root filesytem onto an SD card
  • RYO (roll your own)
    • about / BusyBox init

S

  • scheduling
    • about / Scheduling
    • fairness, versus determinism / Fairness versus determinism
    • timeshare policies / Timeshare policies, Niceness
    • real-time policies / Real-time policies
    • policy, selecting / Choosing a policy
    • real-time priority, selecting / Choosing a real-time priority
  • scheduling latency
    • about / Understanding scheduling latency
    • measuring / Measuring scheduling latencies
    • cyclictest / cyclictest
    • Ftrace, using / Using Ftrace
    • cyclictest, combining with Ftrace / Combining cyclictest and Ftrace
  • Scratchbox2
    • URL / Types of toolchain - native versus cross toolchain
  • Secondary Program Loader (SPL)
    • about / Kconfig and U-Boot
  • secondary program loader (SPL)
    • about / Building U-Boot
  • Secure Digital (SD) cards
    • about / Managed flash
  • Serial Peripheral Interface (SPI)
    • about / MultiMediaCard and secure digital cards
  • shared libraries
    • about / Shared libraries
    • version numbers, defining / Understanding shared library version numbers
    • benefits / Understanding shared library version numbers
    • debugging / Debugging shared libraries
    • Yocto Project / The Yocto Project
    • Buildroot / Buildroot
    • other libraries / Other libraries
  • shared memory-based IPC
    • about / Shared memory-based IPC
    • POSIX shared memory / POSIX shared memory
  • Shellshock / The players
  • SLC (single level cell)
    • about / NAND flash
  • smem
    • URL / Using smem
  • SoC vendors
    • about / The players
  • SPI (Serial Peripheral Interface)
    • about / Phase 1: ROM code
  • Sqlite3
    • about / Problems with cross compiling
  • staging directory
    • about / Staging directory
    • POSIX file access permissions / POSIX file access permissions
    • file ownership permissions / File ownership permissions in the staging directory
  • static libraries
    • about / Static libraries
  • static linking
    • defining / Linking with libraries: static and dynamic linking
  • storage options
    • defining / Storage options
    • NOR flash / NOR flash
    • NAND flash / NAND flash
    • managed flash / Managed flash
  • strace
    • used, for displaying for system calls / Using strace to show system calls
  • swapping
    • about / Swap
    • to compressed memory (zram) / Swap to compressed memory (zram)
  • sys filesystem
    • about / The proc and sysfs filesystems
  • sysroot
    • setting / Setting the sysroot
  • system calls
    • displaying, strace used / Using strace to show system calls
  • systemd
    • about / systemd
    • building, with Yocto Project / Building systemd with the Yocto Project and Buildroot
    • building, with Buildroot / Building systemd with the Yocto Project and Buildroot
    • targets, defining / Introducing targets, services, and units, Targets
    • services, defining / Introducing targets, services, and units, Services
    • units, defining / Introducing targets, services, and units, Units
    • used, for booting system / How systemd boots the system
    • service, adding / Adding your own service
    • watchdog, adding / Adding a watchdog
    • implications, for embedded Linux / Implications for embedded Linux
  • systemd system and Service Manager
    • reference / Further reading
  • System V init
    • about / System V init
    • inittab / inittab
    • init.d scripts / The init.d scripts
    • new daemon, adding / Adding a new daemon
    • services, starting / Starting and stopping services
    • services, stopping / Starting and stopping services

T

  • .tar file
    • URL / Getting the source
  • TAR archive
    • URL / Installing
  • tarball
    • URL / Building U-Boot
  • task
    • about / What is real-time?
  • temporary filesystems
    • about / Temporary filesystems
  • Terminal user interface (TUI) / Terminal user interface
  • Tertiary Program Loader (TPL)
    • about / Kconfig and U-Boot
  • TFTP
    • used, for loading kernel / Using TFTP to load the kernel
  • third stage program loader (TPL)
    • about / Phase 2: SPL
  • thread
    • defining / Process or thread?
  • threaded interrupt handlers
    • about / Threaded interrupt handlers
  • Thread IDs (TIDs)
    • about / Creating a new thread
  • thread local storage (TLS)
    • about / Inter-thread communication
  • threads
    • about / Threads
    • new thread, creating / Creating a new thread
    • terminating / Terminating a thread
    • program, compiling with / Compiling a program with threads
    • inter-thread communication / Inter-thread communication
    • mutual exclusion / Mutual exclusion
    • conditions, changing / Changing conditions
    • problem, partitioning / Partitioning the problem
  • timeshare policies
    • about / Timeshare policies
  • toolchain / The four elements of embedded Linux
    • defining / What is a toolchain?
    • finding / Finding a toolchain
    • crosstool-NG, installing / Installing crosstool-NG
    • selecting / Selecting the toolchain
    • anatomy / Anatomy of a toolchain
    • cross compiler, defining / Finding out about your cross compiler
    • sysroot / The sysroot, library, and header files
    • library / The sysroot, library, and header files
    • header files / The sysroot, library, and header files
    • tools / Other tools in the toolchain
  • toolchain types
    • native toolchain, versus cross toolchain / Types of toolchain - native versus cross toolchain
  • tri-level cell (TLC) chips
    • about / NAND flash
  • Trivial File Transfer Protocol (TFTP)
    • about / Loading images

U

  • U-Boot
    • about / U-Boot, Kconfig and U-Boot
    • URL / U-Boot
    • building / Building U-Boot, Building and testing
    • installing / Installing U-Boot
    • using / Using U-Boot
    • environment variables / Environment variables
    • Boot image format / Boot image format
    • images, loading / Loading images
    • Linux, booting / Booting Linux
    • porting, to new board / Porting U-Boot to a new board
    • testing / Building and testing
    • Falcon mode / Falcon mode
  • UBIFS
    • about / UBIFS
  • uClibc
    • URL / Choosing the C library
  • UEFI firmware
    • booting with / Booting with UEFI firmware
  • UFS (universal flash storage)
    • about / Block devices
  • unique set size (Uss)
    • about / Using smem
  • Universal Extensible Firmware Interface (UEFI)
    • about / Booting with UEFI firmware
    • URL / Booting with UEFI firmware
  • universal flash storage (UFS)
    • about / Other types of managed flash
  • unsorted block image (UBI)
    • about / UBI and UBIFS, UBI
  • user accounts
    • configuring / Configuring user accounts
    • adding, to root filesystem / Adding user accounts to the root filesystem
  • User Mode Linux (UML)
    • about / QEMU
  • user space
    • defining / Early user space
  • user space memory layout
    • defining / User space memory layout

V

  • Valgrind
    • about / Valgrind, Using Valgrind for application profiling
    • URL / Valgrind
    • for application profiling / Using Valgrind for application profiling
  • virtual memory
    • defining / Virtual memory basics
    • advantages / Virtual memory basics

Y

  • YAFFS2 filesystem
    • about / YAFFS2
    • URL / YAFFS2
    • creating / Creating a YAFFS2 filesystem
    • reference / Creating a YAFFS2 filesystem
  • Yocto
    • and PREEMPT_RT / The Yocto Project and PREEMPT_RT
  • Yocto Project
    • references / Finding a toolchain, Installing the Yocto Project, Further reading
    • URL / Build systems, The Yocto Project
    • about / The Yocto Project
    • defining / Background
    • components / Background
    • stable releases and support / Stable releases and support
    • installing / Installing the Yocto Project
    • configuring / Configuring
    • building / Building
    • running / Running
    • layers / Layers
    • images, customizing via / Customizing images via local.conf
    • image recipe, writing / Writing an image recipe
    • SDK, creating / Creating an SDK
    • License audit / License audit
    • setting up / Setting up the Yocto Project