Session 1
Introduction to Yocto
- Overview of Yocto
- History
- Yocto, Open Embedded and Poky
- Purpose of the Yocto project
- The main projects
- Yocto architecture
- Overview
- Recipes and classes
- Tasks
The Yocto build system
- Build system objectives
- Building deployable images
- Layers and layer priorities
- Directory layout
- Configuration files (local, machine and distribution)
- The bitbake tool
- Using Yocto
- Building a package
- Building an image (root file system + u-boot + kernel)
- Miscellaneous tools around Yocto
Exercise: |
Building a root file system using Yocto |
Exercise: |
Use bitbake commands to build package & images |
Exercise: |
Building a root file system using Yocto |
Exercise: |
Build an extensible SDK for the generated image |
Exercise: |
Deploy the generated image |
Yocto package recipes structure
- Recipe architecture
- Tasks
- Task dependencies
- Recipe dependencies
- The bitbake language
- Standard variables and functions
- Classes and recipes
- The base Yocto classes
- Main bitbake commands
- Adding a new layer
- Layer structure
- Various kinds of layers
Exercise: |
Adding a new layer |
Session 2
Writing package recipes for Yocto
- Various kind of recipes and classes
- Bare program
- Makefile-based package
- autotools-based package
- u-boot
- kernel
- Out-of-tree module
|
- Recipe creation strategies
- From scratch
- Using devtool
- Using recipetool
- From an existing, similar, recipe
- Debugging recipes
- Debugging recipe selection
- Debugging dependencies
- Debugging tasks
- Defining packaging
- Automatically starting a program
Exercise: |
Writing a recipe for a local user-maintained package |
Exercise: |
Writing and debugging a package recipe for an autotools-based package |
Exercise: |
Starting a program at boot (systemd) |
Modifying recipes
- Customizing an existing package recipe (.bbappend)
- Recipe dependencies
- Creating and adding patches
- Creating a patch for a community-provided component
- Creating a patch for an user-maintained component
- Defining new tasks
- Task declaration
- Coding tasks
Exercise: |
Adding patches and dependencies to a community package |
Exercise: |
Adding a rootfsinstall task to directly copy the output of a user package in the rootfs image |
Session 3
Creating new kinds of recipes
- Creating classes
- Creating new independent classes
- Inheriting from an existing class
Exercise: |
Create a class to generalize the “rootfsinstall” task |
Creating a root file system
- Building a root file system with Yocto
- Creating a custom root file system
- Writing an image recipe
- Selecting the packages to build
- Selecting the file system types
- The various kinds of images
- Inheriting and customizing images
- Customizing system configuration files (network, mount points, …)
- Users and groups management
- Package management
Exercise: |
Writing and building an image recipe |
Exercise: |
Add new users to the image |
Exercise: |
Create an image with package support for OTA deployment |
Exercise: |
Test OTA update on the generated image |
|