SlideShare a Scribd company logo
1 of 21
Download to read offline
Embedded Linux @ Information Technology Institute 1
Embedded Linux
Yocto
Information Technology Institute
Sherif Mousa
Embedded Linux @ Information Technology Institute 2
Agenda
●
What is Yocto?
●
Why Yocto?
●
Yocto Project Overview
●
Yocto Key Concept (recipe)
●
Yocto Workflow
●
Yocto Member Organizations
●
Working with Yocto
Embedded Linux @ Information Technology Institute 3
What is Yocto?
It's not an embedded Linux distribution -
It creates a custom one for you.
●
www.yoctoproject.org
●
The Yocto Project is an open-source collaboration project. It
provides templates, tools and methods to help you create custom
Linux-based systems for embedded products regardless of
hardware architecture.
●
Yocto Project uses a build system based on the OpenEmbedded
(OE) project, which uses the BitBake tool, to construct complete
Linux images. The BitBake and OE components are combined
together to form Poky, a reference build system.
Embedded Linux @ Information Technology Institute 4
Why Yocto?
●
Develop using one common Linux OS for different
architectures.
●
Re-use your software stack with future devices.
●
Changing hardware platforms with updating just one line
in a config file and rebuild.
●
Base your work on a validated collection of software and
libraries.
Developers spend lots of time porting or making build systems, leaves
less time and resources to develop value-adding software features.
Embedded Linux @ Information Technology Institute 5
Yocto Project Overview
●
OpenEmbedded (OE) – The overall build architecture
used by the Yocto Project.
●
BitBake – Task executor and scheduler.
●
Metadata – Task definitions.
●
Configuration (*.conf) – global definitions of variables.
●
Classes (*.bbclass) – encapsulation and inheritance of
build logic, packaging, etc.
●
Recipes (*.bb) – the logical units of software/images to
build.
Embedded Linux @ Information Technology Institute 6
Yocto Project Overview (cont'd)
●
OpenEmbedded Core (oe-core) – A core set of
metadata shared by the OpenEmbedded and the
Yocto Project.
●
meta-yocto – Reference policy/distro configuration
and reference hardware support layer.
●
Poky – A pre-prepared combination of the build
system components needed; also the name of our
reference distro in meta-yocto
Poky = Bitbake + OE-core + meta-yocto + docs
Embedded Linux @ Information Technology Institute 7
Yocto Key Concept (recipe)
●
The Yocto Project provides tools and metadata for
creating custom Linux images.
●
These images are created from a repository of 'baked'
recipes.
●
A recipe is a set of instructions for building packages:
– Where to obtain the upstream sources and which patches to
apply
– Dependencies (on libraries or other recipes)
– Configuration/compilation options
– Define which files go into what output packages
Embedded Linux @ Information Technology Institute 8
Yocto Workflow
Embedded Linux @ Information Technology Institute 9
Yocto Member Organizations
Embedded Linux @ Information Technology Institute 10
Working with Yocto
Embedded Linux @ Information Technology Institute 11
Yocto First Shot
●
Download Yocto source
– All releases: http://downloads.yoctoproject.org/releases/yocto/
– Current final release: poky-dizzy-12.0.1.tar.bz2
●
Untar the downloaded file
$ tar xvf poky­dizzy­12.0.1.tar.bz2
●
Go inside the project directory: $ cd poky­dizzy­12.0.1
●
Source the poky default environment script
$ source oe­init­build­env 
●
Configure (if you want) your conf ile: $ vim conf/local.conf
●
Start the build process (and wait ….)
bitbake core­image­minimal
●
Run Qemu emulator with output image
runqemu qemux86
Embedded Linux @ Information Technology Institute 12
Poky Directory Structure
●
bitbake: the BitBake utility itself.
●
documentation: documentation sources.
●
scripts: various support scripts (e.g, runqemu)
●
meta/conf: important configuration files,
bitbake.conf, reference distro config, machine
configs for QEMU architectures.
●
meta/classes: BitBake classes.
●
meta/recipes-* : recipes for all packages & libs
Embedded Linux @ Information Technology Institute 13
Recipe Skeleton
●
Example of a recipe
SUMMARY = “”
DISCRIPTION = “”
HOMEPAGE = “”
LICENSE = “”
SRC_URI = “”
SRC_URI[md5sum] = “”
inherit stuff
don't edit the poky default recipes, but create
your own recipes & layers
Embedded Linux @ Information Technology Institute 14
Yocto Configuration Files
●
Build directory files
●
conf/bblayers.conf
– Contains locations for all layers needed for your build process.
BBLAYERS ?= "  
  /home/user/yocto/poky/meta­yocto  ............
●
conf/local.conf
– Set your build options, choose target machine, add or remove features
from your build image
BB_NUMBER_THREADS = "threads"
PARALLEL_MAKE = "­j threads"
MACHINE ?= "qemuarm"
DL_DIR ?= <download­dir­path>
Embedded Linux @ Information Technology Institute 15
Recipe build steps
●
Building recipes involves executing the following
functions, which can be overridden when needed for
customizations.
– do_fetch
– do_unpack
– do_patch
– do_configure
– do_compile
– do_install
– do_package
Embedded Linux @ Information Technology Institute 16
Layers
●
The Yocto Project build system is composed of
layers.
●
A layer is a logical collection of recipes
representing the core, a Board Support
Package (BSP), or an application stack.
●
All layers have a priority and can override policy
and config settings of the layers beneath it.
Embedded Linux @ Information Technology Institute 17
Board Support Package (BSP)
●
BSPs are layers to enable support for specific
hardware platforms.
●
Defines machine configuration for the “board”.
●
Adds machine-specific recipes and
customizations.
– Kernel config
– Graphics drivers (e.g, Xorg)
– Additional recipes to support hardware features
Embedded Linux @ Information Technology Institute 18
Yocto Layers Stacking
Developers-Specific Layer
Commercial Layer
UI - Optional Layer
Hardware Specific BSP
Yocto Layer Metadata (meta-yocto)
OpenEmbedded Core Metadata (oe-core)
Embedded Linux @ Information Technology Institute 19
Useful Links
●
Yocto Project quick start guide
– yocto-project-qs
●
Bitbake user manual
– bitbake-user-manual
●
Yocto Project development manual
– dev-manual
Embedded Linux @ Information Technology Institute 20
Embedded Linux @ Information Technology Institute 21
sherif.e.mousa@gmail.com
http://about.me/shatrix

More Related Content

What's hot

Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
Otavio Salvador
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
Houcheng Lin
 
Embedded Operating System - Linux
Embedded Operating System - LinuxEmbedded Operating System - Linux
Embedded Operating System - Linux
Emertxe Information Technologies Pvt Ltd
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
Sherif Mousa
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
Rashila Rr
 

What's hot (20)

Stefano Cordibella - An introduction to Yocto Project
Stefano Cordibella - An introduction to Yocto ProjectStefano Cordibella - An introduction to Yocto Project
Stefano Cordibella - An introduction to Yocto Project
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
 
Effective Linux Development Using PetaLinux Tools 2017.4
Effective Linux Development Using PetaLinux Tools 2017.4Effective Linux Development Using PetaLinux Tools 2017.4
Effective Linux Development Using PetaLinux Tools 2017.4
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Embedded Operating System - Linux
Embedded Operating System - LinuxEmbedded Operating System - Linux
Embedded Operating System - Linux
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
 
Run Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using YoctoRun Qt on Linux embedded systems using Yocto
Run Qt on Linux embedded systems using Yocto
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 

Viewers also liked

linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
Sherif Mousa
 
Building Embedded Linux
Building Embedded LinuxBuilding Embedded Linux
Building Embedded Linux
Sherif Mousa
 
001 linux revision
001 linux revision001 linux revision
001 linux revision
Sherif Mousa
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
Patrick Bellasi
 
Tutorial membangun linux from scratch dari awal
Tutorial membangun linux from scratch dari awalTutorial membangun linux from scratch dari awal
Tutorial membangun linux from scratch dari awal
Muhammad Dzulfikri
 

Viewers also liked (20)

Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems Introduction
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
 
Building Embedded Linux
Building Embedded LinuxBuilding Embedded Linux
Building Embedded Linux
 
Embedded Linux
Embedded LinuxEmbedded Linux
Embedded Linux
 
005 skyeye
005 skyeye005 skyeye
005 skyeye
 
003 scripting
003 scripting003 scripting
003 scripting
 
Operating systems Basics
Operating systems BasicsOperating systems Basics
Operating systems Basics
 
001 linux revision
001 linux revision001 linux revision
001 linux revision
 
كيف تفشل
كيف تفشلكيف تفشل
كيف تفشل
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux Basics
 
Device tree support on arm linux
Device tree support on arm linuxDevice tree support on arm linux
Device tree support on arm linux
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
Smile
SmileSmile
Smile
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linux
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with Yocto
 
Tutorial membangun linux from scratch dari awal
Tutorial membangun linux from scratch dari awalTutorial membangun linux from scratch dari awal
Tutorial membangun linux from scratch dari awal
 
Yocto and IoT - a retrospective
Yocto and IoT - a retrospectiveYocto and IoT - a retrospective
Yocto and IoT - a retrospective
 
Why you should use the Yocto Project
Why you should use the Yocto ProjectWhy you should use the Yocto Project
Why you should use the Yocto Project
 

Similar to Yocto - Embedded Linux Distribution Maker

An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018
ICS
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notes
Steve Arnold
 

Similar to Yocto - Embedded Linux Distribution Maker (20)

Yocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux DistributionYocto Project : Custom Embedded Linux Distribution
Yocto Project : Custom Embedded Linux Distribution
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
 
IoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSesIoT: Contrasting Yocto/Buildroot to binary OSes
IoT: Contrasting Yocto/Buildroot to binary OSes
 
Building Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto projectBuilding Emmbedded Linux with Yocto project
Building Emmbedded Linux with Yocto project
 
Embedded linux build systems
Embedded linux build systems  Embedded linux build systems
Embedded linux build systems
 
Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
 
Autobuilder2 Yocto Project Summit Lyon 2019
Autobuilder2 Yocto Project Summit Lyon 2019Autobuilder2 Yocto Project Summit Lyon 2019
Autobuilder2 Yocto Project Summit Lyon 2019
 
Eclipse IDE Yocto Plugin
Eclipse IDE Yocto PluginEclipse IDE Yocto Plugin
Eclipse IDE Yocto Plugin
 
Yocto Project Dev Day Prague 2017 - Advanced class - Kernel modules with eSDK
Yocto Project Dev Day Prague 2017 - Advanced class - Kernel modules with eSDKYocto Project Dev Day Prague 2017 - Advanced class - Kernel modules with eSDK
Yocto Project Dev Day Prague 2017 - Advanced class - Kernel modules with eSDK
 
Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018
 
[Webinar] An Introduction to the Yocto Embedded Framework
[Webinar] An Introduction to the Yocto Embedded Framework[Webinar] An Introduction to the Yocto Embedded Framework
[Webinar] An Introduction to the Yocto Embedded Framework
 
An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018
 
Yocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-OnYocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-On
 
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
The Latest Status of CE Workgroup Shared Embedded Linux Distribution Project
 
Yocto Project - OSCON 7-17-2012
Yocto Project - OSCON 7-17-2012Yocto Project - OSCON 7-17-2012
Yocto Project - OSCON 7-17-2012
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
 
Building RT image with Yocto
Building RT image with YoctoBuilding RT image with Yocto
Building RT image with Yocto
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notes
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
FOSDEM_2019_Buildroot_RISCV.pdf
FOSDEM_2019_Buildroot_RISCV.pdfFOSDEM_2019_Buildroot_RISCV.pdf
FOSDEM_2019_Buildroot_RISCV.pdf
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Yocto - Embedded Linux Distribution Maker

  • 1. Embedded Linux @ Information Technology Institute 1 Embedded Linux Yocto Information Technology Institute Sherif Mousa
  • 2. Embedded Linux @ Information Technology Institute 2 Agenda ● What is Yocto? ● Why Yocto? ● Yocto Project Overview ● Yocto Key Concept (recipe) ● Yocto Workflow ● Yocto Member Organizations ● Working with Yocto
  • 3. Embedded Linux @ Information Technology Institute 3 What is Yocto? It's not an embedded Linux distribution - It creates a custom one for you. ● www.yoctoproject.org ● The Yocto Project is an open-source collaboration project. It provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of hardware architecture. ● Yocto Project uses a build system based on the OpenEmbedded (OE) project, which uses the BitBake tool, to construct complete Linux images. The BitBake and OE components are combined together to form Poky, a reference build system.
  • 4. Embedded Linux @ Information Technology Institute 4 Why Yocto? ● Develop using one common Linux OS for different architectures. ● Re-use your software stack with future devices. ● Changing hardware platforms with updating just one line in a config file and rebuild. ● Base your work on a validated collection of software and libraries. Developers spend lots of time porting or making build systems, leaves less time and resources to develop value-adding software features.
  • 5. Embedded Linux @ Information Technology Institute 5 Yocto Project Overview ● OpenEmbedded (OE) – The overall build architecture used by the Yocto Project. ● BitBake – Task executor and scheduler. ● Metadata – Task definitions. ● Configuration (*.conf) – global definitions of variables. ● Classes (*.bbclass) – encapsulation and inheritance of build logic, packaging, etc. ● Recipes (*.bb) – the logical units of software/images to build.
  • 6. Embedded Linux @ Information Technology Institute 6 Yocto Project Overview (cont'd) ● OpenEmbedded Core (oe-core) – A core set of metadata shared by the OpenEmbedded and the Yocto Project. ● meta-yocto – Reference policy/distro configuration and reference hardware support layer. ● Poky – A pre-prepared combination of the build system components needed; also the name of our reference distro in meta-yocto Poky = Bitbake + OE-core + meta-yocto + docs
  • 7. Embedded Linux @ Information Technology Institute 7 Yocto Key Concept (recipe) ● The Yocto Project provides tools and metadata for creating custom Linux images. ● These images are created from a repository of 'baked' recipes. ● A recipe is a set of instructions for building packages: – Where to obtain the upstream sources and which patches to apply – Dependencies (on libraries or other recipes) – Configuration/compilation options – Define which files go into what output packages
  • 8. Embedded Linux @ Information Technology Institute 8 Yocto Workflow
  • 9. Embedded Linux @ Information Technology Institute 9 Yocto Member Organizations
  • 10. Embedded Linux @ Information Technology Institute 10 Working with Yocto
  • 11. Embedded Linux @ Information Technology Institute 11 Yocto First Shot ● Download Yocto source – All releases: http://downloads.yoctoproject.org/releases/yocto/ – Current final release: poky-dizzy-12.0.1.tar.bz2 ● Untar the downloaded file $ tar xvf poky­dizzy­12.0.1.tar.bz2 ● Go inside the project directory: $ cd poky­dizzy­12.0.1 ● Source the poky default environment script $ source oe­init­build­env  ● Configure (if you want) your conf ile: $ vim conf/local.conf ● Start the build process (and wait ….) bitbake core­image­minimal ● Run Qemu emulator with output image runqemu qemux86
  • 12. Embedded Linux @ Information Technology Institute 12 Poky Directory Structure ● bitbake: the BitBake utility itself. ● documentation: documentation sources. ● scripts: various support scripts (e.g, runqemu) ● meta/conf: important configuration files, bitbake.conf, reference distro config, machine configs for QEMU architectures. ● meta/classes: BitBake classes. ● meta/recipes-* : recipes for all packages & libs
  • 13. Embedded Linux @ Information Technology Institute 13 Recipe Skeleton ● Example of a recipe SUMMARY = “” DISCRIPTION = “” HOMEPAGE = “” LICENSE = “” SRC_URI = “” SRC_URI[md5sum] = “” inherit stuff don't edit the poky default recipes, but create your own recipes & layers
  • 14. Embedded Linux @ Information Technology Institute 14 Yocto Configuration Files ● Build directory files ● conf/bblayers.conf – Contains locations for all layers needed for your build process. BBLAYERS ?= "     /home/user/yocto/poky/meta­yocto  ............ ● conf/local.conf – Set your build options, choose target machine, add or remove features from your build image BB_NUMBER_THREADS = "threads" PARALLEL_MAKE = "­j threads" MACHINE ?= "qemuarm" DL_DIR ?= <download­dir­path>
  • 15. Embedded Linux @ Information Technology Institute 15 Recipe build steps ● Building recipes involves executing the following functions, which can be overridden when needed for customizations. – do_fetch – do_unpack – do_patch – do_configure – do_compile – do_install – do_package
  • 16. Embedded Linux @ Information Technology Institute 16 Layers ● The Yocto Project build system is composed of layers. ● A layer is a logical collection of recipes representing the core, a Board Support Package (BSP), or an application stack. ● All layers have a priority and can override policy and config settings of the layers beneath it.
  • 17. Embedded Linux @ Information Technology Institute 17 Board Support Package (BSP) ● BSPs are layers to enable support for specific hardware platforms. ● Defines machine configuration for the “board”. ● Adds machine-specific recipes and customizations. – Kernel config – Graphics drivers (e.g, Xorg) – Additional recipes to support hardware features
  • 18. Embedded Linux @ Information Technology Institute 18 Yocto Layers Stacking Developers-Specific Layer Commercial Layer UI - Optional Layer Hardware Specific BSP Yocto Layer Metadata (meta-yocto) OpenEmbedded Core Metadata (oe-core)
  • 19. Embedded Linux @ Information Technology Institute 19 Useful Links ● Yocto Project quick start guide – yocto-project-qs ● Bitbake user manual – bitbake-user-manual ● Yocto Project development manual – dev-manual
  • 20. Embedded Linux @ Information Technology Institute 20
  • 21. Embedded Linux @ Information Technology Institute 21 sherif.e.mousa@gmail.com http://about.me/shatrix