SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
Debian or Yocto Project?
Which is the Best for your Embedded Linux Project?
Chris Simmonds
Embedded World 2020
Debian or Yocto Project? 1 Copyright © 2011-2020, 2net Ltd
License
These slides are available under a Creative Commons Attribution-ShareAlike 4.0 license. You can read the full
text of the license here
http://creativecommons.org/licenses/by-sa/4.0/legalcode
You are free to
• copy, distribute, display, and perform the work
• make derivative works
• make commercial use of the work
Under the following conditions
• Attribution: you must give the original author credit
• Share Alike: if you alter, transform, or build upon this work, you may distribute the resulting work only
under a license identical to this one (i.e. include this page exactly as it is)
• For any reuse or distribution, you must make clear to others the license terms of this work
Debian or Yocto Project? 2 Copyright © 2011-2020, 2net Ltd
About Chris Simmonds
• Consultant and trainer
• Author of Mastering Embedded Linux Programming
• Working with embedded Linux since 1999
• Android since 2009
• Speaker at many conferences and workshops
"Looking after the Inner Penguin" blog at http://2net.co.uk/
@2net_software
https://uk.linkedin.com/in/chrisdsimmonds/
Debian or Yocto Project? 3 Copyright © 2011-2020, 2net Ltd
Agenda
• The dilemma
• Debian
• Yocto Project
• Conclusions
Debian or Yocto Project? 4 Copyright © 2011-2020, 2net Ltd
The dilemma
• I am designing a new gizmo thing
• I want it to do many things
• I want to have it on the market as soon as possible - before the
other gizmo folks get there
• BUT
• I want it to be robust, updateable, maintainable
• What should I do????
Debian or Yocto Project? 5 Copyright © 2011-2020, 2net Ltd
Choices
Off-the-peg Use a Debian based distro (or another distro of your choice)
Debian or Yocto Project? 6 Copyright © 2011-2020, 2net Ltd
Choices
Off-the-peg Use a Debian based distro (or another distro of your choice)
Bespoke Build everything from scratch using a build system like Yocto
(or Buildroot)
Debian or Yocto Project? 6 Copyright © 2011-2020, 2net Ltd
Debian
• Debian is a full distro with tens of thousands of packages
• Stable, long term support
• Binary, so no need to cross-compile
Debian or Yocto Project? 7 Copyright © 2011-2020, 2net Ltd
Board support for Debian
Debian architectures most relevant to embedded devices:
Architecture Description
amd64 x86-64
arm64 ARMv8-A
armhf ARMv7-A with floating point unit
armel ARMv4T instruction set
Popular boards
• Raspberry Pi (Raspbian is Debain compiled for the Broadcom chipset)
• BeagleBoards of all sorts
• many others...
Debian or Yocto Project? 8 Copyright © 2011-2020, 2net Ltd
Building a Debian rootfs
Root filesystem
apt install xyz
Debian
repository
xyz_1.0+b1_armel.deb
/etc/apt/sources.list
Debian or Yocto Project? 9 Copyright © 2011-2020, 2net Ltd
Developing on Debian: first pass
The overall procedure would be
• Take an existing "off-the-peg" image
Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
Developing on Debian: first pass
The overall procedure would be
• Take an existing "off-the-peg" image
• Strip out things you don’t want
Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
Developing on Debian: first pass
The overall procedure would be
• Take an existing "off-the-peg" image
• Strip out things you don’t want
• Add the things you do want
Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
Developing on Debian: first pass
The overall procedure would be
• Take an existing "off-the-peg" image
• Strip out things you don’t want
• Add the things you do want
• Compile natively (on the target) custom programs and libraries
Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
Developing on Debian: first pass
The overall procedure would be
• Take an existing "off-the-peg" image
• Strip out things you don’t want
• Add the things you do want
• Compile natively (on the target) custom programs and libraries
• Add any other tweaks you need
Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
Developing on Debian: first pass
The overall procedure would be
• Take an existing "off-the-peg" image
• Strip out things you don’t want
• Add the things you do want
• Compile natively (on the target) custom programs and libraries
• Add any other tweaks you need
Resulting in a "Golden Master" image
Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
The "Golden Master"
• Once development is done, use dd (or similar) to take a copy of the
filesystem
• Clone it to all units shipped
Debian or Yocto Project? 11 Copyright © 2011-2020, 2net Ltd
What can go wrong?
A Golden Master can become a millstone
• Steps to create it are almost certainly not documented
Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
What can go wrong?
A Golden Master can become a millstone
• Steps to create it are almost certainly not documented
• so changes have to be incremental
• major changes, e.g. to a new distro release, are very difficult
Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
What can go wrong?
A Golden Master can become a millstone
• Steps to create it are almost certainly not documented
• so changes have to be incremental
• major changes, e.g. to a new distro release, are very difficult
• Probably contains a finger-print of the person who created it
Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
What can go wrong?
A Golden Master can become a millstone
• Steps to create it are almost certainly not documented
• so changes have to be incremental
• major changes, e.g. to a new distro release, are very difficult
• Probably contains a finger-print of the person who created it
• user accounts and passwords
• $HOME/.bash_history
• old system log files
Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
Developing on Debian: second pass
You need a robust, reproducible build process
• Build a base system image using Rootstock, debootstrap, or similar
• Install only the packages you need
• Import your own software and configuration (ideally encapsulated as
Debian packages)
• Examples
• BeagleBoard Image Builder:
https://github.com/beagleboard/image-builder
• Raspberry Pi Gen https://github.com/RPi-Distro/pi-gen
Debian or Yocto Project? 13 Copyright © 2011-2020, 2net Ltd
A note about software update
• Updates to Debian systems would seem to be easy
Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
A note about software update
• Updates to Debian systems would seem to be easy
• just apt update
Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
A note about software update
• Updates to Debian systems would seem to be easy
• just apt update
• But, updates via apt are not atomic
Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
A note about software update
• Updates to Debian systems would seem to be easy
• just apt update
• But, updates via apt are not atomic
• You will probably end up doing a full image update
Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
Downsides of Debian
• Large image size (compared to equivalent Yocto system)
Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
Downsides of Debian
• Large image size (compared to equivalent Yocto system)
• More software means more attack vectors
Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
Downsides of Debian
• Large image size (compared to equivalent Yocto system)
• More software means more attack vectors
• May not be compiled optimally for your platform (i.e. may not be using
some features of the CPU)
Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
Downsides of Debian
• Large image size (compared to equivalent Yocto system)
• More software means more attack vectors
• May not be compiled optimally for your platform (i.e. may not be using
some features of the CPU)
• Not optimized for flash memory - many disk writes wear it out
Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
Downsides of Debian
• Large image size (compared to equivalent Yocto system)
• More software means more attack vectors
• May not be compiled optimally for your platform (i.e. may not be using
some features of the CPU)
• Not optimized for flash memory - many disk writes wear it out
• Compiling natively on a low powered device is slow
Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
Downsides of Debian
• Large image size (compared to equivalent Yocto system)
• More software means more attack vectors
• May not be compiled optimally for your platform (i.e. may not be using
some features of the CPU)
• Not optimized for flash memory - many disk writes wear it out
• Compiling natively on a low powered device is slow
• You still have to build the bootloader (e.g.U-Boot), kernel and kernel
modules - these are not updated as part of the distro update
Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
Yocto Project/OpenEmbedded
• With OpenEmbedded/Yocto Project you create a distribution to your
own specification
Debian or Yocto Project? 16 Copyright © 2011-2020, 2net Ltd
Yocto Project/OpenEmbedded
• With OpenEmbedded/Yocto Project you create a distribution to your
own specification
• Build from up-stream source code
• Control over every stage of compiling and building the target
Debian or Yocto Project? 16 Copyright © 2011-2020, 2net Ltd
Support for Yocto Project
• Industry-wide support
• Chip vendors of ARM, MIPS, PowerPC and X86 architectures
• Board and System On Module vendors
• Commercial embedded Linux software vendors, such as ENEA, Mentor
Graphics, Montavista, Timesys and more
Debian or Yocto Project? 17 Copyright © 2011-2020, 2net Ltd
Building a rootfs with Yocto Project
Root filesystem
bitbake xyz
Uptream
source
zyx-1.0.tar.gz
Metadata xyz.rpm
do_rootfs
Debian or Yocto Project? 18 Copyright © 2011-2020, 2net Ltd
It’s all in the metadata
Distro
Machine Image
Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
It’s all in the metadata
Distro
Machine Image
• Distro: how I want to put my
system together
Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
It’s all in the metadata
Distro
Machine Image
• Distro: how I want to put my
system together
• Machine: the board I want to
build for
Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
It’s all in the metadata
Distro
Machine Image
• Distro: how I want to put my
system together
• Machine: the board I want to
build for
• Image: the selection of
packages I want
Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
Downsides of Yocto Project
• Steep learning curve
Debian or Yocto Project? 20 Copyright © 2011-2020, 2net Ltd
Downsides of Yocto Project
• Steep learning curve
• Community support window is only 12 months
• After that, you are responsible for monitoring and updating key packages
• ... or outsource to a third party
Debian or Yocto Project? 20 Copyright © 2011-2020, 2net Ltd
Downsides of Yocto Project
• Steep learning curve
• Community support window is only 12 months
• After that, you are responsible for monitoring and updating key packages
• ... or outsource to a third party
• Building the rootfs from source requires powerful hardware
Debian or Yocto Project? 20 Copyright © 2011-2020, 2net Ltd
Debian is best for...
• Proof Of Concept and prototypes
Debian or Yocto Project? 21 Copyright © 2011-2020, 2net Ltd
Debian is best for...
• Proof Of Concept and prototypes
• One-off projects
Debian or Yocto Project? 21 Copyright © 2011-2020, 2net Ltd
Debian is best for...
• Proof Of Concept and prototypes
• One-off projects
• ... using commodity hardware such as Raspberry Pi
Debian or Yocto Project? 21 Copyright © 2011-2020, 2net Ltd
Yocto Project is best for ...
• custom hardware (no distro available)
Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd
Yocto Project is best for ...
• custom hardware (no distro available)
• reduced attack surface
Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd
Yocto Project is best for ...
• custom hardware (no distro available)
• reduced attack surface
• optimized for minimal memory and storage
Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd
Yocto Project is best for ...
• custom hardware (no distro available)
• reduced attack surface
• optimized for minimal memory and storage
• full report of packages and their licenses (needed license compliance)
Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd

Mais conteúdo relacionado

Mais procurados

HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
Linaro
 
Linux packet-forwarding
Linux packet-forwardingLinux packet-forwarding
Linux packet-forwarding
Masakazu Asama
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux Devices
Leon Anavi
 

Mais procurados (20)

Reducing the boot time of Linux devices
Reducing the boot time of Linux devicesReducing the boot time of Linux devices
Reducing the boot time of Linux devices
 
ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
 
Podman rootless containers
Podman rootless containersPodman rootless containers
Podman rootless containers
 
レシピの作り方入門
レシピの作り方入門レシピの作り方入門
レシピの作り方入門
 
Yocto Project introduction
Yocto Project introductionYocto Project introduction
Yocto Project introduction
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!
 
YoctoをつかったDistroの作り方とハマり方
YoctoをつかったDistroの作り方とハマり方YoctoをつかったDistroの作り方とハマり方
YoctoをつかったDistroの作り方とハマり方
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Linux packet-forwarding
Linux packet-forwardingLinux packet-forwarding
Linux packet-forwarding
 
Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバーBtrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
Btrfs + Snapper + Samba で作る「以前のバージョン」に戻せるファイルサーバー
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux Devices
 
SMTPのSTARTTLSにおけるTLSバージョンについて
SMTPのSTARTTLSにおけるTLSバージョンについてSMTPのSTARTTLSにおけるTLSバージョンについて
SMTPのSTARTTLSにおけるTLSバージョンについて
 
Docker入門 - 基礎編 いまから始めるDocker管理
Docker入門 - 基礎編 いまから始めるDocker管理Docker入門 - 基礎編 いまから始めるDocker管理
Docker入門 - 基礎編 いまから始めるDocker管理
 
linux introduction
linux introductionlinux introduction
linux introduction
 
Learn C Programming Language by Using GDB
Learn C Programming Language by Using GDBLearn C Programming Language by Using GDB
Learn C Programming Language by Using GDB
 
FreeBSD jail+vnetと戯れた話
FreeBSD jail+vnetと戯れた話FreeBSD jail+vnetと戯れた話
FreeBSD jail+vnetと戯れた話
 
Linux PCI device driver
Linux PCI device driverLinux PCI device driver
Linux PCI device driver
 

Semelhante a Debian or Yocto Project? Which is the best for your Embedded Linux project?

Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015
Chris Simmonds
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notes
Steve Arnold
 
DockerCon SF 2015: Maintaining the official node.js docker image
DockerCon SF 2015: Maintaining the official node.js docker imageDockerCon SF 2015: Maintaining the official node.js docker image
DockerCon SF 2015: Maintaining the official node.js docker image
Docker, Inc.
 
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
 

Semelhante a Debian or Yocto Project? Which is the best for your Embedded Linux project? (20)

Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017Software update for IoT Embedded World 2017
Software update for IoT Embedded World 2017
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015
 
Software update for IoT: the current state of play
Software update for IoT: the current state of playSoftware update for IoT: the current state of play
Software update for IoT: the current state of play
 
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
Generating a Reproducible and Maintainable Embedded Linux Environment with Po...
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5
 
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
 
[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
 
yocto_scale_handout-with-notes
yocto_scale_handout-with-notesyocto_scale_handout-with-notes
yocto_scale_handout-with-notes
 
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
 
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
 
Java / Opening Open Source the Jenkins Way - Nicolas de Loof, CloudBees
Java / Opening Open Source the Jenkins Way - Nicolas de Loof, CloudBeesJava / Opening Open Source the Jenkins Way - Nicolas de Loof, CloudBees
Java / Opening Open Source the Jenkins Way - Nicolas de Loof, CloudBees
 
Yocto Project - OSCON 7-17-2012
Yocto Project - OSCON 7-17-2012Yocto Project - OSCON 7-17-2012
Yocto Project - OSCON 7-17-2012
 
DockerCon SF 2015: Maintaining the official node.js docker image
DockerCon SF 2015: Maintaining the official node.js docker imageDockerCon SF 2015: Maintaining the official node.js docker image
DockerCon SF 2015: Maintaining the official node.js docker image
 
Docking, loading, running domino on docker v12
Docking, loading, running domino on docker v12Docking, loading, running domino on docker v12
Docking, loading, running domino on docker v12
 
IoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianIoT Prototyping using BBB and Debian
IoT Prototyping using BBB and Debian
 
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
 
DockerCon SF 2015: Maintaining the Official Node.js Docker Image
DockerCon SF 2015: Maintaining the Official Node.js Docker ImageDockerCon SF 2015: Maintaining the Official Node.js Docker Image
DockerCon SF 2015: Maintaining the Official Node.js Docker Image
 
Yocto vs. Debian white paper
Yocto vs. Debian white paperYocto vs. Debian white paper
Yocto vs. Debian white paper
 
Yocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-onYocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-on
 
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
 

Mais de Chris Simmonds

Mais de Chris Simmonds (15)

Debugging embedded devices using GDB
Debugging embedded devices using GDBDebugging embedded devices using GDB
Debugging embedded devices using GDB
 
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiRunning Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
 
Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019
 
Reducing boot time in embedded Linux
Reducing boot time in embedded LinuxReducing boot time in embedded Linux
Reducing boot time in embedded Linux
 
Linux power management: are you doing it right?
Linux power management: are you doing it right?Linux power management: are you doing it right?
Linux power management: are you doing it right?
 
Embedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphoneEmbedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphone
 
Quick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIOQuick and Easy Device Drivers for Embedded Linux Using UIO
Quick and Easy Device Drivers for Embedded Linux Using UIO
 
Android beyond the smartphone
Android beyond the smartphoneAndroid beyond the smartphone
Android beyond the smartphone
 
10 ways hardware engineers can make software integration easier
10 ways hardware engineers can make software integration easier10 ways hardware engineers can make software integration easier
10 ways hardware engineers can make software integration easier
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)
 
Tuning Android for low RAM
Tuning Android for low RAMTuning Android for low RAM
Tuning Android for low RAM
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 
A timeline for embedded Linux
A timeline for embedded LinuxA timeline for embedded Linux
A timeline for embedded Linux
 

Último

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
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
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
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
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
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
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
 

Debian or Yocto Project? Which is the best for your Embedded Linux project?

  • 1. Debian or Yocto Project? Which is the Best for your Embedded Linux Project? Chris Simmonds Embedded World 2020 Debian or Yocto Project? 1 Copyright © 2011-2020, 2net Ltd
  • 2. License These slides are available under a Creative Commons Attribution-ShareAlike 4.0 license. You can read the full text of the license here http://creativecommons.org/licenses/by-sa/4.0/legalcode You are free to • copy, distribute, display, and perform the work • make derivative works • make commercial use of the work Under the following conditions • Attribution: you must give the original author credit • Share Alike: if you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one (i.e. include this page exactly as it is) • For any reuse or distribution, you must make clear to others the license terms of this work Debian or Yocto Project? 2 Copyright © 2011-2020, 2net Ltd
  • 3. About Chris Simmonds • Consultant and trainer • Author of Mastering Embedded Linux Programming • Working with embedded Linux since 1999 • Android since 2009 • Speaker at many conferences and workshops "Looking after the Inner Penguin" blog at http://2net.co.uk/ @2net_software https://uk.linkedin.com/in/chrisdsimmonds/ Debian or Yocto Project? 3 Copyright © 2011-2020, 2net Ltd
  • 4. Agenda • The dilemma • Debian • Yocto Project • Conclusions Debian or Yocto Project? 4 Copyright © 2011-2020, 2net Ltd
  • 5. The dilemma • I am designing a new gizmo thing • I want it to do many things • I want to have it on the market as soon as possible - before the other gizmo folks get there • BUT • I want it to be robust, updateable, maintainable • What should I do???? Debian or Yocto Project? 5 Copyright © 2011-2020, 2net Ltd
  • 6. Choices Off-the-peg Use a Debian based distro (or another distro of your choice) Debian or Yocto Project? 6 Copyright © 2011-2020, 2net Ltd
  • 7. Choices Off-the-peg Use a Debian based distro (or another distro of your choice) Bespoke Build everything from scratch using a build system like Yocto (or Buildroot) Debian or Yocto Project? 6 Copyright © 2011-2020, 2net Ltd
  • 8. Debian • Debian is a full distro with tens of thousands of packages • Stable, long term support • Binary, so no need to cross-compile Debian or Yocto Project? 7 Copyright © 2011-2020, 2net Ltd
  • 9. Board support for Debian Debian architectures most relevant to embedded devices: Architecture Description amd64 x86-64 arm64 ARMv8-A armhf ARMv7-A with floating point unit armel ARMv4T instruction set Popular boards • Raspberry Pi (Raspbian is Debain compiled for the Broadcom chipset) • BeagleBoards of all sorts • many others... Debian or Yocto Project? 8 Copyright © 2011-2020, 2net Ltd
  • 10. Building a Debian rootfs Root filesystem apt install xyz Debian repository xyz_1.0+b1_armel.deb /etc/apt/sources.list Debian or Yocto Project? 9 Copyright © 2011-2020, 2net Ltd
  • 11. Developing on Debian: first pass The overall procedure would be • Take an existing "off-the-peg" image Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
  • 12. Developing on Debian: first pass The overall procedure would be • Take an existing "off-the-peg" image • Strip out things you don’t want Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
  • 13. Developing on Debian: first pass The overall procedure would be • Take an existing "off-the-peg" image • Strip out things you don’t want • Add the things you do want Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
  • 14. Developing on Debian: first pass The overall procedure would be • Take an existing "off-the-peg" image • Strip out things you don’t want • Add the things you do want • Compile natively (on the target) custom programs and libraries Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
  • 15. Developing on Debian: first pass The overall procedure would be • Take an existing "off-the-peg" image • Strip out things you don’t want • Add the things you do want • Compile natively (on the target) custom programs and libraries • Add any other tweaks you need Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
  • 16. Developing on Debian: first pass The overall procedure would be • Take an existing "off-the-peg" image • Strip out things you don’t want • Add the things you do want • Compile natively (on the target) custom programs and libraries • Add any other tweaks you need Resulting in a "Golden Master" image Debian or Yocto Project? 10 Copyright © 2011-2020, 2net Ltd
  • 17. The "Golden Master" • Once development is done, use dd (or similar) to take a copy of the filesystem • Clone it to all units shipped Debian or Yocto Project? 11 Copyright © 2011-2020, 2net Ltd
  • 18. What can go wrong? A Golden Master can become a millstone • Steps to create it are almost certainly not documented Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
  • 19. What can go wrong? A Golden Master can become a millstone • Steps to create it are almost certainly not documented • so changes have to be incremental • major changes, e.g. to a new distro release, are very difficult Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
  • 20. What can go wrong? A Golden Master can become a millstone • Steps to create it are almost certainly not documented • so changes have to be incremental • major changes, e.g. to a new distro release, are very difficult • Probably contains a finger-print of the person who created it Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
  • 21. What can go wrong? A Golden Master can become a millstone • Steps to create it are almost certainly not documented • so changes have to be incremental • major changes, e.g. to a new distro release, are very difficult • Probably contains a finger-print of the person who created it • user accounts and passwords • $HOME/.bash_history • old system log files Debian or Yocto Project? 12 Copyright © 2011-2020, 2net Ltd
  • 22. Developing on Debian: second pass You need a robust, reproducible build process • Build a base system image using Rootstock, debootstrap, or similar • Install only the packages you need • Import your own software and configuration (ideally encapsulated as Debian packages) • Examples • BeagleBoard Image Builder: https://github.com/beagleboard/image-builder • Raspberry Pi Gen https://github.com/RPi-Distro/pi-gen Debian or Yocto Project? 13 Copyright © 2011-2020, 2net Ltd
  • 23. A note about software update • Updates to Debian systems would seem to be easy Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
  • 24. A note about software update • Updates to Debian systems would seem to be easy • just apt update Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
  • 25. A note about software update • Updates to Debian systems would seem to be easy • just apt update • But, updates via apt are not atomic Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
  • 26. A note about software update • Updates to Debian systems would seem to be easy • just apt update • But, updates via apt are not atomic • You will probably end up doing a full image update Debian or Yocto Project? 14 Copyright © 2011-2020, 2net Ltd
  • 27. Downsides of Debian • Large image size (compared to equivalent Yocto system) Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
  • 28. Downsides of Debian • Large image size (compared to equivalent Yocto system) • More software means more attack vectors Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
  • 29. Downsides of Debian • Large image size (compared to equivalent Yocto system) • More software means more attack vectors • May not be compiled optimally for your platform (i.e. may not be using some features of the CPU) Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
  • 30. Downsides of Debian • Large image size (compared to equivalent Yocto system) • More software means more attack vectors • May not be compiled optimally for your platform (i.e. may not be using some features of the CPU) • Not optimized for flash memory - many disk writes wear it out Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
  • 31. Downsides of Debian • Large image size (compared to equivalent Yocto system) • More software means more attack vectors • May not be compiled optimally for your platform (i.e. may not be using some features of the CPU) • Not optimized for flash memory - many disk writes wear it out • Compiling natively on a low powered device is slow Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
  • 32. Downsides of Debian • Large image size (compared to equivalent Yocto system) • More software means more attack vectors • May not be compiled optimally for your platform (i.e. may not be using some features of the CPU) • Not optimized for flash memory - many disk writes wear it out • Compiling natively on a low powered device is slow • You still have to build the bootloader (e.g.U-Boot), kernel and kernel modules - these are not updated as part of the distro update Debian or Yocto Project? 15 Copyright © 2011-2020, 2net Ltd
  • 33. Yocto Project/OpenEmbedded • With OpenEmbedded/Yocto Project you create a distribution to your own specification Debian or Yocto Project? 16 Copyright © 2011-2020, 2net Ltd
  • 34. Yocto Project/OpenEmbedded • With OpenEmbedded/Yocto Project you create a distribution to your own specification • Build from up-stream source code • Control over every stage of compiling and building the target Debian or Yocto Project? 16 Copyright © 2011-2020, 2net Ltd
  • 35. Support for Yocto Project • Industry-wide support • Chip vendors of ARM, MIPS, PowerPC and X86 architectures • Board and System On Module vendors • Commercial embedded Linux software vendors, such as ENEA, Mentor Graphics, Montavista, Timesys and more Debian or Yocto Project? 17 Copyright © 2011-2020, 2net Ltd
  • 36. Building a rootfs with Yocto Project Root filesystem bitbake xyz Uptream source zyx-1.0.tar.gz Metadata xyz.rpm do_rootfs Debian or Yocto Project? 18 Copyright © 2011-2020, 2net Ltd
  • 37. It’s all in the metadata Distro Machine Image Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
  • 38. It’s all in the metadata Distro Machine Image • Distro: how I want to put my system together Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
  • 39. It’s all in the metadata Distro Machine Image • Distro: how I want to put my system together • Machine: the board I want to build for Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
  • 40. It’s all in the metadata Distro Machine Image • Distro: how I want to put my system together • Machine: the board I want to build for • Image: the selection of packages I want Debian or Yocto Project? 19 Copyright © 2011-2020, 2net Ltd
  • 41. Downsides of Yocto Project • Steep learning curve Debian or Yocto Project? 20 Copyright © 2011-2020, 2net Ltd
  • 42. Downsides of Yocto Project • Steep learning curve • Community support window is only 12 months • After that, you are responsible for monitoring and updating key packages • ... or outsource to a third party Debian or Yocto Project? 20 Copyright © 2011-2020, 2net Ltd
  • 43. Downsides of Yocto Project • Steep learning curve • Community support window is only 12 months • After that, you are responsible for monitoring and updating key packages • ... or outsource to a third party • Building the rootfs from source requires powerful hardware Debian or Yocto Project? 20 Copyright © 2011-2020, 2net Ltd
  • 44. Debian is best for... • Proof Of Concept and prototypes Debian or Yocto Project? 21 Copyright © 2011-2020, 2net Ltd
  • 45. Debian is best for... • Proof Of Concept and prototypes • One-off projects Debian or Yocto Project? 21 Copyright © 2011-2020, 2net Ltd
  • 46. Debian is best for... • Proof Of Concept and prototypes • One-off projects • ... using commodity hardware such as Raspberry Pi Debian or Yocto Project? 21 Copyright © 2011-2020, 2net Ltd
  • 47. Yocto Project is best for ... • custom hardware (no distro available) Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd
  • 48. Yocto Project is best for ... • custom hardware (no distro available) • reduced attack surface Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd
  • 49. Yocto Project is best for ... • custom hardware (no distro available) • reduced attack surface • optimized for minimal memory and storage Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd
  • 50. Yocto Project is best for ... • custom hardware (no distro available) • reduced attack surface • optimized for minimal memory and storage • full report of packages and their licenses (needed license compliance) Debian or Yocto Project? 22 Copyright © 2011-2020, 2net Ltd