Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Embedded Linux Development using Yocto Projects
Embedded Linux Development using Yocto Projects

Embedded Linux Development using Yocto Projects: Learn to leverage the power of Yocto Project to build efficient Linux-based products , Second Edition

Arrow left icon
Profile Icon Otavio Salvador Profile Icon Angolini
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.4 (5 Ratings)
Paperback Nov 2017 162 pages 2nd Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Otavio Salvador Profile Icon Angolini
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.4 (5 Ratings)
Paperback Nov 2017 162 pages 2nd Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Embedded Linux Development using Yocto Projects

Meeting the Yocto Project

In this chapter we will be introduced to the Yocto Project. The main concepts of the project, which are constantly used throughout the book, are discussed here. We will discuss the Yocto Project history, OpenEmbedded, Poky, BitBake, and metadata in brief, so fasten your seat belt and welcome aboard!

What is the Yocto Project?

The Yocto Project is a Linux Foundation workgroup defined as:

"The Yocto Project provides open source, high-quality infrastructure and tools to help developers create their own custom Linux distributions for any hardware architecture, across multiple market segments. The Yocto Project is intended to provide a helpful starting point for developers."

The Yocto Project is an open source collaboration project that provides templates, tools, and methods to help us create custom Linux-based systems for embedded products regardless of the hardware architecture. Being managed by a Linux Foundation fellow, the project remains independent of its member organizations that participate in various ways and provide resources to the project.

It was founded in 2010 as a collaboration of many hardware manufacturers, open source operating systems, vendors, and electronics companies in an effort to reduce their work duplication, provide resources and information catering to both new and experienced users.

Among these resources is OpenEmbedded-Core, the core system component, provided by the OpenEmbedded project.

The Yocto Project is, therefore, a community open source project that aggregates several companies, communities, projects, and tools, gathering people with the same purpose to build Linux-based embedded products; all these components are in the same boat, being driven by its community needs to work together.

Delineating the Yocto Project

To ease our understanding of the duties and outcomes provided by the Yocto Project, we can use the analogy of a computing machine. The input is a set of data that describes what we want, that is, our specification. As an output, we have the desired Linux-based embedded product.

If the output is a product running a Linux-based operating system, the result generated is the pieces that compose the operating system, such as the Linux kernel, bootloader, and the root filesystem (rootfs) bundle which are properly organized.

To produce the resultant rootfs bundle and other deliverables, the Yocto Project's tools are present in all intermediary steps. The reuse of previously built utilities and other software components are maximized while building other applications, libraries, and any other software components in the right order and with the desired configuration, including the fetching of the required source code from their respective repositories, such as The Linux Kernel Archives (www.kernel.org), GitHub, and www.SourceForge.net.

The Yocto Project's tools prepare its own build environment, utilities, and toolchain, reducing the amount of host software dependency. A subtle but important implication is that the determinism is considerably increased as the utilities and their versions as well as their configuration options are the same, thus minimizing the number of host utilities to rely on and producing the same result independent of the host Linux distribution being used.

We can list some projects, such as Poky, BitBake, and OpenEmbedded-Core, under the Yocto Project umbrella, all of them being complementary and playing specific roles in the system. We will understand exactly how they work together in this chapter and throughout the book.

Understanding Poky

Poky is the Yocto Project reference system and is composed of a collection of tools and metadata. It is platform-independent and performs cross-compiling, using the BitBake tool, OpenEmbedded Core, and a default set of metadata, as shown in the following figure. It provides the mechanism to build and combine thousands of distributed open source projects to form a fully customizable, complete, and coherent Linux software stack.

Poky's main objective is to provide all the features an embedded developer needs.

Using BitBake

BitBake is a task scheduler that parses Python and shell script mixed code. The code parsed generates and runs tasks, which are basically a set of steps ordered per the code's dependencies.

It evaluates all available configuration files and recipe data (known as metadata), managing dynamic variable expansion, dependencies, and code generation. It keeps track of all tasks being processed in order to ensure completion, maximizing the use of processing resources to reduce build time and being predictable. The development of BitBake is centralized in the bitbake-devel@lists.openembedded.org mailing list, and its code can be found in the bitbake subdirectory of Poky.

OpenEmbedded-Core

The OpenEmbedded-Core metadata collection provides the engine of the Poky build tool. It is designed to provide the core features and to be as lean as possible. It provides support for seven different processor architectures (ARM, ARM64, x86, x86-64, PowerPC, MIPS, and MIPS64), supporting only boards to be emulated by QEMU.

The development is centralized in the openembedded-core@lists.openembedded.org mailing list and houses its metadata inside the meta subdirectory of Poky.

Metadata

The metadata which is composed of a mix of Python and Shell Script text files, provides a tremendously flexible system. Poky uses this to extend OpenEmbedded-Core and includes two different layers, which are another metadata subsets shown as follows:

  • meta-poky: This layer provides the default and supported distributions, visual branding, and metadata tracking information (maintainers, upstream status, and so on)
  • meta-yocto-bsp: Provides the Board Support Package (BSP) used as the reference for the Yocto Project development and Quality Assurance (QA) process

Chapter 8, Developing with Yocto Projects, explores the metadata in more detail and serves as a reference when we write our own recipes.

The alliance of the OpenEmbedded Project and the Yocto Project

The OpenEmbedded project was created around January 2003 when some core developers from the OpenZaurus project started to work with the new build system. The OpenEmbedded build system has been, since its beginning, a task scheduler inspired and based on the Gentoo Portage package system named BitBake. The project has grown its software collection and supported machine set at a fast pace.

As consequence of uncoordinated development, it was difficult to use OpenEmbedded in products that demand a more stable and polished code base, which is why Poky was born. Poky started as a subset of OpenEmbedded and had a more polished and stable code base across a limited set of architectures. Its reduced size allowed Poky to start to develop highlighting technologies, such as IDE plugins and QEMU integration, which are still being used today.

Around November 2010, the Yocto Project was announced by the Linux Foundation to continue this work under a Linux Foundation-sponsored project. The Yocto Project and OpenEmbedded Project consolidated their efforts on a core build system called OpenEmbedded-Core, using the best of both Poky and OpenEmbedded, thus emphasizing an increased use of additional components, metadata, and subsets.

Summary

This first chapter provided an overview of how the OpenEmbedded Project is related to the Yocto Project, the components which form Poky, and how it was created. In the next chapter, we will be introduced to the Poky workflow with steps to download, configure, and prepare the Poky build environment, and how to have the very first image built and running using QEMU.

Left arrow icon Right arrow icon

Key benefits

  • Optimize your Yocto Project tools to develop efficient Linux-based projects
  • Practical approach to learning Linux development using Yocto Project
  • Demonstrates concepts in a practical and easy-to-understand way

Description

Yocto Project is turning out to be the best integration framework for creating reliable embedded Linux projects. It has the edge over other frameworks because of its features such as less development time and improved reliability and robustness. Embedded Linux Development using Yocto Project starts with an in-depth explanation of all Yocto Project tools, to help you perform different Linux-based tasks. The book then moves on to in-depth explanations of Poky and BitBake. It also includes some practical use cases for building a Linux subsystem project using Yocto Project tools available for embedded Linux. The book also covers topics such as SDK, recipetool, and others. By the end of the book, you will have learned how to generate and run an image for real hardware boards and will have gained hands-on experience at building efficient Linux systems using Yocto Project.

Who is this book for?

If you are an embedded Linux developer with a basic knowledge of Yocto Project and want to broaden your knowledge with examples of embedded development, then this book is for you. This book is also for professionals who want to find new insights into working methodologies for Linux development.

What you will learn

  • Understand the basic concepts involved in Poky workflows along with configuring and preparing the Poky build environment
  • Configure a build server and customize images using Toaster
  • Generate images and fit packages into created images using BitBake
  • Support the development process by setting up and using Package feeds
  • Debug Yocto Project by configuring Poky
  • Build an image for the BeagleBone Black, RaspberryPi 3, and Wandboard, and boot it from an SD card

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 16, 2017
Length: 162 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788470469
Vendor :
Linux Foundation
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Nov 16, 2017
Length: 162 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788470469
Vendor :
Linux Foundation
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 120.97
Embedded Linux Development using Yocto Projects
€41.99
Embedded Linux Development Using Yocto Project Cookbook
€36.99
Mastering Embedded Linux Programming
€41.99
Total 120.97 Stars icon

Table of Contents

14 Chapters
Meeting the Yocto Project Chevron down icon Chevron up icon
Baking Our Poky-Based System Chevron down icon Chevron up icon
Using Toaster to Bake an Image Chevron down icon Chevron up icon
Grasping the BitBake Tool Chevron down icon Chevron up icon
Detailing the Temporary Build Directory Chevron down icon Chevron up icon
Assimilating Packaging Support Chevron down icon Chevron up icon
Diving into BitBake Metadata Chevron down icon Chevron up icon
Developing with the Yocto Project Chevron down icon Chevron up icon
Debugging with the Yocto Project Chevron down icon Chevron up icon
Exploring External Layers Chevron down icon Chevron up icon
Creating Custom Layers Chevron down icon Chevron up icon
Customizing Existing Recipes Chevron down icon Chevron up icon
Achieving GPL Compliance Chevron down icon Chevron up icon
Booting Our Custom Embedded Linux Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.4
(5 Ratings)
5 star 40%
4 star 0%
3 star 40%
2 star 0%
1 star 20%
TheLam Nguyen May 20, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
good book
Amazon Verified review Amazon
Rogerio Pimentel da Silva Dec 07, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book makes clean the concept of Yocto that sometimes is difficult to understand reading the available documents on the internet. It has a comprehensive language with a theorical and practical content. I already used the first edition in my daily consults for my projects, now this second edition has updated information.
Amazon Verified review Amazon
Emil Dec 01, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
Very basic. Only recommend for novice that hasn't read the yoctoproject.org online docs.
Amazon Verified review Amazon
A. Reader Jun 08, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
This book starts out with a nice overview, but quickly becomes frustratingly superficial. Repeated are sections with maybe a single command given with minimal context and a link for more information, only later to be confusingly described as "going in to detail". There is still value to be gained by going cover-to-cover, plenty of "ah-ha" moments - breadth of the project will be gained, however I'm left with not much more.
Amazon Verified review Amazon
Placeholder May 16, 2018
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
book has MRP of 599, i dont know how the are giving 85%discount
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.