Embedded Linux Development using Yocto Projects - Second Edition

Book description

Optimize and boost your Linux-based system with Yocto Project and increase its reliability and robustness efficiently and cost-effectively.

Key Features

  • Optimize your Yocto Project tools to develop efficient Linux-based projects
  • Practical approach to learning Linux development using Yocto Project
  • Demonstrates concepts in a practical and easy-to-understand way

Book Description

Yocto Project is turning out to be the best integration framework for creating reliable embedded Linux projects. It has the edge over other frameworks because of its features such as less development time and improved reliability and robustness.

Embedded Linux Development using Yocto Project starts with an in-depth explanation of all Yocto Project tools, to help you perform different Linux-based tasks. The book then moves on to in-depth explanations of Poky and BitBake. It also includes some practical use cases for building a Linux subsystem project using Yocto Project tools available for embedded Linux. The book also covers topics such as SDK, recipetool, and others.

By the end of the book, you will have learned how to generate and run an image for real hardware boards and will have gained hands-on experience at building efficient Linux systems using Yocto Project.

What you will learn

  • Understand the basic concepts involved in Poky workflows along with configuring and preparing the Poky build environment
  • 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 an image for the BeagleBone Black, RaspberryPi 3, and Wandboard, and boot it from an SD card

Who this book is for

If you are an embedded Linux developer with a basic knowledge of Yocto Project and want to broaden your knowledge with examples of embedded development, then this book is for you. This book is also for professionals who want to find new insights into working methodologies for Linux development.

Publisher resources

View/Submit Errata

Table of contents

  1. Title Page
    1. Embedded Linux Development using Yocto Projects
      1. Second Edition
  2. Copyright
    1. Embedded Linux Development using Yocto Projects
      1. Second Edition
  3. Credits
  4. About the Authors
  5. About the Reviewer
  6. www.PacktPub.com
    1. Why subscribe?
  7. Customer Feedback
  8. Preface
    1. What this book covers
    2. What you need for this book  
    3. Who this book is for
    4. Conventions
      1. Reader feedback
    5. Customer support
      1. Downloading the color images of this book
      2. Errata
      3. Piracy
      4. Questions
  9. Meeting the Yocto Project
    1. What is the Yocto Project?
    2. Delineating the Yocto Project
    3. Understanding Poky
    4. Using BitBake
    5. OpenEmbedded-Core
    6. Metadata
    7. The alliance of the OpenEmbedded Project and the Yocto Project
    8. Summary
  10. Baking Our Poky-Based System
    1. Configuring a host system
      1. Installing Poky on Debian
      2. Installing Poky on Fedora
    2. Downloading the Poky source code
    3. Preparing the build environment
    4. Knowing the local.conf file
    5. Building a target image
    6. Running images in QEMU
    7. Summary
  11. Using Toaster to Bake an Image
    1. What is Toaster?
    2. Installing Toaster
    3. Starting Toaster
    4. Building an image to QEMU
    5. Summary
  12. Grasping the BitBake Tool
    1. Understanding the BitBake tool
    2. Exploring metadata
    3. Parsing metadata
    4. Dependencies
    5. Preferring and providing recipes
    6. Fetching the source code
      1. Remote file downloads
      2. Git repositories
      3. Optimizing the source code download
      4. Disabling network access
    7. Understanding BitBake's tasks
      1. Extending tasks
    8. Generating a root filesystem image
    9. Summary
  13. Detailing the Temporary Build Directory
    1. Detailing the build directory
    2. Constructing the build directory
    3. Exploring the temporary build directory
    4. Understanding the work directory
    5. Understanding the sysroot directories
    6. Summary
  14. Assimilating Packaging Support
    1. Using supported package formats
      1. List of supported package formats
      2. Choosing a package format
      3. Running code during package installation
    2. Understanding shared state cache
    3. Explaining package versioning
    4. Specifying runtime package dependencies
    5. Package feeds
      1. Using package feeds
    6. Summary
  15. Diving into BitBake Metadata
    1. Using metadata
      1. Working with metadata
      2. The basic variable setting
      3. Variable expansion
      4. Setting a default value using ?=
      5. Setting a default value using ??=
      6. Immediate variable expansion
      7. Appending and prepending
      8. Override syntax operators
      9. Conditional metadata set
      10. Conditional appending
      11. File inclusion
      12. Python variable expansion
      13. Defining executable metadata
      14. Defining Python functions in the global namespace
      15. The inheritance system
    2. Summary
  16. Developing with the Yocto Project
    1. Deciphering the software development kit
    2. Working with the Poky SDK
      1. Using an image-based SDK
      2. Generic SDK – meta-toolchain
      3. Using an SDK
      4. Developing applications on the target
    3. Integrating with Eclipse
    4. Summary
  17. Debugging with the Yocto Project
    1. Differentiating metadata and application debugging
    2. Tracking image, package, and SDK contents
    3. Debugging packaging
    4. Logging information during task execution
    5. Utilizing a development shell
    6. Using the GNU Project Debugger for debugging
    7. Summary
  18. Exploring External Layers
    1. Powering flexibility with layers
    2. Detailing the layer's source code
    3. Adding meta layers
    4. The Yocto Project layer ecosystem
    5. Summary
  19. Creating Custom Layers
    1. Making a new layer
    2. Adding metadata to the layer
    3. Creating an image
    4. Adding a package recipe
      1. Automatically creating a base package recipe using recipetool
    5. Adding support to a new machine definition
      1. Wrapping an image for your machine
    6. Using a custom distribution
    7. MACHINE_FEATURES versus DISTRO_FEATURES
    8. Understanding the variables scope
    9. Summary
  20. Customizing Existing Recipes
    1. Common use cases
    2. Adding extra options to recipes based on Autoconf
    3. Applying a patch
    4. Adding extra files to the existing packages
      1. Understanding file searching paths
    5. Changing recipe feature configuration
    6. Customizing BusyBox
    7. Customizing the linux-yocto framework
    8. Summary
  21. Achieving GPL Compliance
    1. Understanding copyleft
      1. Copyleft compliance versus proprietary code
      2. Some guidelines for license compliance
    2. Managing software licensing with Poky
      1. Commercial licenses
    3. Using Poky to achieve copyleft compliance
      1. License auditing
      2. Providing the source code
      3. Providing compilation scripts and source code modifications
      4. Providing license text
    4. Summary
  22. Booting Our Custom Embedded Linux
    1. Exploring the boards
    2. Discovering the right BSP layer
    3. Baking for the hardware
      1. Baking for BeagleBone Black
      2. Baking for Raspberry Pi 3
      3. Baking for the Wandboard
    4. Booting our baked image
      1. Booting BeagleBone Black from the SD card
      2. Booting Raspberry Pi 3 from the SD card
      3. Booting Wandboard from the SD card
    5. Next steps
    6. Summary

Product information

  • Title: Embedded Linux Development using Yocto Projects - Second Edition
  • Author(s): Otavio Salvador, Daiane Angolini
  • Release date: November 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781788470469