DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.1 YOCTO PROJECT LINUX AS A PLATFORM FOR EMBEDDED SYSTEM DESIGN OR, WHAT IS THE BEST OPEN SOURCE OS CHOICE FOR MY EMBEDDED SYSTEM? ALEX.GONZALEZ@DIGI.COM
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.2 WHY THIS PRESENTATION? • Digi manufactures System-On-Modules (SOMSs) and Single Board Computers (SBCs) • Provides free reference software (BSP and Yocto Project based distribution) • Why use a Yocto Project based distribution?
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC. Common embedded OS considerations: • Power consumption • User interface, possibly graphical • Quick start up time • Security • Networking • Some amount of RT determinism 3 WHAT IS AN EMBEDDED SYSTEM? Cost and time to market are directly proportional to the complexity
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC. Common embedded OS considerations: • Power consumption • User interface, possibly graphical • Quick start up time • Security • Networking • Some amount of RT determinism 4 REAL TIME CONSIDERATIONS Cost and time to market are directly proportional to the complexity
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.5 MICROCONTROLLER OR MICROPROCESSOR MCU CPU • Flat memory model • Extensive use of JTAG debuggers • Open source operating systems • FreeRTOS, mbed, Zephyr • Hard real time • Virtual memory (MMU) • Limited use of JTAG debuggers • Open source operating systems • Embedded Linux • Real time considerations • Soft RT (PREEMPT_RT) • Hard RT not really Linux • RTLinux, RTAI, Xenomai
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.6 EMBEDDED LINUX DEVELOPMENT CONSIDERATIONS
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.7 EMBEDDED LINUX DISTRIBUTION An embedded Linux distribution provides: • The bootloader • The Linux kernel • The root filesystem • A software development kit Sets system policies: • Selection of supported packages • Initialization system • Graphical backend and environment • System wide choices
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.8 EMBEDDED LINUX DEVELOPMENT • Bigger development teams • Different development roles • BSP developers • System developers • Application developers • SDK used as an interface
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.9 BSP DEVELOPMENT • Bootloader development • Similar to traditional embedded development • Bring-up • Intimate with hardware • Flat memory model • JTAG debuggers • Linux kernel development • Similar to PC kernel developers • JTAG of little use • BSP/drivers provided by OEM and community • Mostly device tree customization and driver debugging and development
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.10 APPLICATION DEVELOPMENT • Abstracted by Linux kernel • Similar to PC desktop application development • QT • Web applications • C and C++ • Also Python, Node.js and Java • The application is a collection of services that collaborate and communicate
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.11 SYSTEM DEVELOPMENT • System integration • Build system • Root filesystem generation • SDK generation • Toolchain • Sysroot
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.12 EMBEDDED LINUX DISTRIBUTIONS BINARY OR BUILD FROM SOURCE
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.13 EMBEDDED LINUX DISTRIBUTIONS • A customized existing binary Linux distribution • For example Debian • A distribution built from source • Do it yourself • For example using crosstool-ng and Cross LFS • Standard tools • Buildroot • Yocto Project
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.14 BINARY LINUX DISTRIBUTIONS • Pre-built packages installed and removed using a package manager • On-target compilation common • Package maintenance by the distribution provider • Limited package configuration • Generic, heavily patched packages • Not focused on embedded applications needs • Bigger systems • Slower to boot • Require more resources to run • More difficult to secure
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.15 BINARY LINUX DISTRIBUTIONS • Pre-defined policies and architectural choices • Customization needed for most embedded systems lead to manual non-standard builds • Difficult to reproduce • High maintenance cost • Package manager updates unsuited for embedded • Can´t guarantee deployed system is the same as tested system • Power loses while updating leave the system in inconsistent states
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.16 EMBEDDED LINUX DISTRIBUTIONS BINARY OR BUILD FROM SOURCE BINARY SOURCE • Lowest complexity and time to market for supported hardware • High maintainability • Bigger images • Slower to boot • More resources to run • More difficult to secure • Low reproducibility • Low portability and scalability • Longer development cycles • Full configuration possibilities • Maximum flexibility, no pre- determined choices • Easier maintenance as long as needed • Smaller images • Faster to boot • Lower resources to run • Easier to secure • High portability and scalability
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.17 EMBEDDED LINUX DISTRIBUTIONS BUILDROOT OR YOCTO PROJECT
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.18 BUILD FROM SOURCE LINUX DISTRIBUTIONS BUILDROOT • Easy to use • Ideal for small projects and teams • Uses kbuild as configuration tool • All configuration in one place • Good selection of well-maintained packages • External packages can be added • Three months release cadence • Yearly LTS release • More image generator than distribution builder • Does not generate binary packages • Does not support package managers • Only performs full system updates • Does not support on target compilation • Full system rebuilds often required • No concept of build cache
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.19 BUILD FROM SOURCE LINUX DISTRIBUTIONS YOCTO PROJECT • Distribution builder • Poky reference distribution • Openembedded build system • Bitbake scheduler • Build binary packages that are installed into root filesystem images • Package managers on target for development • Large number of packages structured in layers • Software re-use • Distributed maintenance • Six month release cadence • Current and previous releases are maintained • Configuration in several places • Distro, machine, image and local • Scales to multiple platforms and bigger teams • Steeper learning curve
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC. • No one-size-fits-all embedded operating system • For CPUs, embedded Linux covers most use cases • RT considerations apply • Build from source distributions better suited than binary distributions • Small projects and teams are a good fit for Buildroot • The Yocto Project scales better to bigger projects, teams and multiple platforms 20 SUMMARY
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC.21 EMBEDDED LINUX DEVELOPMENT USING YOCTO PROJECT COOKBOOK DISCOUNT CODES Discount codes valid until 26th March 2018. • Ebook 50% discount: ELDUYPC50 • Paperback copy 15% discount: ELDUYPC15 • Limited availability! Some free copies available at Digi´s booth • Hall 3 booth 518
DIGI.COM | PUBLIC | © DIGI INTERNATIONAL, INC. Questions? 22 Thanks for listening. Alex González, Software Supervisor, Digi International Alex.Gonzalez@digi.com

Yocto Project Linux as a platform for embedded system design

  • 1.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.1 YOCTO PROJECT LINUX AS A PLATFORM FOR EMBEDDED SYSTEM DESIGN OR, WHAT IS THE BEST OPEN SOURCE OS CHOICE FOR MY EMBEDDED SYSTEM? ALEX.GONZALEZ@DIGI.COM
  • 2.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.2 WHY THIS PRESENTATION? • Digi manufactures System-On-Modules (SOMSs) and Single Board Computers (SBCs) • Provides free reference software (BSP and Yocto Project based distribution) • Why use a Yocto Project based distribution?
  • 3.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC. Common embedded OS considerations: • Power consumption • User interface, possibly graphical • Quick start up time • Security • Networking • Some amount of RT determinism 3 WHAT IS AN EMBEDDED SYSTEM? Cost and time to market are directly proportional to the complexity
  • 4.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC. Common embedded OS considerations: • Power consumption • User interface, possibly graphical • Quick start up time • Security • Networking • Some amount of RT determinism 4 REAL TIME CONSIDERATIONS Cost and time to market are directly proportional to the complexity
  • 5.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.5 MICROCONTROLLER OR MICROPROCESSOR MCU CPU • Flat memory model • Extensive use of JTAG debuggers • Open source operating systems • FreeRTOS, mbed, Zephyr • Hard real time • Virtual memory (MMU) • Limited use of JTAG debuggers • Open source operating systems • Embedded Linux • Real time considerations • Soft RT (PREEMPT_RT) • Hard RT not really Linux • RTLinux, RTAI, Xenomai
  • 6.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.6 EMBEDDED LINUX DEVELOPMENT CONSIDERATIONS
  • 7.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.7 EMBEDDED LINUX DISTRIBUTION An embedded Linux distribution provides: • The bootloader • The Linux kernel • The root filesystem • A software development kit Sets system policies: • Selection of supported packages • Initialization system • Graphical backend and environment • System wide choices
  • 8.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.8 EMBEDDED LINUX DEVELOPMENT • Bigger development teams • Different development roles • BSP developers • System developers • Application developers • SDK used as an interface
  • 9.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.9 BSP DEVELOPMENT • Bootloader development • Similar to traditional embedded development • Bring-up • Intimate with hardware • Flat memory model • JTAG debuggers • Linux kernel development • Similar to PC kernel developers • JTAG of little use • BSP/drivers provided by OEM and community • Mostly device tree customization and driver debugging and development
  • 10.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.10 APPLICATION DEVELOPMENT • Abstracted by Linux kernel • Similar to PC desktop application development • QT • Web applications • C and C++ • Also Python, Node.js and Java • The application is a collection of services that collaborate and communicate
  • 11.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.11 SYSTEM DEVELOPMENT • System integration • Build system • Root filesystem generation • SDK generation • Toolchain • Sysroot
  • 12.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.12 EMBEDDED LINUX DISTRIBUTIONS BINARY OR BUILD FROM SOURCE
  • 13.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.13 EMBEDDED LINUX DISTRIBUTIONS • A customized existing binary Linux distribution • For example Debian • A distribution built from source • Do it yourself • For example using crosstool-ng and Cross LFS • Standard tools • Buildroot • Yocto Project
  • 14.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.14 BINARY LINUX DISTRIBUTIONS • Pre-built packages installed and removed using a package manager • On-target compilation common • Package maintenance by the distribution provider • Limited package configuration • Generic, heavily patched packages • Not focused on embedded applications needs • Bigger systems • Slower to boot • Require more resources to run • More difficult to secure
  • 15.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.15 BINARY LINUX DISTRIBUTIONS • Pre-defined policies and architectural choices • Customization needed for most embedded systems lead to manual non-standard builds • Difficult to reproduce • High maintenance cost • Package manager updates unsuited for embedded • Can´t guarantee deployed system is the same as tested system • Power loses while updating leave the system in inconsistent states
  • 16.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.16 EMBEDDED LINUX DISTRIBUTIONS BINARY OR BUILD FROM SOURCE BINARY SOURCE • Lowest complexity and time to market for supported hardware • High maintainability • Bigger images • Slower to boot • More resources to run • More difficult to secure • Low reproducibility • Low portability and scalability • Longer development cycles • Full configuration possibilities • Maximum flexibility, no pre- determined choices • Easier maintenance as long as needed • Smaller images • Faster to boot • Lower resources to run • Easier to secure • High portability and scalability
  • 17.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.17 EMBEDDED LINUX DISTRIBUTIONS BUILDROOT OR YOCTO PROJECT
  • 18.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.18 BUILD FROM SOURCE LINUX DISTRIBUTIONS BUILDROOT • Easy to use • Ideal for small projects and teams • Uses kbuild as configuration tool • All configuration in one place • Good selection of well-maintained packages • External packages can be added • Three months release cadence • Yearly LTS release • More image generator than distribution builder • Does not generate binary packages • Does not support package managers • Only performs full system updates • Does not support on target compilation • Full system rebuilds often required • No concept of build cache
  • 19.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.19 BUILD FROM SOURCE LINUX DISTRIBUTIONS YOCTO PROJECT • Distribution builder • Poky reference distribution • Openembedded build system • Bitbake scheduler • Build binary packages that are installed into root filesystem images • Package managers on target for development • Large number of packages structured in layers • Software re-use • Distributed maintenance • Six month release cadence • Current and previous releases are maintained • Configuration in several places • Distro, machine, image and local • Scales to multiple platforms and bigger teams • Steeper learning curve
  • 20.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC. • No one-size-fits-all embedded operating system • For CPUs, embedded Linux covers most use cases • RT considerations apply • Build from source distributions better suited than binary distributions • Small projects and teams are a good fit for Buildroot • The Yocto Project scales better to bigger projects, teams and multiple platforms 20 SUMMARY
  • 21.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC.21 EMBEDDED LINUX DEVELOPMENT USING YOCTO PROJECT COOKBOOK DISCOUNT CODES Discount codes valid until 26th March 2018. • Ebook 50% discount: ELDUYPC50 • Paperback copy 15% discount: ELDUYPC15 • Limited availability! Some free copies available at Digi´s booth • Hall 3 booth 518
  • 22.
    DIGI.COM | PUBLIC| © DIGI INTERNATIONAL, INC. Questions? 22 Thanks for listening. Alex González, Software Supervisor, Digi International Alex.Gonzalez@digi.com