search
0
cart
close
You have no products in your basket yet
left
Tech Categories
Best Sellers
New Releases
Books
Videos
Audiobooks
Articles
Newsletters
Free Learning
right
Mastering Embedded Linux Programming - Third Edition

Mastering Embedded Linux Programming: Create fast and reliable embedded solutions with Linux 5.4 and the Yocto Project 3.1 (Dunfell), Third Edition

By Frank Vasquez , Chris Simmonds
$43.99 $29.99
Book May 2021 758 pages 3rd Edition
eBook
$43.99 $29.99
Print
$54.99
Subscription
$15.99 Monthly
eBook
$43.99 $29.99
Print
$54.99
Subscription
$15.99 Monthly

What do you get with eBook?

Feature icon Instant access to your Digital eBook purchase
Feature icon Download this book in EPUB and PDF formats
Feature icon Access this title in our online reader with advanced features
Feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 14, 2021
Length 758 pages
Edition : 3rd Edition
Language : English
ISBN-13 : 9781789530384
Category :
toc View table of contents toc Preview Book toc Download Code

Key benefits

  • Learn how to develop and configure robust embedded Linux devices
  • Explore the new features of Linux 5.4 and the Yocto Project 3.1 (Dunfell)
  • Discover different ways to debug and profile your code in both user space and the Linux kernel

Description

If you’re looking for a book that will demystify embedded Linux, then you’ve come to the right place. Mastering Embedded Linux Programming is a fully comprehensive guide that can serve both as means to learn new things or as a handy reference. The first few chapters of this book will break down the fundamental elements that underpin all embedded Linux projects: the toolchain, the bootloader, the kernel, and the root filesystem. After that, you will learn how to create each of these elements from scratch and automate the process using Buildroot and the Yocto Project. As you progress, the book will show you how to implement an effective storage strategy for flash memory chips and install updates to a device remotely once it’s deployed. You’ll also learn about the key aspects of writing code for embedded Linux, such as how to access hardware from apps, the implications of writing multi-threaded code, and techniques to manage memory in an efficient way. The final chapters demonstrate how to debug your code, whether it resides in apps or in the Linux kernel itself. You’ll also cover the different tracers and profilers that are available for Linux so that you can quickly pinpoint any performance bottlenecks in your system. By the end of this Linux book, you’ll be able to create efficient and secure embedded devices using Linux.

What you will learn

Use Buildroot and the Yocto Project to create embedded Linux systems Troubleshoot BitBake build failures and streamline your Yocto development workflow Update IoT devices securely in the field using Mender or balena Prototype peripheral additions by reading schematics, modifying device trees, soldering breakout boards, and probing pins with a logic analyzer Interact with hardware without having to write kernel device drivers Divide your system up into services supervised by BusyBox runit Debug devices remotely using GDB and measure the performance of systems using tools such as perf, ftrace, eBPF, and Callgrind

What do you get with eBook?

Feature icon Instant access to your Digital eBook purchase
Feature icon Download this book in EPUB and PDF formats
Feature icon Access this title in our online reader with advanced features
Feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : May 14, 2021
Length 758 pages
Edition : 3rd Edition
Language : English
ISBN-13 : 9781789530384
Category :

Table of Contents

27 Chapters
Preface Packt Packt
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Elements of Embedded Linux Packt Packt
Section 1: Elements of Embedded Linux
Chapter 1: Starting Out Packt Packt
Chapter 1: Starting Out
Choosing Linux
When not to choose Linux
Meeting the players
Moving through the project life cycle
Navigating open source
Selecting hardware for embedded Linux
Obtaining the hardware for this book
Provisioning your development environment
Summary
Chapter 2: Learning about Toolchains Packt Packt
Chapter 2: Learning about Toolchains
Technical requirements
Introducing toolchains
Finding a toolchain
Building a toolchain using crosstool-NG
Anatomy of a toolchain
Linking with libraries – static and dynamic linking
The art of cross-compiling
Summary
Further reading
Chapter 3: All about Bootloaders Packt Packt
Chapter 3: All about Bootloaders
Technical requirements
What does a bootloader do?
The boot sequence
Moving from the bootloader to a kernel
Introducing device trees
U-Boot
Summary
Chapter 4: Configuring and Building the Kernel Packt Packt
Chapter 4: Configuring and Building the Kernel
Technical requirements
What does the kernel do?
Choosing a kernel
Building the kernel
Compiling – Kbuild
Booting the kernel
Porting Linux to a new board
Summary
Additional reading
Chapter 5: Building a Root Filesystem Packt Packt
Chapter 5: Building a Root Filesystem
Technical requirements
What should be in the root filesystem?
Transferring the root filesystem to the target
Creating a boot initramfs
The init program
Configuring user accounts
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
Summary
Further reading
Chapter 6: Selecting a Build System Packt Packt
Chapter 6: Selecting a Build System
Technical requirements
Comparing build systems
Distributing binaries
Introducing Buildroot
Introducing the Yocto Project
Summary
Further reading
Chapter 7: Developing with Yocto Packt Packt
Chapter 7: Developing with Yocto
Technical requirements
Building on top of an existing BSP
Capturing changes with devtool
Building your own distro
Provisioning a remote package server
Summary
Further reading
Chapter 8: Yocto Under the Hood Packt Packt
Chapter 8: Yocto Under the Hood
Technical requirements
Decomposing Yocto's architecture and workflow
Separating metadata into layers
Troubleshooting build failures
Understanding BitBake syntax and semantics
Summary
Further reading
Section 2: System Architecture and Design Decisions Packt Packt
Section 2: System Architecture and Design Decisions
Chapter 9: Creating a Storage Strategy Packt Packt
Chapter 9: Creating a Storage Strategy
Technical requirements
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
Summary
Further reading
Chapter 10: Updating Software in the Field Packt Packt
Chapter 10: Updating Software in the Field
Technical requirements
From where do updates originate?
What to update
The basics of software updates
Types of update mechanism
OTA updates
Using Mender for local updates
Installing an update
Using Mender for OTA updates
Using balena for local updates
Summary
Chapter 11: Interfacing with Device Drivers Packt Packt
Chapter 11: Interfacing with Device Drivers
Technical requirements
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
Discovering the hardware configuration
Summary
Further reading
Chapter 12: Prototyping with Breakout Boards Packt Packt
Chapter 12: Prototyping with Breakout Boards
Technical requirements
Mapping schematics to the device tree's source
Prototyping with breakout boards
Probing SPI signals with a logic analyzer
Receiving NMEA messages over SPI
Summary
Further reading
Chapter 13: Starting Up – The init Program Packt Packt
Chapter 13: Starting Up – The init Program
Technical requirements
After the kernel has booted
Introducing the init programs
BusyBox init
System V init
systemd
Summary
Further reading
Chapter 14: Starting with BusyBox runit Packt Packt
Chapter 14: Starting with BusyBox runit
Technical requirements
Getting BusyBox runit
Creating service directories and files
Service supervision
Depending on other services
Dedicated service logging
Signaling a service
Summary
Further reading
Chapter 15: Managing Power Packt Packt
Chapter 15: Managing Power
Technical requirements
Measuring power usage
Scaling the clock frequency
Selecting the best idle state
Powering down peripherals
Putting the system to sleep
Summary
Further reading
Section 3: Writing Embedded Applications Packt Packt
Section 3: Writing Embedded Applications
Chapter 16: Packaging Python Packt Packt
Chapter 16: Packaging Python
Technical requirements
Retracing the origins of Python packaging
Installing Python packages with pip
Managing Python virtual environments with venv
Installing precompiled binaries with conda
Deploying Python applications with Docker
Summary
Further reading
Chapter 17: Learning about Processes and Threads Packt Packt
Chapter 17: Learning about Processes and Threads
Technical requirements
Process or thread?
Processes
Threads
ZeroMQ
Scheduling
Summary
Further reading
Chapter 18: Managing Memory Packt Packt
Chapter 18: Managing Memory
Technical requirements
Virtual memory basics
Kernel space memory layout
User space memory layout
The process memory map
Swapping
Mapping memory with mmap
How much memory does my application use?
Per-process memory usage
Identifying memory leaks
Running out of memory
Summary
Further reading
Section 4: Debugging and Optimizing Performance Packt Packt
Section 4: Debugging and Optimizing Performance
Chapter 19: Debugging with GDB Packt Packt
Chapter 19: Debugging with GDB
Technical requirements
The GNU debugger
Preparing to debug
Debugging applications
Just-in-time debugging
Debugging forks and threads
Core files
GDB user interfaces
Debugging kernel code
Summary
Further reading
Chapter 20: Profiling and Tracing Packt Packt
Chapter 20: Profiling and Tracing
Technical requirements
The observer effect
Beginning to profile
Profiling with top
The poor man's profiler
Introducing perf
Tracing events
Introducing Ftrace
Using LTTng
Using BPF
Using Valgrind
Using strace
Summary
Further reading
Chapter 21: Real-Time Programming Packt Packt
Chapter 21: Real-Time Programming
Technical requirements
What is real time?
Identifying sources of non-determinism
Understanding scheduling latency
Kernel preemption
Preemptible kernel locks
High-resolution timers
Avoiding page faults
Interrupt shielding
Measuring scheduling latencies
Summary
Further reading
Why subscribe?
Other Books You May Enjoy Packt Packt
Other Books You May Enjoy
Packt is searching for authors like you
Leave a review - let other readers know what you think

Customer reviews

filter Filter
Rating distribution
star-icon star-icon star-icon star-icon star-icon 5
(2 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Ian Boswell Feb 6, 2024
star-icon star-icon star-icon star-icon star-icon 5
Feefo Verified review Feefo image
Ilija Poznić Nov 21, 2023
star-icon star-icon star-icon star-icon star-icon 5
Everything you need to create custom embedded Linux distribution.
Feefo Verified review Feefo image
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQS

How do I buy and download an eBook? Packt Packt

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Packt Packt

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Packt Packt
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Packt Packt

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Packt Packt
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Packt Packt

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.