SlideShare a Scribd company logo
© Integrated Computer Solutions, Inc. All Rights Reserved
An Introduction to the Yocto
Embedded Framework
Jeff Tranter <jtranter@ics.com>
Integrated Computer Solutions, Inc.
© Integrated Computer Solutions, Inc. All Rights Reserved
Agenda
• What is Yocto?
• Why is it Needed?
• What Yocto Provides
• Benefts/Advantages
• Limitations/Disadvantages
• Yocto Versions
• Other Framework Options
• Yocto Architecture
• Major Components
• Using Yocto - Basic Steps
• OpenEmbeddedBuild System
• Bitbake Metadata
• Example - Emulator
• Example - Beaglebone Black
• Building an SDK
• Packaging
• Toaster GUI
• Qt Yocto Support
• Doing More
• Tips For Getting Started
• References
• Summary
• Q&A
© Integrated Computer Solutions, Inc. All Rights Reserved
What is Yocto?
• Project to provide templates, tools and methods to create custom Linux-
based embedded systems
• Founded in 2010
• Open Source, managed by The Linux Foundation
• Vendor and platform neutral
• Collaborative effort among participants
• Members/participants/sponsors include Intel, AMD, Broadcom, TI,
Freescale, LG Electronics, Huawei, Mentor Graphics, Dell, The Qt Company
© Integrated Computer Solutions, Inc. All Rights Reserved
Why Is It Needed?
• Embedded development is signifcantly harder than native/desktop
development
• Cross-compilation
• Wide scope: boot loader, kernel, BSP/device drivers, packaging format,
utilities, applications, SDK
• Large, time consuming to build
• Desire for repeatability, automation
• Licensing issues
• Regular need for security and other updates
© Integrated Computer Solutions, Inc. All Rights Reserved
What Yocto Provides
• Framework for creating embedded Linux systems
• Targets supported: ARM, PPC, MIPS, x86, x86-64
• Hosted on common Linux x86 desktop platforms (CentOS, Fedora,
openSUSE, Ubuntu)
• OpenEmbedded build system with bitbake build engine
• IDE
• Optional graphical interface to build system
© Integrated Computer Solutions, Inc. All Rights Reserved
Benefits/Advantages
• Reduced development effort/time
• Improved quality
• Automation
• Stability
• Repeatability
© Integrated Computer Solutions, Inc. All Rights Reserved
Limitations/Disadvantages
• Embedded Linux targets only
• Development tools run on desktop Linux only (or in a Linux vm hosted on
e.g. Windows or MacOS)
• Doesn't dictate a specifc Linux distribution (but offers Poky as a reference
distribution)
• Large, complex, can have steep learning curve
© Integrated Computer Solutions, Inc. All Rights Reserved
Yocto Versions/Code Names
© Integrated Computer Solutions, Inc. All Rights Reserved
Other Embedded Frameworks
• Baserock
• Buildroot
• Crosstool/CrosstoolNG
• Embedded Debian/Fedora/Gentoo/SUSE/Ubuntu
© Integrated Computer Solutions, Inc. All Rights Reserved
Yocto Architecture
© Integrated Computer Solutions, Inc. All Rights Reserved
Major Components
• bitbake
• Poky Linux distribution
• Emulator
• Toaster GUI
• SDK
• Eclipse IDE plugin
• Build Appliance
© Integrated Computer Solutions, Inc. All Rights Reserved
Using Yocto - Basic Steps
1. Set up tools on a Linux host machine.
2. Confgure bitbake for embedded hardware.
3. Build software components, bootloader, root fs, image.
4. Write boot image and fle system.
5. Set up SDK.
6. Develop and iterate.
© Integrated Computer Solutions, Inc. All Rights Reserved
Bitbake Build System
Steps:
• fetch
• extract
• patch
• confgure
• build
• install
• package
© Integrated Computer Solutions, Inc. All Rights Reserved
Bitbake Metadata
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building For Emulator
$ sudo apt-get install gawk wget git-core diffstat unzip
texinfo gcc-multilib build-essential chrpath socat libsdl1.2-
dev xterm
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building For Emulator
$ mkdir yocto
$ cd yocto
$ wget http://downloads.yoctoproject.org/releases/yocto/yocto-
2.4/poky-rocko-18.0.1.tar.bz2
$ tar xvf poky-rocko-18.0.1.tar.bz2
$ cd poky-rocko-18.0.1
$ source oe-init-build-env
$ edit conf/local.conf
$ bitbake core-image-sato
$ runqemu qemuarm
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building For Emulator
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building For Emulator
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building For Emulator
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building For Emulator
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building for Beaglebone Black
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building for Beaglebone Black
Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 2048 146570 72261+ c W95 FAT32(LBA)
/dev/mmcblk0p2 146571 8535178 4194304 83 Linux
$ sudo mkfs.vfat -F 16 -n "boot" /dev/mmcblk0p1
$ sudo mke2fs -j -L "root" /dev/mmcblk0p2
© Integrated Computer Solutions, Inc. All Rights Reserved
Example - Building for Beaglebone Black
$ cp tmp/deploy/images/beaglebone/MLO-beaglebone /media/
$LOGNAME/boot/MLO
$ cp tmp/deploy/images/beaglebone/u-boot-beaglebone.img /media/
$LOGNAME/boot/u-boot.img
$ sudo tar x -C /media/$LOGNAME/root -f
tmp/deploy/images/beaglebone/core-image-sato-beaglebone.tar.bz2
© Integrated Computer Solutions, Inc. All Rights Reserved
Building an SDK
$ bitbake core-image-sato -c populate_sdk
Output is:
tmp/deploy/sdk/poky-glibc-x86_64-core-image-sato-armv5e-
toolchain-2.4.sh
© Integrated Computer Solutions, Inc. All Rights Reserved
Building an SDK
$ ~/yocto/poky-rocko-18.0.1/build/tmp/deploy/sdk/poky-glibc-x86_64-
core-image-sato-armv5e-toolchain-2.4.1.sh
Poky (Yocto Project Reference Distro) SDK installer version 2.4.1
===============================================================
Enter target directory for SDK (default: /opt/poky/2.4.1):
You are about to install the SDK to "/opt/poky/2.4.1". Proceed[Y/n]?
Extracting SDK............................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to
source the environment setup script e.g.
$ . /opt/poky/2.4.1/environment-setup-armv5e-poky-linux-gnueabi
© Integrated Computer Solutions, Inc. All Rights Reserved
Building an SDK
$ . /opt/poky/2.4.1/environment-setup-armv5e-poky-linux-gnueabi
$ echo $CXX
arm-poky-linux-gnueabi-g++ -march=armv5e -marm –
sysroot=/opt/poky/2.4.1/sysroots/armv5e-poky-linux-gnueabi
$ $CXX helloworld.cpp
$ file a.out
a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux
3.2.0
© Integrated Computer Solutions, Inc. All Rights Reserved
Packaging
• Not required, but often useful even for embedded systems.
• Yocto doesn't impose a packaging format.
• Common package formats include:
• rpm
• deb/dpkg
• ipkg
• opkg
© Integrated Computer Solutions, Inc. All Rights Reserved
Toaster GUI
© Integrated Computer Solutions, Inc. All Rights Reserved
Yocto Qt Support
Yocto Qt 5 recipes:
• https://github.com/meta-qt5/meta-qt5
Qt for Device Creation (boot2qt):
• http://code.qt.io/cgit/yocto/meta-boot2qt.git/
• http://code.qt.io/cgit/yocto/meta-qt5.git/
© Integrated Computer Solutions, Inc. All Rights Reserved
Example – Building boot2qt for Raspberry Pi
$ git clone git://code.qt.io/yocto/meta-boot2qt.git
$ cd meta-boot2qt
$ ./b2qt-init-build-env init --device raspberrypi3
$ export MACHINE=raspberrypi3
$ . setup-environment.sh
$ bitbake b2qt-embedded-qt5-image
Creates: tmp/deploy/images/raspberrypi3/b2qt-embedded-qt5-image-
raspberrypi3.img
$ bitbake meta-toolchain-b2qt-embedded-qt5-sdk
Creates: tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-embedded-qt5-sdk-
raspberrypi3.sh
See http://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html
© Integrated Computer Solutions, Inc. All Rights Reserved
More About Bitbake
• Python based language for confguration fles.
• Supports variables, include fles, functions, inheritance.
• Uses scripts called "recipes".
• Many command line options.
• Confguration fles in build/conf
• Understands dependencies.
• Multithreaded, runs a server process in the background.
© Integrated Computer Solutions, Inc. All Rights Reserved
Doing More - Writing Recipes
• Needed to build your own components with bitbake
• Shell or Python scripts (.bb fles)
• Standardized format
© Integrated Computer Solutions, Inc. All Rights Reserved
Doing More - Kernel Recipes
• Recipes to confgure, patch, and build the Linux kernel
• More complex
© Integrated Computer Solutions, Inc. All Rights Reserved
Doing More - BSPs
• BSP = Board Support Package.
• Adaptations for specifc hardware.
• Hardware vendor, OS vendor, or third party may provide this.
© Integrated Computer Solutions, Inc. All Rights Reserved
Doing More - Eclipse Integration
© Integrated Computer Solutions, Inc. All Rights Reserved
Doing More - Licensing and Compliance
© Integrated Computer Solutions, Inc. All Rights Reserved
Tips For Getting Started
© Integrated Computer Solutions, Inc. All Rights Reserved
References
1. Embedded Linux Systems with the Yocto Project, Rudolf Streif
2. https://www.yoctoproject.org/
3. https://github.com/meta-qt5/meta-qt5
4. http://code.qt.io/cgit/yocto/meta-boot2qt.git/
5. http://code.qt.io/cgit/yocto/meta-qt5.git/
6. http://www.ics.com/blog/yocto-quick-start
© Integrated Computer Solutions, Inc. All Rights Reserved
Summary
© Integrated Computer Solutions, Inc. All Rights Reserved
Questions?
© Integrated Computer Solutions, Inc. All Rights Reserved
An Introduction to the Yocto
Embedded Framework
Jeff Tranter <jtranter@ics.com>
Integrated Computer Solutions, Inc.

More Related Content

PPTX
Introduction Linux Device Drivers
PDF
Embedded Linux Kernel - Build your custom kernel
PDF
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
PDF
Arm device tree and linux device drivers
PDF
Linux kernel modules
PDF
Uboot startup sequence
Introduction Linux Device Drivers
Embedded Linux Kernel - Build your custom kernel
Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard
Arm device tree and linux device drivers
Linux kernel modules
Uboot startup sequence

What's hot (20)

PDF
Part 02 Linux Kernel Module Programming
PPT
Basic Linux Internals
PPTX
Linux Kernel Booting Process (1) - For NLKB
PDF
PDF
I2c drivers
PDF
Introduction To Linux Kernel Modules
PDF
Building Embedded Linux Full Tutorial for ARM
PPT
U boot porting guide for SoC
PDF
Jagan Teki - U-boot from scratch
PDF
Making Linux do Hard Real-time
PDF
Embedded linux network device driver development
PDF
Linux Internals - Interview essentials - 1.0
PDF
Board Bringup
PPT
Pcie drivers basics
PPTX
Bootloaders (U-Boot)
PDF
Linux-Internals-and-Networking
Part 02 Linux Kernel Module Programming
Basic Linux Internals
Linux Kernel Booting Process (1) - For NLKB
I2c drivers
Introduction To Linux Kernel Modules
Building Embedded Linux Full Tutorial for ARM
U boot porting guide for SoC
Jagan Teki - U-boot from scratch
Making Linux do Hard Real-time
Embedded linux network device driver development
Linux Internals - Interview essentials - 1.0
Board Bringup
Pcie drivers basics
Bootloaders (U-Boot)
Linux-Internals-and-Networking
Ad

Similar to An Introduction to the Yocto Embedded Framework 2018 (20)

PDF
[Webinar] An Introduction to the Yocto Embedded Framework
 
PPTX
Yocto Project introduction
PDF
Build your own embedded linux distributions by yocto project
PDF
Yocto - Embedded Linux Distribution Maker
PDF
The Yocto Project
PDF
Why the yocto project for my io t project elc_edinburgh_2018
PDF
yocto_scale_handout-with-notes
PDF
Yocto Project : Custom Embedded Linux Distribution
PDF
Why you should use the Yocto Project
PDF
iot_9Yocto Project getting started,,.pdf
PDF
Stefano Cordibella - An introduction to Yocto Project
PDF
Building Emmbedded Linux with Yocto project
PDF
Embedded linux build systems
PDF
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
PDF
Embedded Linux Build Systems - Texas Linux Fest 2018
PDF
Run Qt on Linux embedded systems using Yocto
PDF
Yocto Project Linux as a platform for embedded system design
PPTX
Building Embedded Linux UDOONEO
PDF
Yocto-Buildroot Presentation for Embedded
PDF
Autobuilder2 Yocto Project Summit Lyon 2019
[Webinar] An Introduction to the Yocto Embedded Framework
 
Yocto Project introduction
Build your own embedded linux distributions by yocto project
Yocto - Embedded Linux Distribution Maker
The Yocto Project
Why the yocto project for my io t project elc_edinburgh_2018
yocto_scale_handout-with-notes
Yocto Project : Custom Embedded Linux Distribution
Why you should use the Yocto Project
iot_9Yocto Project getting started,,.pdf
Stefano Cordibella - An introduction to Yocto Project
Building Emmbedded Linux with Yocto project
Embedded linux build systems
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Embedded Linux Build Systems - Texas Linux Fest 2018
Run Qt on Linux embedded systems using Yocto
Yocto Project Linux as a platform for embedded system design
Building Embedded Linux UDOONEO
Yocto-Buildroot Presentation for Embedded
Autobuilder2 Yocto Project Summit Lyon 2019
Ad

More from ICS (20)

PDF
Understanding the EU Cyber Resilience Act
 
PDF
Porting Qt 5 QML Modules to Qt 6 Webinar
 
PDF
Medical Device Cybersecurity Threat & Risk Scoring
 
PDF
Exploring Wayland: A Modern Display Server for the Future
 
PDF
Threat Modeling & Risk Assessment Webinar: A Step-by-Step Example
 
PDF
8 Mandatory Security Control Categories for Successful Submissions
 
PDF
Future-Proofing Embedded Device Capabilities with the Qt 6 Plugin Mechanism.pdf
 
PDF
Choosing an Embedded GUI: Comparative Analysis of UI Frameworks
 
PDF
Medical Device Cyber Testing to Meet FDA Requirements
 
PDF
Threat Modeling and Risk Assessment Webinar.pdf
 
PDF
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
 
PDF
Webinar On-Demand: Using Flutter for Embedded
 
PDF
A Deep Dive into Secure Product Development Frameworks.pdf
 
PDF
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
PDF
Practical Advice for FDA’s 510(k) Requirements.pdf
 
PDF
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
 
PDF
Overcoming CMake Configuration Issues Webinar
 
PDF
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
 
PDF
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
 
PDF
Quality and Test in Medical Device Design - Part 1.pdf
 
Understanding the EU Cyber Resilience Act
 
Porting Qt 5 QML Modules to Qt 6 Webinar
 
Medical Device Cybersecurity Threat & Risk Scoring
 
Exploring Wayland: A Modern Display Server for the Future
 
Threat Modeling & Risk Assessment Webinar: A Step-by-Step Example
 
8 Mandatory Security Control Categories for Successful Submissions
 
Future-Proofing Embedded Device Capabilities with the Qt 6 Plugin Mechanism.pdf
 
Choosing an Embedded GUI: Comparative Analysis of UI Frameworks
 
Medical Device Cyber Testing to Meet FDA Requirements
 
Threat Modeling and Risk Assessment Webinar.pdf
 
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
 
Webinar On-Demand: Using Flutter for Embedded
 
A Deep Dive into Secure Product Development Frameworks.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Practical Advice for FDA’s 510(k) Requirements.pdf
 
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
 
Overcoming CMake Configuration Issues Webinar
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
 
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
 
Quality and Test in Medical Device Design - Part 1.pdf
 

Recently uploaded (20)

PPTX
L1 - Introduction to python Backend.pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Designing Intelligence for the Shop Floor.pdf
PDF
System and Network Administration Chapter 2
PPTX
Transform Your Business with a Software ERP System
PDF
Understanding Forklifts - TECH EHS Solution
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Nekopoi APK 2025 free lastest update
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
medical staffing services at VALiNTRY
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
L1 - Introduction to python Backend.pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
wealthsignaloriginal-com-DS-text-... (1).pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Which alternative to Crystal Reports is best for small or large businesses.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Designing Intelligence for the Shop Floor.pdf
System and Network Administration Chapter 2
Transform Your Business with a Software ERP System
Understanding Forklifts - TECH EHS Solution
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Nekopoi APK 2025 free lastest update
Odoo Companies in India – Driving Business Transformation.pdf
medical staffing services at VALiNTRY
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Digital Systems & Binary Numbers (comprehensive )
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx

An Introduction to the Yocto Embedded Framework 2018

  • 1. © Integrated Computer Solutions, Inc. All Rights Reserved An Introduction to the Yocto Embedded Framework Jeff Tranter <[email protected]> Integrated Computer Solutions, Inc.
  • 2. © Integrated Computer Solutions, Inc. All Rights Reserved Agenda • What is Yocto? • Why is it Needed? • What Yocto Provides • Benefts/Advantages • Limitations/Disadvantages • Yocto Versions • Other Framework Options • Yocto Architecture • Major Components • Using Yocto - Basic Steps • OpenEmbeddedBuild System • Bitbake Metadata • Example - Emulator • Example - Beaglebone Black • Building an SDK • Packaging • Toaster GUI • Qt Yocto Support • Doing More • Tips For Getting Started • References • Summary • Q&A
  • 3. © Integrated Computer Solutions, Inc. All Rights Reserved What is Yocto? • Project to provide templates, tools and methods to create custom Linux- based embedded systems • Founded in 2010 • Open Source, managed by The Linux Foundation • Vendor and platform neutral • Collaborative effort among participants • Members/participants/sponsors include Intel, AMD, Broadcom, TI, Freescale, LG Electronics, Huawei, Mentor Graphics, Dell, The Qt Company
  • 4. © Integrated Computer Solutions, Inc. All Rights Reserved Why Is It Needed? • Embedded development is signifcantly harder than native/desktop development • Cross-compilation • Wide scope: boot loader, kernel, BSP/device drivers, packaging format, utilities, applications, SDK • Large, time consuming to build • Desire for repeatability, automation • Licensing issues • Regular need for security and other updates
  • 5. © Integrated Computer Solutions, Inc. All Rights Reserved What Yocto Provides • Framework for creating embedded Linux systems • Targets supported: ARM, PPC, MIPS, x86, x86-64 • Hosted on common Linux x86 desktop platforms (CentOS, Fedora, openSUSE, Ubuntu) • OpenEmbedded build system with bitbake build engine • IDE • Optional graphical interface to build system
  • 6. © Integrated Computer Solutions, Inc. All Rights Reserved Benefits/Advantages • Reduced development effort/time • Improved quality • Automation • Stability • Repeatability
  • 7. © Integrated Computer Solutions, Inc. All Rights Reserved Limitations/Disadvantages • Embedded Linux targets only • Development tools run on desktop Linux only (or in a Linux vm hosted on e.g. Windows or MacOS) • Doesn't dictate a specifc Linux distribution (but offers Poky as a reference distribution) • Large, complex, can have steep learning curve
  • 8. © Integrated Computer Solutions, Inc. All Rights Reserved Yocto Versions/Code Names
  • 9. © Integrated Computer Solutions, Inc. All Rights Reserved Other Embedded Frameworks • Baserock • Buildroot • Crosstool/CrosstoolNG • Embedded Debian/Fedora/Gentoo/SUSE/Ubuntu
  • 10. © Integrated Computer Solutions, Inc. All Rights Reserved Yocto Architecture
  • 11. © Integrated Computer Solutions, Inc. All Rights Reserved Major Components • bitbake • Poky Linux distribution • Emulator • Toaster GUI • SDK • Eclipse IDE plugin • Build Appliance
  • 12. © Integrated Computer Solutions, Inc. All Rights Reserved Using Yocto - Basic Steps 1. Set up tools on a Linux host machine. 2. Confgure bitbake for embedded hardware. 3. Build software components, bootloader, root fs, image. 4. Write boot image and fle system. 5. Set up SDK. 6. Develop and iterate.
  • 13. © Integrated Computer Solutions, Inc. All Rights Reserved Bitbake Build System Steps: • fetch • extract • patch • confgure • build • install • package
  • 14. © Integrated Computer Solutions, Inc. All Rights Reserved Bitbake Metadata
  • 15. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building For Emulator $ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2- dev xterm
  • 16. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building For Emulator $ mkdir yocto $ cd yocto $ wget http://downloads.yoctoproject.org/releases/yocto/yocto- 2.4/poky-rocko-18.0.1.tar.bz2 $ tar xvf poky-rocko-18.0.1.tar.bz2 $ cd poky-rocko-18.0.1 $ source oe-init-build-env $ edit conf/local.conf $ bitbake core-image-sato $ runqemu qemuarm
  • 17. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building For Emulator
  • 18. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building For Emulator
  • 19. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building For Emulator
  • 20. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building For Emulator
  • 21. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building for Beaglebone Black
  • 22. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building for Beaglebone Black Device Boot Start End Blocks Id System /dev/mmcblk0p1 * 2048 146570 72261+ c W95 FAT32(LBA) /dev/mmcblk0p2 146571 8535178 4194304 83 Linux $ sudo mkfs.vfat -F 16 -n "boot" /dev/mmcblk0p1 $ sudo mke2fs -j -L "root" /dev/mmcblk0p2
  • 23. © Integrated Computer Solutions, Inc. All Rights Reserved Example - Building for Beaglebone Black $ cp tmp/deploy/images/beaglebone/MLO-beaglebone /media/ $LOGNAME/boot/MLO $ cp tmp/deploy/images/beaglebone/u-boot-beaglebone.img /media/ $LOGNAME/boot/u-boot.img $ sudo tar x -C /media/$LOGNAME/root -f tmp/deploy/images/beaglebone/core-image-sato-beaglebone.tar.bz2
  • 24. © Integrated Computer Solutions, Inc. All Rights Reserved Building an SDK $ bitbake core-image-sato -c populate_sdk Output is: tmp/deploy/sdk/poky-glibc-x86_64-core-image-sato-armv5e- toolchain-2.4.sh
  • 25. © Integrated Computer Solutions, Inc. All Rights Reserved Building an SDK $ ~/yocto/poky-rocko-18.0.1/build/tmp/deploy/sdk/poky-glibc-x86_64- core-image-sato-armv5e-toolchain-2.4.1.sh Poky (Yocto Project Reference Distro) SDK installer version 2.4.1 =============================================================== Enter target directory for SDK (default: /opt/poky/2.4.1): You are about to install the SDK to "/opt/poky/2.4.1". Proceed[Y/n]? Extracting SDK............................................done Setting it up...done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /opt/poky/2.4.1/environment-setup-armv5e-poky-linux-gnueabi
  • 26. © Integrated Computer Solutions, Inc. All Rights Reserved Building an SDK $ . /opt/poky/2.4.1/environment-setup-armv5e-poky-linux-gnueabi $ echo $CXX arm-poky-linux-gnueabi-g++ -march=armv5e -marm – sysroot=/opt/poky/2.4.1/sysroots/armv5e-poky-linux-gnueabi $ $CXX helloworld.cpp $ file a.out a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0
  • 27. © Integrated Computer Solutions, Inc. All Rights Reserved Packaging • Not required, but often useful even for embedded systems. • Yocto doesn't impose a packaging format. • Common package formats include: • rpm • deb/dpkg • ipkg • opkg
  • 28. © Integrated Computer Solutions, Inc. All Rights Reserved Toaster GUI
  • 29. © Integrated Computer Solutions, Inc. All Rights Reserved Yocto Qt Support Yocto Qt 5 recipes: • https://github.com/meta-qt5/meta-qt5 Qt for Device Creation (boot2qt): • http://code.qt.io/cgit/yocto/meta-boot2qt.git/ • http://code.qt.io/cgit/yocto/meta-qt5.git/
  • 30. © Integrated Computer Solutions, Inc. All Rights Reserved Example – Building boot2qt for Raspberry Pi $ git clone git://code.qt.io/yocto/meta-boot2qt.git $ cd meta-boot2qt $ ./b2qt-init-build-env init --device raspberrypi3 $ export MACHINE=raspberrypi3 $ . setup-environment.sh $ bitbake b2qt-embedded-qt5-image Creates: tmp/deploy/images/raspberrypi3/b2qt-embedded-qt5-image- raspberrypi3.img $ bitbake meta-toolchain-b2qt-embedded-qt5-sdk Creates: tmp/deploy/sdk/b2qt-x86_64-meta-toolchain-b2qt-embedded-qt5-sdk- raspberrypi3.sh See http://doc.qt.io/QtForDeviceCreation/qtee-custom-embedded-linux-image.html
  • 31. © Integrated Computer Solutions, Inc. All Rights Reserved More About Bitbake • Python based language for confguration fles. • Supports variables, include fles, functions, inheritance. • Uses scripts called "recipes". • Many command line options. • Confguration fles in build/conf • Understands dependencies. • Multithreaded, runs a server process in the background.
  • 32. © Integrated Computer Solutions, Inc. All Rights Reserved Doing More - Writing Recipes • Needed to build your own components with bitbake • Shell or Python scripts (.bb fles) • Standardized format
  • 33. © Integrated Computer Solutions, Inc. All Rights Reserved Doing More - Kernel Recipes • Recipes to confgure, patch, and build the Linux kernel • More complex
  • 34. © Integrated Computer Solutions, Inc. All Rights Reserved Doing More - BSPs • BSP = Board Support Package. • Adaptations for specifc hardware. • Hardware vendor, OS vendor, or third party may provide this.
  • 35. © Integrated Computer Solutions, Inc. All Rights Reserved Doing More - Eclipse Integration
  • 36. © Integrated Computer Solutions, Inc. All Rights Reserved Doing More - Licensing and Compliance
  • 37. © Integrated Computer Solutions, Inc. All Rights Reserved Tips For Getting Started
  • 38. © Integrated Computer Solutions, Inc. All Rights Reserved References 1. Embedded Linux Systems with the Yocto Project, Rudolf Streif 2. https://www.yoctoproject.org/ 3. https://github.com/meta-qt5/meta-qt5 4. http://code.qt.io/cgit/yocto/meta-boot2qt.git/ 5. http://code.qt.io/cgit/yocto/meta-qt5.git/ 6. http://www.ics.com/blog/yocto-quick-start
  • 39. © Integrated Computer Solutions, Inc. All Rights Reserved Summary
  • 40. © Integrated Computer Solutions, Inc. All Rights Reserved Questions?
  • 41. © Integrated Computer Solutions, Inc. All Rights Reserved An Introduction to the Yocto Embedded Framework Jeff Tranter <[email protected]> Integrated Computer Solutions, Inc.