Embedded Linux Development Using Yocto Project: Leverage the power of the Yocto Project to build efficient Linux-based products

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Elevate your Linux-powered system with Yocto Projects, enhancing its stability and resilience efficiently and economically — now upgraded to the latest Yocto Project version

Purchase of the print or Kindle book includes a free PDF eBook

Key Features

  • Optimize your Yocto Project tools to develop efficient Linux-based projects
  • Follow a practical approach to learning Linux development using Yocto Project
  • Employ the best practices for embedded Linux and Yocto Project development

Book Description

The Yocto Project is the industry standard for developing dependable embedded Linux projects. It stands out from other frameworks by offering time-efficient development with enhanced reliability and robustness.

With Embedded Linux Development Using Yocto Project, you'll acquire an understanding of Yocto Project tools, helping you perform different Linux-based tasks. You'll gain a deep understanding of Poky and BitBake, explore practical use cases for building a Linux subsystem project, employ Yocto Project tools available for embedded Linux, and uncover the secrets of SDK, recipe tool, and others. This new edition is aligned with the latest long-term support release of the aforementioned technologies and introduces two new chapters, covering optimal emulation in QEMU for faster product development and best practices.

By the end of this book, you'll be well-equipped to generate and run an image for real hardware boards. You'll gain hands-on experience in building efficient Linux systems using the Yocto Project.

What you will learn

  • Get to grips with Poky workflows
  • Configure and prepare the Poky build environment
  • Explore the latest version of Yocto Project through examples
  • Configure a build server and customize images using Toaster
  • Generate images and fit packages into created images using BitBake
  • Support the development process by setting up and using Package feeds
  • Debug Yocto Project by configuring Poky
  • Build and boot image for BeagleBone Black, RaspberryPi 4, and VisionFive via SD cards
  • Explore the use of QEMU to speed up the development cycle using emulation

Who this book is for

If you are an embedded Linux developer and want to broaden your knowledge about the Yocto Project with examples of embedded development, then this book is for you. Professionals looking for new insights into working methodologies for Linux development will also find plenty of helpful information in this book.

Table of Contents

  1. Meeting the Yocto Project
  2. Baking Our First Poky Based System
  3. Using Toaster to Bake an Image
  4. Meeting the BitBake tool
  5. Grasping the BitBake Tool
  6. Detailing the Temporary Build Directory
  7. Assimilating Packaging Support
  8. Diving into BitBake Metadata
  9. Developing with the Yocto Project
  10. Debugging with the Yocto Project
  11. Exploring External Layers
  12. Creating Custom Layers
  13. Customizing Existing Recipes
  14. Achieving GPL Compliance
  15. Booting Our Custom Embedded Linux
  16. Speeding Up Product Development Through Emulation – QEMU
  17. Best Practices

Author(s): Otavio Salvador, Daiane Angolini
Edition: 3
Publisher: Packt Publishing
Year: 2023

Language: English
Pages: 196
City: Birmingham
Tags: Linux; Embedded Systems; Yocto; Linux Development; Yocto SDK; QEMU

Cover
Title page
Copyright and credits
Contributors
About the reviewers
Table of Contents
Preface
Chapter 1: Meeting the Yocto Project
What is the Yocto Project?
Delineating the Yocto Project
The alliance of the OpenEmbedded project and the Yocto Project
Understanding Poky
BitBake
OpenEmbedded Core
Metadata
The Yocto Project releases
Summary
Chapter 2: Baking Our First Poky-Based System
Preparing the build host system
Using Windows Subsystem for Linux (WSLv2)
Preparing a Linux-based system
Downloading the Poky source code
Preparing the build environment
Knowing the local.conf file
Building a target image
Running images in QEMU
Summary
Chapter 3: Using Toaster to Bake an Image
What is Toaster?
Installing Toaster
Starting Toaster
Building an image for QEMU
Summary
Chapter 4: Meeting the BitBake Tool
Understanding the BitBake tool
BitBake metadata collections
Metadata types
Summary
Chapter 5: Grasping the BitBake Tool
Parsing metadata
Dependencies
Preferring and providing recipes
Fetching the source code
Remote file downloads
Git repositories
Optimizing the source code download
Disabling network access
Understanding BitBake’s tasks
Summary
Chapter 6: Detailing the Temporary Build Directory
Detailing the build directory
Constructing the build directory
Exploring the temporary build directory
Understanding the work directory
Understanding the sysroot directories
Summary
Chapter 7: Assimilating Packaging Support
Using supported package formats
List of supported package formats
Choosing a package format
Running code during package installation
Understanding shared state cache
Explaining package versioning
Specifying runtime package dependencies
Using packages to generate a rootfs image
Package feeds
Using package feeds
Summary
Chapter 8: Diving into BitBake Metadata
Understanding BitBake’s metadata
Working with metadata
Summary
Chapter 9: Developing with the Yocto Project
What is a software development kit?
Generating a native SDK for on-device development
Understanding the types of cross-development SDKs
Using the Standard SDK
Using the Extensible SDK
Building an image using devtool
Running an image on QEMU
Creating a recipe from an external Git repository
Building a recipe using devtool
Deploying to the target using devtool
Extending the SDK
Summary
Chapter 10: Debugging with the Yocto Project
Differentiating metadata and application debugging
Tracking image, package, and SDK contents
Debugging packaging
Inspecting packages
Logging information during task execution
Debugging metadata variables
Utilizing a development shell
Using the GNU Debugger for debugging
Summary
Chapter 11: Exploring External Layers
Powering flexibility with layers
Detailing a layer’s source code
Adding meta layers
The Yocto Project layer ecosystem
Summary
Chapter 12: Creating Custom Layers
Making a new layer
Adding metadata to the layer
Creating an image
Adding a package recipe
Adding support to a new machine definition
Using a custom distribution
MACHINE_FEATURES versus DISTRO_FEATURES
Understanding the scope of a variable
Summary
Chapter 13: Customizing Existing Recipes
Understanding common use cases
Extending a task
Adding extra options to recipes based on Autotools
Applying a patch
Adding extra files to the existing packages
Understanding file searching paths
Changing recipe feature configuration
Configuration fragments for Kconfig-based projects
Summary
Chapter 14: Achieving GPL Compliance
Understanding copyleft
Understanding copyleft compliance versus proprietary code
Managing software licensing with Poky
Understanding commercial licenses
Using Poky to achieve copyleft compliance
Understanding license auditing
Providing the source code
Providing compilation scripts and source code modifications
Providing license text
Summary
Chapter 15: Booting Our Custom Embedded Linux
Discovering the right BSP layer
Reviewing aspects that impact hardware use
Taking a look at widely used BSP layers
Using physical hardware
BeagleBone Black
Baking for BeagleBone Black
Booting BeagleBone Black
Raspberry Pi 4
Baking for Raspberry Pi 4
Booting Raspberry Pi 4
VisionFive
Baking for VisionFive
Booting VisionFive
Taking the next steps
Summary
Chapter 16: Speeding Up Product Development through Emulation – QEMU
What is QEMU?
What are the benefits of using QEMU over hardware?
When is choosing real hardware preferable?
Using runqemu capabilities
Using runqemu to test graphical applications
Using runqemu to validate memory constraints
Using runqemu to help with image regression tests
Summary
Chapter 17: Best Practices
Guidelines to follow for Yocto Project
Managing layers
Avoid creating too many layers
Prepare the product metadata for new Yocto Project releases
Create your custom distro
Avoid reusing existing images for your product
Standard SDK is commonly undervalued
Avoid too many patches for Linux kernel and bootloader modifications
Avoid using AUTOREV as SRCREV
Create a Software Bill of Materials
Guidelines to follow for general projects
Continuously monitor the project license constraints
Security can harm your project
Don’t underestimate maintenance costs
Tackle project risk points and constraints as soon as possible
Summary
Index
Other Books You May Enjoy