Iot 9

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Yocto Project getting

started
SUMMER SCHOOL
What is Yocto Project
Key concepts
Layers and BSP
Recipes
Outline Application development
Hob GUI
Devshell
Questions

2
Linux
Architecture

3
Support for the major architectures
◦ Add support for a few machines besides qemu ones

Only provides core recipes, uses layers to get support for


more packages and machines
General Custom modification stay in separate layer
philosophy Build system as flexible as possible
Open community governed by the Yocto Project Advisory
Board

4
Builds distribution, the main output being a package feed
◦ The package management system is optional on the target
◦ It is possible to install and update only part of the system

Generates not only a root filesystem image but a full OS


Yocto Project distribution. Supports many more filesystems extensions
output With the help of images classes or wic it can create disk
images
Able to generate and SDK for further application development
and other purposes

5
Support for a variety of architectures: ARM, PPC, MIPS and
x86 for both 32 & 64 bits ones

What more to Huge open source community and really powerful players
behind it
know about Support for binary packages: deb/rpm/ipk
this? Releases done at every 6 months in April and
October/November
The starting place for most BSP (board support package)
providers

6
Yocto Project tries to establish itself as a standard for the
Linux community and the industry in the same time:
Mailing lists:
[email protected]
[email protected]
Resources ◦ [email protected]

Source code repositories:


◦ http://git.yoctoproject.org
◦ http://git.openembedded.net

Documentation:
◦ http://www.yoctoproject.org/documentation

Bug reports and feature requests:


◦ http://bugzilla.yoctoproject.org

7
Yocto Project
Administration

8
Yocto Project
support

9
Yocto Project
development

10
Keywords

11
The reference distribution for the Yocto Project
Includes the Bitbake build system and OpenEmbedded core
metadata
Used to bootstrap your own custom Linux distribution
After downloading a number of recipes and configuration files
Poky are visible for Bitbake to process
Similar to OpenEmbedded & Buildroot

12
u-boot – recipes-bsp: instructions necessary to build the u-
boot package
Linux kernel – recipes-kernel: instructions necessary to build
the Linux kernel package
Recipes of gcc, binutils, glibc – recipes-devtools, recipes-core:
interest instructions necessary to build the toolchain specific packages
core-image-minimal: reference build image

13
Machine: target specific configuration
Distro: distribution specific configuration
Layer.conf: layer specific configuration
Available Local.conf: build directory specific configuration
configuration

14
Layers
architecture

15
Poky tasks
execution

16
Development
details

17
1.System development workflow
2.Application development workflow
3.Modifying temporary source code
Development 4.OS Image development using Hob or Toaster
models 5.Using a development shell

18
System development involves modification/creation of an
image for a specific hardware target.
A.Developing a Board Support Package (BSP)

System B.Modifying the Kernel


development

19
Developing a
BSP

20
The BSP layers contain extensions and customizations to the
base system such as:
◦ image customizations
◦ adding extra configuration
◦ additional recipes
◦ modifying recipes
BSP layer
Machine settings are added inside: conf/machine/*.conf
New layers should be added to the BBLAYERS variable inside
build directory conf/bblayers.conf file:

21
Modifying the
kernel

22
Create applications for the target hardware.
The target hardware runs an operating system created using
the Yocto Project build system.

Application The Yocto Project provides:


◦ Application Development Toolkit (ADT)
development ◦ A stand-alone cross-development toolchains
◦ Eclipse Yocto Plugin to develop, deploy and test applications from
within Eclipse.

23
ADT workflow

24
Patches
This means modifying the temporary source code used by
Modifying recipes to build packages during development.

temporary
source code

25
The Hob is a GUI for the Yocto Project build system. It is not
used anymore.
You can use the Hob to build custom OS images.

Hob Hob actions


◦ Select the MACHINE for which you are building the image.
development ◦ Modify policy settings.
◦ Manage layers.
◦ Select an image and add extra packages.
◦ Launch and monitor the build.

26
Web interface for the Yocto Project. More up to date the Hob.
Allows users to configure and run builds:
◦ Browse listed layers
◦ Browse images, recipes and machines
◦ Add, remove and import layers
Toaster ◦ Set configuration variables
development ◦

Set target(s) to build
Start a build
Provides extensive information about the build process:
◦ See what was built
◦ Browse through the directory structure
◦ See variables value
◦ Examine errors, warnings and other messages
◦ Bitbake task execution information
◦ Dependency relationships
◦ Performance information
Switch between command line and web interface at any time

27
Devshell is useful to debug certain commands or even edit
packages.
Devshell opens a terminal with a shell prompt that allows
executions inside Yocto Project environment.
When using devshell the full name of the compiler should be
Devshell used.
The same applies to other applications such as binutils, libtool
and others. BitBake sets up environment variables such as CC
to assist applications, such as make to find the correct tools.
It is also worth noting that devshell still works over X11
forwarding and similar situations .

28
Questions?

29

You might also like