O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Yocto Project with BeagleBone Black

Book Description

Unleash the power of the BeagleBone Black embedded platform with Yocto Project

  • Build real world embedded system projects using the impressive combination of Yocto Project and Beaglebone Black
  • Learn how to effectively add multimedia to your board and save time by exploiting layers from the existing ones
  • A step-by-step, comprehensive guide for embedded system development with hands-on examples

In Detail

The Yocto Project produces tools and processes that enable the creation of Linux distributions for embedded software, independent of the architecture. BeagleBone Black is a platform that allows users to perform installation and customizations to their liking, quickly and easily.

Starting with a basic introduction to Yocto Project's build system, this book will take you through the setup and deployment steps for Yocto Project. You will develop an understanding of BitBake, learn how to create a basic recipe, and explore the different types of Yocto Project recipe elements. Moving on, you will be able to customize existing recipes in layers and create a home surveillance solution using your webcam, as well as creating other advanced projects using BeagleBone Black and Yocto Project.

By the end of the book, you will have all the necessary skills, exposure, and experience to complete projects based on Yocto Project and BeagleBone Black.

What You Will Learn

  • Develop a successful package or image with the help of the BitBake tool
  • Generate a recipe for some trendy console-based games
  • Boot up BeagleBone using images created with Yocto Project
  • Customize the root file system using a custom layer
  • Create a home surveillance solution using a webcam attached to the BeagleBone USB port
  • Turn BeagleBone into a Wi-fiaccess point by attaching a USB dongle
  • Build different versions of the helloworld recipe

Table of Contents

  1. Using Yocto Project with BeagleBone Black
    1. Table of Contents
    2. Using Yocto Project with BeagleBone Black
    3. Credits
    4. Foreword
    5. About the Author
    6. Acknowledgments
    7. About the Reviewers
    8. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    9. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
      7. Downloading the example code
        1. Downloading the color images of this book
        2. Errata
        3. Piracy
        4. Questions
    10. 1. Welcome to Yocto Project and BeagleBone Black
      1. Setting up a host environment
        1. Essentials
        2. Graphics
        3. Documentation
        4. ADT Installer Extras
      2. Obtaining Yocto Project
      3. Let's build for BeagleBone
        1. Local.conf
        2. bblayers.conf
        3. site.conf
        4. auto.conf
        5. Trigger build
      4. Creating partitions and formatting the SD card
      5. Copying images to the card
      6. Hardware setup
      7. Serial setup
      8. Booting BeagleBone
      9. More about configuration files
        1. machine.conf
        2. bitbake.conf
          1. Standard target filesystem paths
          2. Architecture-dependent build variables
          3. Package default variables
          4. General work and output directories for the build system
          5. Specific image creation and rootfs population information
          6. Build flags and options
          7. Download locations and utilities
          8. Including the rest of the config files
      10. Summary
    11. 2. What's BitBake All About?
      1. A brief history of BitBake
      2. Legacy tools and BitBake
        1. Cross-compilation
        2. Resolving inter-package dependencies
        3. Variety of target distribution
        4. Coupling to build systems
        5. Variety of build systems distros
        6. Variety of architecture
        7. Exploit parallelism
        8. Easy to use, extend, and collaborate
      3. BitBake execution
        1. Parsing metadata
        2. Preparing tasklist
        3. Executing tasks
      4. BitBake options
        1. Building a specific recipe (-b)
        2. ContinuContinuing build even in the case of errors (-k, --continue)
        3. Force-specific tasks (-f, --force)
        4. Using alternate providers (-a, --tryaltconfigs)
        5. Executing a specific task (-c)
        6. Invalidate stamps (-C, --clear-stamp)
        7. Increasing verbosity (-v, --verbose)
        8. Debug level (-D, --debug)
        9. Dry run (-n, --dry-run)
        10. Parse only (-p, --parse-only)
        11. Show versions (-s, --show-versions)
        12. Get environment (-e, --environment)
        13. Generating a dependency graph (-g, --graphviz)
        14. Log levels (-l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS)
        15. Profile (-P, --profile)
        16. Select UI (-u UI, --ui=UI)
        17. Don't use shared state (--no-setscene)
      5. Summary
    12. 3. Creating the helloworld Recipe
      1. Creating helloworld
      2. Contents of the helloworld recipe
        1. Recipe naming and related variables
      3. Building a recipe
      4. Build directories
      5. Tasks
        1. Build
        2. Fetch
        3. Unpack
        4. Patch
        5. Configure
        6. Compile
        7. Install
        8. Package
        9. Devshell
        10. Clean
        11. Cleansstate
        12. Cleanall
        13. Overriding default tasks
      6. Deploying helloworld
        1. Manually installing a package
        2. Making an image dependent on our package
      7. Summary
    13. 4. Adding Multimedia to Your Board
      1. Introducing gaku
      2. The recipe for gaku
        1. Package control variables
          1. Build dependencies (DEPENDS)
          2. Runtime dependencies (RDEPENDS)
          3. Runtime recommendations (RRECOMMENDS)
          4. RCONFLICTS
          5. RREPLACE
          6. PROVIDES
          7. RPROVIDES
        2. Source control in a recipe
          1. SRCREV
          2. PV calculation
          3. The SRC_URI specification
          4. The S directory
          5. Inheriting classes
      3. GStreamer recipes' short trip
        1. Types of variable assignments
        2. EXTRA_OECONF
        3. The FILES_ variables
        4. Variable flags
        5. ALLOW_EMPTY
        6. FILESPATH
        7. Conditional overriding mechanisms
        8. Reusing and sharing the same code
      4. Action time
      5. Summary
    14. 5. Creating and Exploring Layers
      1. Layer creation using script
      2. Contents of layers
        1. The conf directory
        2. recipes-* director{y,ies}
        3. Classes
        4. COPYING.mit
        5. README
      3. Conditional selection based on layers
      4. Append files
      5. Packagegroups
      6. Summary
    15. 6. Your First Console Game
      1. Hardware requirements
      2. Pacman4Console
      3. Let's develop our recipe
        1. Basic elements
        2. Source control
        3. Work directory and version
        4. The S directory
        5. Debugging compile tasks
        6. Installing a task
        7. Adding package contents
      4. Adding a package to the root filesystem
        1. packagegroup
        2. Image bbappend
        3. Action
      5. Summary
    16. 7. Turning BeagleBone into a Home Surveillance System
      1. Problem statement
      2. Requirements
      3. Existing solutions / literature survey
        1. Requiring specialized capturing hardware
        2. Requiring specialized software application
        3. Based on Debian/Angstrom
      4. Selected solution
        1. Host/server side (BeagleBone)
        2. Client side
      5. Let's start the fun
        1. Base plugins
        2. Good plugins
        3. Bad plugins
        4. Ugly plugins
        5. Enabling GStreamer and plugins
        6. Enabling Video4Linux2
          1. In-place amendment
          2. Using append
          3. Using local.conf
        7. The GStreamer pipeline
      6. Client side
        1. VLC
        2. GStreamer
      7. Get ready for running and surprises
        1. Camera-detection issues
        2. UVC driver DMA issue
        3. Build with the meta-ti layer
          1. Fetch the layer
          2. Set the layer priority
          3. Enable the layer
      8. Further enhancements
      9. Summary
    17. 8. BeagleBone as a Wi-Fi Access Point
      1. Problem statement / use case
      2. Requirements
      3. Literature survey
      4. Our strategy
      5. Enabling kernel support
        1. Networking support – wireless
        2. Device Drivers > Network device support > Wireless LAN > Atheros Wireless Cards
        3. A better approach toward Kernel configurations
        4. Copying firmware
        5. Using the previous kernel version
        6. Issue with rfkill
      6. Required packages
      7. Changing upstart scripts
      8. Recipe Hotspot-yb
        1. The access point launcher script
        2. Systemd service unit file
        3. Configuration file for the driver module
        4. Configuration file for hostapd
        5. The gateway setup file
        6. The udhcp configuration file
        7. The udhcp empty lease file
        8. Recipe file hotspot-yb_0.1.bb
      9. Enabling hotspot-yb
      10. Managing in packagegroups
      11. Knowing the issues/enhancements
      12. Summary
    18. Index