Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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
€8.99 €32.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.4 (5 Ratings)
eBook Nov 2017 162 pages 2nd Edition
eBook
€8.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
€8.99 €32.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.4 (5 Ratings)
eBook Nov 2017 162 pages 2nd Edition
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Embedded Linux Development using Yocto Projects

Baking Our Poky-Based System

In this chapter we will understand the basic concepts involved in the Poky workflow. Let's get our hands dirty with the steps to download and configure, prepare the Poky build environment, and bake something usable. The steps covered here are commonly used for testing and development. They give us the whole experience of using Poky and a taste of its capabilities.

Configuring a host system

The process that we need to set up on our host system depends on the distribution we run on it. Poky has a set of supported Linux distributions, and if we are new to embedded Linux development, it is advisable to use one of the supported Linux distributions to avoid wasting time debugging build issues related to the host system support.

If you use the current release of one of following distributions, you should be good:

  • Ubuntu
  • Fedora
  • CentOS
  • Debian
  • openSUSE

To confirm if your version is supported, it is advisable to check the official documentation online at http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros.

If your preferred distribution is not on the preceding list, it doesn't mean it is not possible to use Poky on it. However, it is unknown whether it will work, and we may get unexpected results...

Downloading the Poky source code

After we install the needed packages into our development host system, we need to get the Poky source code that can be downloaded with Git by using the following command:

$ git clone git://git.yoctoproject.org/poky -b rocko
Learn more about Git at http://git-scm.com.

After the download process is complete, we should have the following contents inside the poky directory:

The examples and code presented in this and the next chapters use the Yocto Project Version 2.4. The code name is Rocko, as the reference.

Preparing the build environment

Inside the poky directory, there is a script named oe-init-build-env, which should be used to set up the building environment. The script must be run as shown:

$ source oe-init-build-env [build-directory]

Here, build-directory is an optional parameter for the name of the directory where the environment is set; in case it is not given, it defaults to build. The build-directory is the place where we perform the builds.

It is very convenient to use different build directories. We can work on distinct projects in parallel or different experimental setups without affecting our other builds.

Throughout the book, we will use build as the build directory. When we need to point to a file inside the build directory, we will adopt the same convention, for example, build/conf/local.conf.

Knowing the local.conf file

When we initialize a build environment, it creates a file called build/conf/local.conf, which is a powerful tool that can configure almost every aspect of the build process. We can set the machine we are building for, the toolchain host architecture to be used for a custom cross-toolchain, optimize options for maximum build time reduction, and so on. The comments inside the build/conf/local.conf file are a very good documentation and reference of possible variables, and their defaults. The minimal set of variables that we probably want to change from the default is the following:

MACHINE ??= "qemux86"

The MACHINE variable is where we determine the target machine we wish to build for. At the time of writing this book, Poky supports the following machines in its reference BSP:

  • beaglebone: This is BeagleBone, that is the reference platform for...

Building a target image

Poky provides several predesigned image recipes that we can use to build our own binary image. We can check the list of available images by running the following command from the poky directory:

$ ls meta*/recipes*/images/*.bb

All the recipes provide images which are a set of unpacked and configured packages, generating a filesystem that we can use on a hardware or one of the supported QEMU machines.

Next, we can see the list of most commonly used images:

  • core-image-minimal: This is a small image allowing a device to boot, and it is very useful for kernel and boot loader tests and development.
  • core-image-base: This is a console-only image that fully supports the target device hardware.
  • core-image-weston: This is an image that provides the Wayland protocol libraries and the reference Weston compositor.
  • core-image-x11: This is a very basic X11 image with...

Configuring a host system


The process that we need to set up on our host system depends on the distribution we run on it. Poky has a set of supported Linux distributions, and if we are new to embedded Linux development, it is advisable to use one of the supported Linux distributions to avoid wasting time debugging build issues related to the host system support.

If you use the current release of one of following distributions, you should be good:

  • Ubuntu
  • Fedora
  • CentOS
  • Debian
  • openSUSE

To confirm if your version is supported, it is advisable to check the official documentation online at http://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros.

If your preferred distribution is not on the preceding list, it doesn't mean it is not possible to use Poky on it. However, it is unknown whether it will work, and we may get unexpected results.

The packages that need to be installed into the host system vary from one distribution to another. Throughout this book, you will...

Downloading the Poky source code


After we install the needed packages into our development host system, we need to get the Poky source code that can be downloaded with Git by using the following command:

$ git clone git://git.yoctoproject.org/poky -b rocko

Note

Learn more about Git at http://git-scm.com.

After the download process is complete, we should have the following contents inside the poky directory:

Note

The examples and code presented in this and the next chapters use the Yocto Project Version 2.4. The code name is Rocko, as the reference.

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 : 9781788477833
Vendor :
Linux Foundation
Category :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 16, 2017
Length: 162 pages
Edition : 2nd
Language : English
ISBN-13 : 9781788477833
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
Mastering Embedded Linux Programming
€41.99
Embedded Linux Development Using Yocto Project Cookbook
€36.99
Embedded Linux Development using Yocto Projects
€41.99
Total 120.97 Stars icon
Banner background image

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

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.