SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
1Building RT image with Yocto
Building RT image with Yocto
Pierre Ficheux (pierre.ficheux@smile.fr)
02/2018
2Building RT image with Yocto
Disclaimer
●
Poor English speaker !
●
But “good” French speaker and writer :-)
“Loin du français je meurs”
(Louis-Ferdinand Céline)
3Building RT image with Yocto
$ whoami
●
Embedded Linux developer, writer and teacher
●
CTO @ Smile ECS (Embedded & Connected Systems)
●
Last book about embedded Linux (in french !)
4Building RT image with Yocto
Yocto quick history
●
Open Embedded started in 2003 (OpenZaurus)
●
Buildroot was not smart enough (static, no packages)
●
Recipes = “how to cross-compile X for target Y”
●
BitBake program to run OE recipes
– Inspired by “Portage” (Gentoo)
– written in Python
●
Yocto started in 2010 (by Intel & friends) including
– OE (core)
– BitBake
– Poky (reference distro)
– E-Glibc (Glibc since 2014)
– Smart documentation !!
5Building RT image with Yocto
Yocto layers
Yocto/OE
My layer
6Building RT image with Yocto
Yocto / OE principles
● Recipes (.bb)
● Extended recipes (.bbappend)
● Based on classes (.bbclass) → inherit
● Include files (.inc) → include / require
● Configuration files (.conf)
●
Everything external should be in meta-<whathever>
●
Very few number of mainline targets (13)
– QEMU-* (x86, ARM, MIPS, PPC)
– BeagleBone Black
– PPC
– Generic x86 + x86_64
– EdgeRouter
●
Most real platforms need a meta-<hw-type> layer
7Building RT image with Yocto
Yocto + Pi 3 « in a nutshell »
●
Installing Poky (Yocto reference distro)
$ git clone -b <branch> git://git.yoctoproject.org/poky
●
Installing Raspberry Pi layer (meta-raspberrypi)
$ cd poky
$ git clone -b <branch> git://git.yoctoproject.org/meta-raspberrypi
●
Creating work directory
$ source oe-init-build-env rpi3-build
● Adding Pi layer to bblayers.conf
$ bitbake-layers add-layer ../meta-raspberrypi
● Adding machine type to local.conf
echo "MACHINE = "raspberrypi3"" >> conf/local.conf
●
Building minimal image
$ bitbake core-image-minimal
●
Writing Micro-SD
$ sudo dd if=core-image-minimal-raspberrypi3.rpi-sdimg of=/dev/mmcblk0
8Building RT image with Yocto
Linux + real time
●
Several talks about it (FOSDEM, etc.)
●
2 ways
– PREEMPT_RT (single kernel patch)
– RTAI / Xenomai (co-kernel approach - Cobalt, kernel
patch + libs)
– Xenomai can work on top PREEMPT_RT (Mercury)
●
PREEMPT_RT is “the official Linux RT patch” since 2015
(Thomas Gleixner, Steven Rostedt)
●
RTAI is a fork for RTLinux (Paolo Mantegazza)
●
Xenomai is a fork for RTAI (Philippe Gerum)
●
Co-kernel is more complex to use but more efficient (2x+)
– Hardware support
– Specific (RT) kernel interface (RTDM)
– Application design (migration problem)
9Building RT image with Yocto
RT and “build systems”
●
Yocto and Buildroot are “build systems”
●
Easy to build RT image in Buildroot
– PREEMPT_RT is a kernel patch
– Xenomai / RTAI support available
●
PREEMPT_RT support available in Yocto
– Dedicated kernel recipe = linux-yocto-rt
– Image recipe = core-image-rt (depending on linux-yocto-rt)
– Only for test (?)
$ grep COMPATIBLE linux/linux-yocto-rt_4.12.bb COMPATIBLE_MACHINE = "(qemux86|
qemux86-64|qemuarm|qemuppc|qemumips)" !!!!
●
Support for Xenomai in meta-eldk (very old)
10Building RT image with Yocto
Extending recipe
● Updating recipe (.bb) with a .bbappend
● Default logo in meta/recipes-core/psplash
meta/recipes-core/psplash/
├── files
│   ├── psplash-init
│   └── psplash-poky-img.h
└── psplash_git.bb
● Yocto logo in meta-poky/recipes-core/psplash
meta-poky/recipes-core/psplash
├── files
│   └── psplash-poky-img.h
└── psplash_git.bbappend
● Enabling I²C for Pi in rpi_config_git.bbappend
do_deploy_append() {
# Enable i2c by default
echo "dtparam=i2c_arm=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt
}
new logo file !
FILESEXTRAPATHS_prepend_poky := "${THISDIR}/files:"
11Building RT image with Yocto
Using real hardware
●
Just “extend” kernel for PREEMPT_RT
– Create a new layer meta-<rt-test-name>
– Add a recipes-kernel/linux-<board>-rt directory
meta-article-bis/
├── conf
│   └── layer.conf
└── recipes-kernel
└── linux-rpi3
├── files
│   ├── defconfig
│   └── patch-4.4.50-rt63.patch
└── linux-rpi3_4.4.bbappend
●
PREEMPT_RT kernel branch available for some
boards (BBB)
●
Specific layer is needed for Xenomai
kernel config file
PREEMPT_RT patch
12Building RT image with Yocto
Xenomai
●
More difficult as :
– Need to run prepare-kernel.sh script to apply kernel patch
(I-pipe)
– Need to install user-space files
●
New layer meta-xenomai
– Kernel recipe linux-xenomai-<board>
– User-space recipe (Autotools based)
● Kernel recipe adds do_prepare_kernel() function for patch
(Cobalt support only)
● Executed before do_configure() (use addtask)
13Building RT image with Yocto
Yocto + Xenomai
●
Add meta-xenomai layer path
$ cd <path>/poky
$ git clone https://github.com/pficheux/meta-xenomai.git
$ cd rpi3-build
$ bitbake-layers add-layer ../meta-xenomai
● Add Xenomai support to local.conf or dedicated image
recipe
PREFERRED_PROVIDER_virtual/kernel = "linux-xenomai-<board>"
IMAGE_INSTALL_append = " xenomai rt-tests"
14Building RT image with Yocto
Xenomai, TBD
●
Test on Yocto 2.3 + 2.4
●
New boards (mostly done by end-users)
15Building RT image with Yocto
References
●
Yocto layer meta-xenomai https://github.com/pficheux/meta-xenomai
●
Xenomai project http://xenomai.org/
●
PREEMPT_RT Wiki https://rt.wiki.kernel.org/index.php/Main_Page
●
Embedded Linux Systems with the Yocto Project par Rudolf J. Streif https://www.pearson.com/us/higher-
education/program/Streif-Embedded-Linux-Systems-with-the-Yocto-Project/PGM275649.html

Contenu connexe

Tendances

How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.Naoto MATSUMOTO
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkArulalan T
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded trainingH Ming
 
Physical Memory Management.pdf
Physical Memory Management.pdfPhysical Memory Management.pdf
Physical Memory Management.pdfAdrian Huang
 
7 hands on
7 hands on7 hands on
7 hands onvideos
 
망고100 보드로 놀아보자 8
망고100 보드로 놀아보자 8망고100 보드로 놀아보자 8
망고100 보드로 놀아보자 8종인 전
 
Understanding performance aspects of etcd and Raft
Understanding performance aspects of etcd and RaftUnderstanding performance aspects of etcd and Raft
Understanding performance aspects of etcd and RaftHitoshi Mitake
 
Linux Ethernet device driver
Linux Ethernet device driverLinux Ethernet device driver
Linux Ethernet device driver艾鍗科技
 
Tcache Exploitation
Tcache ExploitationTcache Exploitation
Tcache ExploitationAngel Boy
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421Linaro
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)Brendan Gregg
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedAdrian Huang
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionGene Chang
 

Tendances (20)

Hands-on ethernet driver
Hands-on ethernet driverHands-on ethernet driver
Hands-on ethernet driver
 
How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.How to Speak Intel DPDK KNI for Web Services.
How to Speak Intel DPDK KNI for Web Services.
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Testing in-python-and-pytest-framework
Testing in-python-and-pytest-frameworkTesting in-python-and-pytest-framework
Testing in-python-and-pytest-framework
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 
Physical Memory Management.pdf
Physical Memory Management.pdfPhysical Memory Management.pdf
Physical Memory Management.pdf
 
7 hands on
7 hands on7 hands on
7 hands on
 
망고100 보드로 놀아보자 8
망고100 보드로 놀아보자 8망고100 보드로 놀아보자 8
망고100 보드로 놀아보자 8
 
POWER10 innovations for HPC
POWER10 innovations for HPCPOWER10 innovations for HPC
POWER10 innovations for HPC
 
Understanding performance aspects of etcd and Raft
Understanding performance aspects of etcd and RaftUnderstanding performance aspects of etcd and Raft
Understanding performance aspects of etcd and Raft
 
Linux Ethernet device driver
Linux Ethernet device driverLinux Ethernet device driver
Linux Ethernet device driver
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Embedded Virtualization applied in Mobile Devices
Embedded Virtualization applied in Mobile DevicesEmbedded Virtualization applied in Mobile Devices
Embedded Virtualization applied in Mobile Devices
 
Tcache Exploitation
Tcache ExploitationTcache Exploitation
Tcache Exploitation
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
Userspace networking
Userspace networkingUserspace networking
Userspace networking
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
Inside the jvm
Inside the jvmInside the jvm
Inside the jvm
 

Similaire à Building RT image with Yocto

A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devicesMender.io
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoPrabindh Sundareson
 
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 2018ICS
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingHenry Schreiner
 
Gdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpackGdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpackKAI CHU CHUNG
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto ProjectLeon Anavi
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Asher Martin
 
Getting Started with Buildroot - Lab
Getting Started with Buildroot - LabGetting Started with Buildroot - Lab
Getting Started with Buildroot - LabTrevor Woerner
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Henry Schreiner
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Jian-Hong Pan
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectYen-Chin Lee
 
Buildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in pythonBuildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in pythonCodeSyntax
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in EnglishOtavio Salvador
 
20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engver20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engverNaoki Sekiguchi
 
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Yoshitake Kobayashi
 

Similaire à Building RT image with Yocto (20)

A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with Yocto
 
Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
 
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
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
Bringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near YouBringing Tizen to a Raspberry Pi 2 Near You
Bringing Tizen to a Raspberry Pi 2 Near You
 
Princeton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance ToolingPrinceton Wintersession: Software Quality Assurance Tooling
Princeton Wintersession: Software Quality Assurance Tooling
 
Gdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpackGdg cloud taipei ddt meetup #53 buildpack
Gdg cloud taipei ddt meetup #53 buildpack
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto Project
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
Getting Started with Buildroot - Lab
Getting Started with Buildroot - LabGetting Started with Buildroot - Lab
Getting Started with Buildroot - Lab
 
Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023Software Quality Assurance Tooling 2023
Software Quality Assurance Tooling 2023
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Buildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in pythonBuildout: creating and deploying repeatable applications in python
Buildout: creating and deploying repeatable applications in python
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
 
20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engver20150317 firefox os_studymtg_engver
20150317 firefox os_studymtg_engver
 
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
Poky meets Debian: Understanding how to make an embedded Linux by using an ex...
 

Plus de Alexandre LAHAYE

openPOWERLINK over Xenomai
openPOWERLINK over XenomaiopenPOWERLINK over Xenomai
openPOWERLINK over XenomaiAlexandre LAHAYE
 
Présentation Bluetooth Low Energy - SMILE ECS
Présentation Bluetooth Low Energy - SMILE ECSPrésentation Bluetooth Low Energy - SMILE ECS
Présentation Bluetooth Low Energy - SMILE ECSAlexandre LAHAYE
 
Les solutions libres pour les systèmes embarqués
Les solutions libres pour les systèmes embarquésLes solutions libres pour les systèmes embarqués
Les solutions libres pour les systèmes embarquésAlexandre LAHAYE
 
Les technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectésLes technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectésAlexandre LAHAYE
 
Les technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectésLes technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectésAlexandre LAHAYE
 
Qt4 et 5 pour Linux embarqué
Qt4 et 5 pour Linux embarquéQt4 et 5 pour Linux embarqué
Qt4 et 5 pour Linux embarquéAlexandre LAHAYE
 
Les technologies Open Source pour les interfaces graphiques embarquées
Les technologies Open Source pour les interfaces graphiques embarquéesLes technologies Open Source pour les interfaces graphiques embarquées
Les technologies Open Source pour les interfaces graphiques embarquéesAlexandre LAHAYE
 
Open Wide : les licences libres.
Open Wide : les licences libres. Open Wide : les licences libres.
Open Wide : les licences libres. Alexandre LAHAYE
 
Open Wide : Les outils pour le développement des systemes embarques
Open Wide : Les outils pour le développement des systemes embarquesOpen Wide : Les outils pour le développement des systemes embarques
Open Wide : Les outils pour le développement des systemes embarquesAlexandre LAHAYE
 
Open Wide : Les interfaces graphiques dans l'embarque
Open Wide : Les interfaces graphiques dans l'embarqueOpen Wide : Les interfaces graphiques dans l'embarque
Open Wide : Les interfaces graphiques dans l'embarqueAlexandre LAHAYE
 
OPEN WIDE : L’open source pour les systemes embarques Temps reel
OPEN WIDE : L’open source pour les systemes embarques Temps reelOPEN WIDE : L’open source pour les systemes embarques Temps reel
OPEN WIDE : L’open source pour les systemes embarques Temps reelAlexandre LAHAYE
 

Plus de Alexandre LAHAYE (14)

openPOWERLINK over Xenomai
openPOWERLINK over XenomaiopenPOWERLINK over Xenomai
openPOWERLINK over Xenomai
 
Présentation Bluetooth Low Energy - SMILE ECS
Présentation Bluetooth Low Energy - SMILE ECSPrésentation Bluetooth Low Energy - SMILE ECS
Présentation Bluetooth Low Energy - SMILE ECS
 
Les solutions libres pour les systèmes embarqués
Les solutions libres pour les systèmes embarquésLes solutions libres pour les systèmes embarqués
Les solutions libres pour les systèmes embarqués
 
Les technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectésLes technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectés
 
Les technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectésLes technologies Open Source pour les objets connectés
Les technologies Open Source pour les objets connectés
 
Qt4 et 5 pour Linux embarqué
Qt4 et 5 pour Linux embarquéQt4 et 5 pour Linux embarqué
Qt4 et 5 pour Linux embarqué
 
Les technologies Open Source pour les interfaces graphiques embarquées
Les technologies Open Source pour les interfaces graphiques embarquéesLes technologies Open Source pour les interfaces graphiques embarquées
Les technologies Open Source pour les interfaces graphiques embarquées
 
Android pour l'industrie
Android pour l'industrieAndroid pour l'industrie
Android pour l'industrie
 
Yocto oe
Yocto oeYocto oe
Yocto oe
 
Plateformes embarquées
Plateformes embarquéesPlateformes embarquées
Plateformes embarquées
 
Open Wide : les licences libres.
Open Wide : les licences libres. Open Wide : les licences libres.
Open Wide : les licences libres.
 
Open Wide : Les outils pour le développement des systemes embarques
Open Wide : Les outils pour le développement des systemes embarquesOpen Wide : Les outils pour le développement des systemes embarques
Open Wide : Les outils pour le développement des systemes embarques
 
Open Wide : Les interfaces graphiques dans l'embarque
Open Wide : Les interfaces graphiques dans l'embarqueOpen Wide : Les interfaces graphiques dans l'embarque
Open Wide : Les interfaces graphiques dans l'embarque
 
OPEN WIDE : L’open source pour les systemes embarques Temps reel
OPEN WIDE : L’open source pour les systemes embarques Temps reelOPEN WIDE : L’open source pour les systemes embarques Temps reel
OPEN WIDE : L’open source pour les systemes embarques Temps reel
 

Dernier

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Dernier (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Building RT image with Yocto

  • 1. 1Building RT image with Yocto Building RT image with Yocto Pierre Ficheux (pierre.ficheux@smile.fr) 02/2018
  • 2. 2Building RT image with Yocto Disclaimer ● Poor English speaker ! ● But “good” French speaker and writer :-) “Loin du français je meurs” (Louis-Ferdinand Céline)
  • 3. 3Building RT image with Yocto $ whoami ● Embedded Linux developer, writer and teacher ● CTO @ Smile ECS (Embedded & Connected Systems) ● Last book about embedded Linux (in french !)
  • 4. 4Building RT image with Yocto Yocto quick history ● Open Embedded started in 2003 (OpenZaurus) ● Buildroot was not smart enough (static, no packages) ● Recipes = “how to cross-compile X for target Y” ● BitBake program to run OE recipes – Inspired by “Portage” (Gentoo) – written in Python ● Yocto started in 2010 (by Intel & friends) including – OE (core) – BitBake – Poky (reference distro) – E-Glibc (Glibc since 2014) – Smart documentation !!
  • 5. 5Building RT image with Yocto Yocto layers Yocto/OE My layer
  • 6. 6Building RT image with Yocto Yocto / OE principles ● Recipes (.bb) ● Extended recipes (.bbappend) ● Based on classes (.bbclass) → inherit ● Include files (.inc) → include / require ● Configuration files (.conf) ● Everything external should be in meta-<whathever> ● Very few number of mainline targets (13) – QEMU-* (x86, ARM, MIPS, PPC) – BeagleBone Black – PPC – Generic x86 + x86_64 – EdgeRouter ● Most real platforms need a meta-<hw-type> layer
  • 7. 7Building RT image with Yocto Yocto + Pi 3 « in a nutshell » ● Installing Poky (Yocto reference distro) $ git clone -b <branch> git://git.yoctoproject.org/poky ● Installing Raspberry Pi layer (meta-raspberrypi) $ cd poky $ git clone -b <branch> git://git.yoctoproject.org/meta-raspberrypi ● Creating work directory $ source oe-init-build-env rpi3-build ● Adding Pi layer to bblayers.conf $ bitbake-layers add-layer ../meta-raspberrypi ● Adding machine type to local.conf echo "MACHINE = "raspberrypi3"" >> conf/local.conf ● Building minimal image $ bitbake core-image-minimal ● Writing Micro-SD $ sudo dd if=core-image-minimal-raspberrypi3.rpi-sdimg of=/dev/mmcblk0
  • 8. 8Building RT image with Yocto Linux + real time ● Several talks about it (FOSDEM, etc.) ● 2 ways – PREEMPT_RT (single kernel patch) – RTAI / Xenomai (co-kernel approach - Cobalt, kernel patch + libs) – Xenomai can work on top PREEMPT_RT (Mercury) ● PREEMPT_RT is “the official Linux RT patch” since 2015 (Thomas Gleixner, Steven Rostedt) ● RTAI is a fork for RTLinux (Paolo Mantegazza) ● Xenomai is a fork for RTAI (Philippe Gerum) ● Co-kernel is more complex to use but more efficient (2x+) – Hardware support – Specific (RT) kernel interface (RTDM) – Application design (migration problem)
  • 9. 9Building RT image with Yocto RT and “build systems” ● Yocto and Buildroot are “build systems” ● Easy to build RT image in Buildroot – PREEMPT_RT is a kernel patch – Xenomai / RTAI support available ● PREEMPT_RT support available in Yocto – Dedicated kernel recipe = linux-yocto-rt – Image recipe = core-image-rt (depending on linux-yocto-rt) – Only for test (?) $ grep COMPATIBLE linux/linux-yocto-rt_4.12.bb COMPATIBLE_MACHINE = "(qemux86| qemux86-64|qemuarm|qemuppc|qemumips)" !!!! ● Support for Xenomai in meta-eldk (very old)
  • 10. 10Building RT image with Yocto Extending recipe ● Updating recipe (.bb) with a .bbappend ● Default logo in meta/recipes-core/psplash meta/recipes-core/psplash/ ├── files │   ├── psplash-init │   └── psplash-poky-img.h └── psplash_git.bb ● Yocto logo in meta-poky/recipes-core/psplash meta-poky/recipes-core/psplash ├── files │   └── psplash-poky-img.h └── psplash_git.bbappend ● Enabling I²C for Pi in rpi_config_git.bbappend do_deploy_append() { # Enable i2c by default echo "dtparam=i2c_arm=on" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt } new logo file ! FILESEXTRAPATHS_prepend_poky := "${THISDIR}/files:"
  • 11. 11Building RT image with Yocto Using real hardware ● Just “extend” kernel for PREEMPT_RT – Create a new layer meta-<rt-test-name> – Add a recipes-kernel/linux-<board>-rt directory meta-article-bis/ ├── conf │   └── layer.conf └── recipes-kernel └── linux-rpi3 ├── files │   ├── defconfig │   └── patch-4.4.50-rt63.patch └── linux-rpi3_4.4.bbappend ● PREEMPT_RT kernel branch available for some boards (BBB) ● Specific layer is needed for Xenomai kernel config file PREEMPT_RT patch
  • 12. 12Building RT image with Yocto Xenomai ● More difficult as : – Need to run prepare-kernel.sh script to apply kernel patch (I-pipe) – Need to install user-space files ● New layer meta-xenomai – Kernel recipe linux-xenomai-<board> – User-space recipe (Autotools based) ● Kernel recipe adds do_prepare_kernel() function for patch (Cobalt support only) ● Executed before do_configure() (use addtask)
  • 13. 13Building RT image with Yocto Yocto + Xenomai ● Add meta-xenomai layer path $ cd <path>/poky $ git clone https://github.com/pficheux/meta-xenomai.git $ cd rpi3-build $ bitbake-layers add-layer ../meta-xenomai ● Add Xenomai support to local.conf or dedicated image recipe PREFERRED_PROVIDER_virtual/kernel = "linux-xenomai-<board>" IMAGE_INSTALL_append = " xenomai rt-tests"
  • 14. 14Building RT image with Yocto Xenomai, TBD ● Test on Yocto 2.3 + 2.4 ● New boards (mostly done by end-users)
  • 15. 15Building RT image with Yocto References ● Yocto layer meta-xenomai https://github.com/pficheux/meta-xenomai ● Xenomai project http://xenomai.org/ ● PREEMPT_RT Wiki https://rt.wiki.kernel.org/index.php/Main_Page ● Embedded Linux Systems with the Yocto Project par Rudolf J. Streif https://www.pearson.com/us/higher- education/program/Streif-Embedded-Linux-Systems-with-the-Yocto-Project/PGM275649.html