I the Yocto Project foss-north // Gothenburg 2018 Introduction - - PowerPoint PPT Presentation

i the yocto project
SMART_READER_LITE
LIVE PREVIEW

I the Yocto Project foss-north // Gothenburg 2018 Introduction - - PowerPoint PPT Presentation

I the Yocto Project foss-north // Gothenburg 2018 Introduction Gordan Marku Embedded Linux, Luxoft, PELUX, AUTOSAR Adaptive Questions for the crowd How many attendes have built their own Embedded Linux image? How many


slide-1
SLIDE 1

I ❤ the Yocto Project

foss-north // Gothenburg 2018

slide-2
SLIDE 2

Introduction

  • Gordan Markuš
  • Embedded Linux, Luxoft, PELUX, AUTOSAR Adaptive
slide-3
SLIDE 3

Questions for the crowd

  • How many attendes have built their own Embedded Linux image?
  • How many attendes have used the Yocto Project?
slide-4
SLIDE 4

$ systemctl start yocto-presentation

slide-5
SLIDE 5

Embedded Linux Build Systems

  • Goals
  • Creating custom Embedded Linux images
  • Cross-compiling applications
  • Packaging applications
  • Create integration points for custom software
  • Testing output binaries
  • Checking ecosystem compatibilty
slide-6
SLIDE 6

Embedded Linux Build Systems

  • Buildroot
  • OpenWRT
  • PTXdist
  • Yocto Project / OpenEmbedded
slide-7
SLIDE 7

My Embedded Linux Path

Ångström Buildroot PTXdist Yocto Project

slide-8
SLIDE 8

What is the Yocto Project?

„The Yocto Project (YP) is an open source collaboration project that helps developers create custom Linux-based systems for embedded products, regardless of the hardware architecture.”

slide-9
SLIDE 9

Yocto Project

  • Core building blocks
  • OpenEmbedded-Core
  • BitBake
  • Poky
slide-10
SLIDE 10

OpenEmbedded-Core

  • Evolved from OpenEmbedded in collaboration with Yocto
  • Compilation of components shared between OE based systems
  • Layers
  • Recipes
  • Classes
slide-11
SLIDE 11

Yocto Recipe

  • Metadata file
  • Describes the component dependencies, build, deploy steps, etc.
  • Specific syntax
slide-12
SLIDE 12

Component information Source information Build and deploy instructions

slide-13
SLIDE 13

OpenEmbedded-Core

  • Example recipes
  • ALSA
  • Busybox
  • cmake
  • autoconf
slide-14
SLIDE 14

Yocto Layer

  • Collection of recipes that have a common purpose
  • Including a layer gives you the possibility to use its components
  • meta- prefix
slide-15
SLIDE 15

Yocto Layer

  • Example layers
  • meta-qt5
  • meta-networking
  • meta-intel
  • meta-project-foo
slide-16
SLIDE 16

BitBake

  • Build engine
  • Parses and interprets the metadata files
  • Task scheduler
slide-17
SLIDE 17

BitBake

Image – list of packages Configuration Ordered tasklist

slide-18
SLIDE 18

Poky

  • Yocto reference implementation
  • Collection of tooling and configuration used to create a new distro
slide-19
SLIDE 19
slide-20
SLIDE 20

OK, great. But what are the cool parts?

slide-21
SLIDE 21

Layered Approach

  • Logical separation and aggregation of software components
  • Hardware agnostic development
  • Maintainability
  • Reusability
slide-22
SLIDE 22

Layered Approach

Project layer (meta-project-foo) Commercial layer (meta-product-bar) UI layer (meta-qt5) Hardware layer (meta-intel) Yocto layer (meta-yocto) OpenEmbedded layer (oe-core)

Highest priority Lowest priority

slide-23
SLIDE 23

Development and Debugging

  • Production image vs development/debug image
  • Features grouped in IMAGE_FEATURES
slide-24
SLIDE 24

Development and Debugging

slide-25
SLIDE 25

Development and Debugging

  • Including dbg packages to the build – NOT FEASIBLE in the long run
  • Creating a remote filesystem with debug symbols

# conf/local.conf IMAGE_GEN_DEBUGFS = "1" IMAGE_FSTYPES_DEBUGFS = "tar.bz2"

slide-26
SLIDE 26

Development and Debugging

  • Connect host GDB to the GDB server on the target
  • Point to remote debugfs to find the debug symbols
  • Profit
slide-27
SLIDE 27

Testing

  • Test image concept
  • Automated runtime testing
  • Virtualized or real hardware target

# conf/local.conf TEST_IMAGE = "1"

slide-28
SLIDE 28

Testing

  • Set of predefined unit tests
  • ping, ssh, dmesg, syslog, etc.
  • Easy to add custom tests

# conf/local.conf TEST_SUITES_append = "ping ssh auto"

slide-29
SLIDE 29

Testing

  • Test results are available in the BitBake console
  • Easy integration with the continous integration system
slide-30
SLIDE 30

License Compliance

  • How to maintain compliance with various open source licenses during

the product’s lifecycle?

slide-31
SLIDE 31

License Compliance

  • Recipe variables
  • LICENSE
  • LIC_FILES_CHKSUM
  • What happens if the

LICENSE file changes between revisions?

slide-32
SLIDE 32

License Compliance

  • QtWebEngine license
slide-33
SLIDE 33

License Compliance

  • Bill of materials
  • Source code
  • License text
  • Modifications
slide-34
SLIDE 34

License Compliance

  • Blacklisting licenses using the INCOMPATIBLE_LICENSE variable
  • Manually remove dependencies on or provide alternatives to

components that are required

slide-35
SLIDE 35

License Compliance

  • GPLv3 software is still a „big no-no!” in certain industries 
  • The goal is to prevent user modification on an embedded device

# conf/local.conf INCOMPATIBLE_LICENSE = „ \ GPL-3.0 \ LGPL-3.0 \ AGPL-3.0 \ "

slide-36
SLIDE 36

License Compliance

  • Exclusion using the meta-gplv2 layer

„This layer contains a set of recipes corresponding to old, obsolete versions of software that are GPLv2 licensed where the upstreams have moved to GPLv3 licenses. These were part of OE-Core until it was realised they are a ticking timebomb with regard to security updates and general maintenance.”

slide-37
SLIDE 37

To summarize

  • Yocto is fun
  • It has awesome features to ease your development
  • It is hard to learn but it is totally worth it
  • Share your experience with a technology you like
slide-38
SLIDE 38

$ systemctl stop yocto-presentation

slide-39
SLIDE 39

Question time!

Contact: gordan.markus@gmail.com Slides under CC-BY-SA 3.0