Linux: Embedded Development

Leverage the power of Linux to develop captivating and powerful embedded Linux projects
Preview in Mapt

Linux: Embedded Development

Alexandru Vaduva, Alex González, Chris Simmonds

2 customer reviews
Leverage the power of Linux to develop captivating and powerful embedded Linux projects

Quick links: > What will you learn?> Table of content> Product reviews

Mapt Subscription
FREE
$29.99/m after trial
eBook
$49.00
RRP $69.99
Save 29%
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$49.00
$29.99 p/m after trial
RRP $69.99
Subscription
eBook
Start 14 Day Trial

Frequently bought together


Linux: Embedded Development Book Cover
Linux: Embedded Development
$ 69.99
$ 49.00
Mastering Embedded Linux Programming - Second Edition Book Cover
Mastering Embedded Linux Programming - Second Edition
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $74.98
Add to Cart

Book Details

ISBN 139781787124202
Paperback989 pages

Book Description

Embedded Linux is a complete Linux distribution employed to operate embedded devices such as smartphones, tablets, PDAs, set-top boxes, and many more. An example of an embedded Linux distribution is Android, developed by Google.

This learning path starts with the module Learning Embedded Linux Using the Yocto Project. It introduces embedded Linux software and hardware architecture and presents information about the bootloader. You will go through Linux kernel features and source code and get an overview of the Yocto Project components available.

The next module Embedded Linux Projects Using Yocto Project Cookbook takes you through the installation of a professional embedded Yocto setup, then advises you on best practices. Finally, it explains how to quickly get hands-on with the Freescale ARM ecosystem and community layer using the affordable and open source Wandboard embedded board.

Moving ahead, the final module 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 see how functions are split between processes and the usage of POSIX threads.

By the end of this learning path, your capabilities will be enhanced to create robust and versatile embedded projects.

This Learning Path combines some of the best that Packt has to offer in one complete, curated package. It includes content from the following Packt products:

Table of Contents

Chapter 1: Introduction
Advantages of Linux and open source systems
Embedded systems
Introducing GNU/Linux
Introduction to the Yocto Project
Summary
Chapter 2: Cross-compiling
Introducing toolchains
Components of toolchains
Delving into C libraries
Working with toolchains
The Yocto Project reference
Summary
Chapter 3: Bootloaders
The role of the bootloader
Comparing various bootloaders
Delving into the bootloader cycle
The U-Boot bootloader
The Yocto Project
Summary
Chapter 4: Linux Kernel
The role of the Linux kernel
Delving into the features of the Linux kernel
Interrupts
Timers
Linux kernel interaction
Kernel sources
Devices and modules
Debugging a kernel
The Yocto Project reference
Summary
Chapter 5: The Linux Root Filesystem
Interacting with the root filesystem
Understanding BusyBox
Minimal root filesystem
The Yocto Project
Summary
Chapter 6: Components of the Yocto Project
Poky
Eclipse ADT plug-ins
Hob and Toaster
Autobuilder
Lava
Wic
Summary
Chapter 7: ADT Eclipse Plug-ins
The Application Development Toolkit
Eclipse IDE
Summary
Chapter 8: Hob, Toaster, and Autobuilder
Hob
Toaster
Autobuilder
Summary
Chapter 9: Wic and Other Tools
Swabber
Wic
LAVA
Summary
Chapter 10: Real-time
Understanding GPOS and RTOS
PREEMPT_RT
Linux real-time applications
Benchmarking
Meta-realtime
Summary
Chapter 11: Security
Security in Linux
SELinux
Grsecurity
Security for the Yocto Project
Meta-security and meta-selinux
Summary
Chapter 12: Virtualization
Linux virtualization
Virtualization support for the Yocto Project
Summary
Chapter 13: CGL and LSB
Linux Standard Base
Carrier grade options
Specific support for the Yocto Project
Summary
Chapter 14: The Build System
Introduction
Setting up the host system
Installing Poky
Creating a build directory
Building your first image
Explaining the Freescale Yocto ecosystem
Installing support for Freescale hardware
Building Wandboard images
Troubleshooting your Wandboard's first boot
Configuring network booting for a development setup
Sharing downloads
Sharing the shared state cache
Setting up a package feed
Using build history
Working with build statistics
Debugging the build system
Chapter 15: The BSP Layer
Introduction
Creating a custom BSP layer
Introducing system development workflows
Adding a custom kernel and bootloader
Explaining Yocto's Linux kernel support
Describing Linux's build system
Configuring the Linux kernel
Building the Linux kernel
Building external kernel modules
Debugging the Linux kernel and modules
Debugging the Linux kernel booting process
Using the kernel function tracing system
Managing the device tree
Debugging device tree issues
Chapter 16: The Software Layer
Introduction
Exploring an image's contents
Adding a new software layer
Selecting a specific package version and providers
Adding supported packages
Adding new packages
Adding data, scripts, or configuration files
Managing users and groups
Using the sysvinit initialization manager
Using the systemd initialization manager
Installing package-installation scripts
Reducing the Linux kernel image size
Reducing the root filesystem image size
Releasing software
Analyzing your system for compliance
Working with open source and proprietary code
Chapter 17: Application Development
Introduction
Preparing and using an SDK
Using the Application Development Toolkit
Using the Eclipse IDE
Developing GTK+ applications
Using the Qt Creator IDE
Developing Qt applications
Describing workflows for application development
Working with GNU make
Working with the GNU build system
Working with the CMake build system
Working with the SCons builder
Developing with libraries
Working with the Linux framebuffer
Using the X Windows system
Using Wayland
Adding Python applications
Integrating the Oracle Java Runtime Environment
Integrating the Open Java Development Kit
Integrating Java applications
Chapter 18: Debugging, Tracing, and Profiling
Introduction
Analyzing core dumps
Native GDB debugging
Cross GDB debugging
Using strace for application debugging
Using the kernel's performance counters
Using static kernel tracing
Using dynamic kernel tracing
Using dynamic kernel events
Exploring Yocto's tracing and profiling tools
Tracing and profiling with perf
Using SystemTap
Using OProfile
Using LTTng
Using blktrace
Chapter 19: Starting Out
Selecting the right operating system
The players
Project lifecycle
Open source
Hardware for embedded Linux
Hardware used in this book
Software used in this book
Summary
Chapter 20: Learning About Toolchains
What is a toolchain?
Types of toolchain - native versus cross toolchain
Choosing the C library
Finding a toolchain
Anatomy of a toolchain
Other tools in the toolchain
Looking at the components of the C library
Linking with libraries: static and dynamic linking
The art of cross compiling
Problems with cross compiling
Summary
Chapter 21: All About Bootloaders
What does a bootloader do?
The boot sequence
Booting with UEFI firmware
Moving from bootloader to kernel
Introducing device trees
Choosing a bootloader
U-Boot
Barebox
Summary
Chapter 22: Porting and Configuring the Kernel
What does the kernel do?
Choosing a kernel
Building the kernel
Compiling
Cleaning kernel sources
Booting your kernel
Porting Linux to a new board
Additional reading
Summary
Chapter 23: Building a Root Filesystem
What should be in the root filesystem?
Programs for the root filesystem
Libraries for the root filesystem
Device nodes
The proc and sysfs filesystems
Kernel modules
Transfering the root filesystem to the target
Creating a boot ramdisk
The init program
Configuring user accounts
Starting a daemon process
A better way of managing device nodes
Configuring the network
Creating filesystem images with device tables
Mounting the root filesystem using NFS
Using TFTP to load the kernel
Additional reading
Summary
Chapter 24: Selecting a Build System
No more rolling your own embedded Linux
Build systems
Package formats and package managers
Buildroot
The Yocto Project
Further reading
Summary
Chapter 25: Creating a Storage Strategy
Storage options
Accessing flash memory from the bootloader
Accessing flash memory from Linux
Filesystems for flash memory
Filesystems for NOR and NAND flash memory
Filesystems for managed flash
Read-only compressed filesystems
Temporary filesystems
Making the root filesystem read-only
Filesystem choices
Updating in the field
Further reading
Summary
Chapter 26: Introducing Device Drivers
The role of device drivers
Character devices
Block devices
Network devices
Finding out about drivers at runtime
Finding the right device driver
Device drivers in user-space
Writing a kernel device driver
Loading kernel modules
Discovering hardware configuration
Additional reading
Summary
Chapter 27: Starting up - the init Program
After the kernel has booted
Introducing the init programs
BusyBox init
System V init
systemd
Further reading
Summary
Chapter 28: Learning About Processes and Threads
Process or thread?
Processes
Threads
Scheduling
Further reading
Summary
Chapter 29: Managing Memory
Virtual memory basics
Kernel space memory layout
User space memory layout
Process memory map
Swap
Mapping memory with mmap
How much memory does my application use?
Per-process memory usage
Identifying memory leaks
Running out of memory
Further reading
Summary
Chapter 30: Debugging with GDB
The GNU debugger
Preparing to debug
Debugging applications using GDB
Remote debugging using gdbserver
Starting to debug
Debugging shared libraries
Just-in-time debugging
Debugging forks and threads
Core files
GDB user interfaces
Debugging kernel code
Additional reading
Summary
Chapter 31: Profiling and Tracing
The observer effect
Beginning to profile
Profiling with top
Introducing perf
Other profilers: OProfile and gprof
Tracing events
Introducing Ftrace
Using LTTng
Using Valgrind for application profiling
Callgrind
Helgrind
Using strace to show system calls
Summary
Chapter 32: Real-time Programming
What is real-time?
Identifying the sources of non-determinism
Understanding scheduling latency
Kernel preemption
The real-time Linux kernel (PREEMPT_RT)
Threaded interrupt handlers
Preemptible kernel locks
Getting the PREEMPT_RT patches
High resolution timers
Avoiding page faults in a real-time application
Interrupt shielding
Measuring scheduling latencies
Further reading
Summary

What You Will Learn

  • Use the Yocto Project in the embedded Linux development process
  • Get familiar with and customize the bootloader for a board
  • Discover more about real-time layer, security, virtualization, CGL, and LSB
  • See development workflows for the U-Boot and the Linux kernel, including debugging and optimization
  • Understand the open source licensing requirements and how to comply with them when cohabiting with proprietary programs
  • Optimize your production systems by reducing the size of both the Linux kernel and root filesystems
  • Understand device trees and make changes to accommodate new hardware on your device
  • Design and write multi-threaded applications using POSIX threads
  • Measure real-time latencies and tune the Linux kernel to minimize them

Authors

Table of Contents

Chapter 1: Introduction
Advantages of Linux and open source systems
Embedded systems
Introducing GNU/Linux
Introduction to the Yocto Project
Summary
Chapter 2: Cross-compiling
Introducing toolchains
Components of toolchains
Delving into C libraries
Working with toolchains
The Yocto Project reference
Summary
Chapter 3: Bootloaders
The role of the bootloader
Comparing various bootloaders
Delving into the bootloader cycle
The U-Boot bootloader
The Yocto Project
Summary
Chapter 4: Linux Kernel
The role of the Linux kernel
Delving into the features of the Linux kernel
Interrupts
Timers
Linux kernel interaction
Kernel sources
Devices and modules
Debugging a kernel
The Yocto Project reference
Summary
Chapter 5: The Linux Root Filesystem
Interacting with the root filesystem
Understanding BusyBox
Minimal root filesystem
The Yocto Project
Summary
Chapter 6: Components of the Yocto Project
Poky
Eclipse ADT plug-ins
Hob and Toaster
Autobuilder
Lava
Wic
Summary
Chapter 7: ADT Eclipse Plug-ins
The Application Development Toolkit
Eclipse IDE
Summary
Chapter 8: Hob, Toaster, and Autobuilder
Hob
Toaster
Autobuilder
Summary
Chapter 9: Wic and Other Tools
Swabber
Wic
LAVA
Summary
Chapter 10: Real-time
Understanding GPOS and RTOS
PREEMPT_RT
Linux real-time applications
Benchmarking
Meta-realtime
Summary
Chapter 11: Security
Security in Linux
SELinux
Grsecurity
Security for the Yocto Project
Meta-security and meta-selinux
Summary
Chapter 12: Virtualization
Linux virtualization
Virtualization support for the Yocto Project
Summary
Chapter 13: CGL and LSB
Linux Standard Base
Carrier grade options
Specific support for the Yocto Project
Summary
Chapter 14: The Build System
Introduction
Setting up the host system
Installing Poky
Creating a build directory
Building your first image
Explaining the Freescale Yocto ecosystem
Installing support for Freescale hardware
Building Wandboard images
Troubleshooting your Wandboard's first boot
Configuring network booting for a development setup
Sharing downloads
Sharing the shared state cache
Setting up a package feed
Using build history
Working with build statistics
Debugging the build system
Chapter 15: The BSP Layer
Introduction
Creating a custom BSP layer
Introducing system development workflows
Adding a custom kernel and bootloader
Explaining Yocto's Linux kernel support
Describing Linux's build system
Configuring the Linux kernel
Building the Linux kernel
Building external kernel modules
Debugging the Linux kernel and modules
Debugging the Linux kernel booting process
Using the kernel function tracing system
Managing the device tree
Debugging device tree issues
Chapter 16: The Software Layer
Introduction
Exploring an image's contents
Adding a new software layer
Selecting a specific package version and providers
Adding supported packages
Adding new packages
Adding data, scripts, or configuration files
Managing users and groups
Using the sysvinit initialization manager
Using the systemd initialization manager
Installing package-installation scripts
Reducing the Linux kernel image size
Reducing the root filesystem image size
Releasing software
Analyzing your system for compliance
Working with open source and proprietary code
Chapter 17: Application Development
Introduction
Preparing and using an SDK
Using the Application Development Toolkit
Using the Eclipse IDE
Developing GTK+ applications
Using the Qt Creator IDE
Developing Qt applications
Describing workflows for application development
Working with GNU make
Working with the GNU build system
Working with the CMake build system
Working with the SCons builder
Developing with libraries
Working with the Linux framebuffer
Using the X Windows system
Using Wayland
Adding Python applications
Integrating the Oracle Java Runtime Environment
Integrating the Open Java Development Kit
Integrating Java applications
Chapter 18: Debugging, Tracing, and Profiling
Introduction
Analyzing core dumps
Native GDB debugging
Cross GDB debugging
Using strace for application debugging
Using the kernel's performance counters
Using static kernel tracing
Using dynamic kernel tracing
Using dynamic kernel events
Exploring Yocto's tracing and profiling tools
Tracing and profiling with perf
Using SystemTap
Using OProfile
Using LTTng
Using blktrace
Chapter 19: Starting Out
Selecting the right operating system
The players
Project lifecycle
Open source
Hardware for embedded Linux
Hardware used in this book
Software used in this book
Summary
Chapter 20: Learning About Toolchains
What is a toolchain?
Types of toolchain - native versus cross toolchain
Choosing the C library
Finding a toolchain
Anatomy of a toolchain
Other tools in the toolchain
Looking at the components of the C library
Linking with libraries: static and dynamic linking
The art of cross compiling
Problems with cross compiling
Summary
Chapter 21: All About Bootloaders
What does a bootloader do?
The boot sequence
Booting with UEFI firmware
Moving from bootloader to kernel
Introducing device trees
Choosing a bootloader
U-Boot
Barebox
Summary
Chapter 22: Porting and Configuring the Kernel
What does the kernel do?
Choosing a kernel
Building the kernel
Compiling
Cleaning kernel sources
Booting your kernel
Porting Linux to a new board
Additional reading
Summary
Chapter 23: Building a Root Filesystem
What should be in the root filesystem?
Programs for the root filesystem
Libraries for the root filesystem
Device nodes
The proc and sysfs filesystems
Kernel modules
Transfering the root filesystem to the target
Creating a boot ramdisk
The init program
Configuring user accounts
Starting a daemon process
A better way of managing device nodes
Configuring the network
Creating filesystem images with device tables
Mounting the root filesystem using NFS
Using TFTP to load the kernel
Additional reading
Summary
Chapter 24: Selecting a Build System
No more rolling your own embedded Linux
Build systems
Package formats and package managers
Buildroot
The Yocto Project
Further reading
Summary
Chapter 25: Creating a Storage Strategy
Storage options
Accessing flash memory from the bootloader
Accessing flash memory from Linux
Filesystems for flash memory
Filesystems for NOR and NAND flash memory
Filesystems for managed flash
Read-only compressed filesystems
Temporary filesystems
Making the root filesystem read-only
Filesystem choices
Updating in the field
Further reading
Summary
Chapter 26: Introducing Device Drivers
The role of device drivers
Character devices
Block devices
Network devices
Finding out about drivers at runtime
Finding the right device driver
Device drivers in user-space
Writing a kernel device driver
Loading kernel modules
Discovering hardware configuration
Additional reading
Summary
Chapter 27: Starting up - the init Program
After the kernel has booted
Introducing the init programs
BusyBox init
System V init
systemd
Further reading
Summary
Chapter 28: Learning About Processes and Threads
Process or thread?
Processes
Threads
Scheduling
Further reading
Summary
Chapter 29: Managing Memory
Virtual memory basics
Kernel space memory layout
User space memory layout
Process memory map
Swap
Mapping memory with mmap
How much memory does my application use?
Per-process memory usage
Identifying memory leaks
Running out of memory
Further reading
Summary
Chapter 30: Debugging with GDB
The GNU debugger
Preparing to debug
Debugging applications using GDB
Remote debugging using gdbserver
Starting to debug
Debugging shared libraries
Just-in-time debugging
Debugging forks and threads
Core files
GDB user interfaces
Debugging kernel code
Additional reading
Summary
Chapter 31: Profiling and Tracing
The observer effect
Beginning to profile
Profiling with top
Introducing perf
Other profilers: OProfile and gprof
Tracing events
Introducing Ftrace
Using LTTng
Using Valgrind for application profiling
Callgrind
Helgrind
Using strace to show system calls
Summary
Chapter 32: Real-time Programming
What is real-time?
Identifying the sources of non-determinism
Understanding scheduling latency
Kernel preemption
The real-time Linux kernel (PREEMPT_RT)
Threaded interrupt handlers
Preemptible kernel locks
Getting the PREEMPT_RT patches
High resolution timers
Avoiding page faults in a real-time application
Interrupt shielding
Measuring scheduling latencies
Further reading
Summary

Book Details

ISBN 139781787124202
Paperback989 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Mastering Embedded Linux Programming - Second Edition Book Cover
Mastering Embedded Linux Programming - Second Edition
$ 39.99
$ 28.00
Linux: Powerful Server Administration Book Cover
Linux: Powerful Server Administration
$ 79.99
$ 56.00
SELinux System Administration - Second Edition Book Cover
SELinux System Administration - Second Edition
$ 39.99
$ 28.00
Raspberry Pi: Amazing Projects from Scratch Book Cover
Raspberry Pi: Amazing Projects from Scratch
$ 59.99
$ 42.00
Python: Penetration Testing for Developers Book Cover
Python: Penetration Testing for Developers
$ 67.99
$ 47.60
Learning DevOps: Continuously Deliver Better Software Book Cover
Learning DevOps: Continuously Deliver Better Software
$ 67.99
$ 47.60