Yocto-for-Raspberry-Pi.pdf

(4782 KB) Pobierz
Yocto for Raspberry Pi
Table of Contents
Yocto for Raspberry Pi
Credits
About the Authors
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Meeting the Yocto Project
The Yocto Project
Understanding the build system
The core components
What is Poky?
The Chief - BitBake
OpenEmbedded-Core
Exploring metadata
Yocto Project - workflow
Summary
2. Building our First Poky Image for the Raspberry Pi
Installing the required packages for the host system
Poky on Ubuntu
Poky on Fedora
Downloading the Poky metadata
Downloading the Raspberry Pi BSP metadata
The oe-init-build-env script
Editing the local.conf file
Editing the bblayers.conf file
Building the Poky image
Choice of image
Running BitBake
Creating an SD card
Booting the image on the Raspberry Pi
Summary
3. Mastering Baking with Hob and Toaster
Hob
Preparing the environment for Hob
Running Hob
Configuring recipes and packages
Building the image
Exploring Toaster
Installing the required packages for the host system
Running Toaster
Running BitBake
Running the web interface
Summary
4. Understanding BitBake
BitBake
Metadata
Configuration
Classes
Recipes
Parsing metadata
Preferences and providers
Dependencies
Fetching
The local file fetcher
The HTTP fetcher
The Git fetcher
Understanding BitBake's tasks
Summary
5. Creating, Developing, and Deploying on the Raspberry Pi
Software development kits (SDKs)
A generic SDK - meta-toolchain
image.bb -c populate_sdk
The Qt SDK - meta-toolchain-qt
The Qt5 SDK - meta-toolchain-qt5
Cross-compilation - an example
Configuration of the SDK environment
List of tools
Compilation
Raspberry Pi and a package manager
Package format availablility
Choosing a package format
Installing and updating a package on the target
RPM packages
Installing manually
Installing automatically
IPK packages
Installing manually
Installing automatically
Our application - an introduction
Our application - creating the recipe
The recipe explained
Summary
6. Working with External Layers
Introducing layers
The basic concepts of layers
Theory
The software layer
README and COPYING
The classes folder
The conf folder
The recipes-* directory
The machine (BSP) layer
Adding external layers to the Raspberry Pi
Summary
7. Deploying a Custom Layer on the Raspberry Pi
Creating the meta-packt_rpi layer with the yocto-layer script
Adding gpio-packt to meta-packt_rpi
Patching gpio-packt
Generating the patch
Adding the patch to the recipe file
Creating the raspberry-packt-image.bb image
Creating the environment
Modifying the recipe file
Deploying the raspberry-packt-image.bb image
Summary
8. Diving into the Raspberry Pi's Peripherals and Yocto Recipes
The SPI bus
The spi-tools project
Inclusion in the meta-oe layer
Baking spi-tools
Testing on the Raspberry Pi
spi-config
spi-pipe
Conclusion
The i2c bus
The Wii Nunchuck
The Nunchuck connector
The Raspberry Pi connection
Zgłoś jeśli naruszono regulamin