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 with Yocto Project
Embedded Linux Development with Yocto Project

Embedded Linux Development with Yocto Project: Develop fascinating Linux-based projects using the groundbreaking Yocto Project tools

Arrow left icon
Profile Icon Otavio Salvador
Arrow right icon
Mex$179.99 Mex$442.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (20 Ratings)
eBook Jul 2014 142 pages 1st Edition
eBook
Mex$179.99 Mex$442.99
Paperback
Mex$553.99
Subscription
Free Trial
Arrow left icon
Profile Icon Otavio Salvador
Arrow right icon
Mex$179.99 Mex$442.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9 (20 Ratings)
eBook Jul 2014 142 pages 1st Edition
eBook
Mex$179.99 Mex$442.99
Paperback
Mex$553.99
Subscription
Free Trial
eBook
Mex$179.99 Mex$442.99
Paperback
Mex$553.99
Subscription
Free Trial

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 with Yocto Project

Chapter 2. 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 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 needed to set up 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. Currently, the supported distributions are the following:

  • Ubuntu 12.04 (LTS)
  • Ubuntu 13.10
  • Ubuntu 14.04 (LTS)
  • Fedora release 19 (Schrödinger's Cat)
  • Fedora release 20 (Heisenbug)
  • CentOS release 6.4
  • CentOS release 6.5
  • Debian GNU/Linux 7.x (Wheezy)
  • openSUSE 12.2
  • openSUSE 12.3
  • openSUSE 13.1

If our preferred distribution is not in 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 find instructions for Debian and Fedora...

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, using the following command:

$: git clone git://git.yoctoproject.org/poky --branch daisy

Tip

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:

Downloading the Poky source code

Note

The examples and code presented in this and the next chapters use the Yocto Project Version 1.6 and Poky Version 11.0. The code name is Daisy, as 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 build environment. The script must be run as shown:

$: source poky/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.

Note

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, choose 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 we probably want to change from the default is the following:

BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
MACHINE ??= "qemux86"

Tip

BB_NUMBER_THREADS and PARALLEL_MAKE should be set to twice the host processor's number of cores.

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...

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 running the following command from the poky directory:

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

All the recipes provide images which are, in essence, a set of unpacked and configured packages, generating a filesystem that we can use on an actual hardware.

Next, we can see a short description of available images, as follows:

  • build-appliance-image: This is a virtual machine image which can be run by either VMware Player or VMware Workstation that allows to run builds.
  • core-image-full-cmdline: This is a console-only image with full support for the target device hardware.
  • 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-minimal-dev: This image includes all contents of the core-image-minimal image and adds headers and libraries that we can use in...

Configuring a host system


The process needed to set up 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. Currently, the supported distributions are the following:

  • Ubuntu 12.04 (LTS)

  • Ubuntu 13.10

  • Ubuntu 14.04 (LTS)

  • Fedora release 19 (Schrödinger's Cat)

  • Fedora release 20 (Heisenbug)

  • CentOS release 6.4

  • CentOS release 6.5

  • Debian GNU/Linux 7.x (Wheezy)

  • openSUSE 12.2

  • openSUSE 12.3

  • openSUSE 13.1

If our preferred distribution is not in 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 find instructions for Debian and Fedora, our preferred...

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, using the following command:

$: git clone git://git.yoctoproject.org/poky --branch daisy

Tip

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 1.6 and Poky Version 11.0. The code name is Daisy, as reference.

Left arrow icon Right arrow icon

Description

A practical tutorial guide which introduces you to the basics of Yocto Project, and also helps you with its real hardware use to boost your Embedded Linux-based project. If you are an embedded systems enthusiast and willing to learn about compelling features offered by the Yocto Project, then this book is for you. With prior experience in the embedded Linux domain, you can make the most of this book to efficiently create custom Linux-based systems.

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 09, 2014
Length: 142 pages
Edition : 1st
Language : English
ISBN-13 : 9781783282340
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 : Jul 09, 2014
Length: 142 pages
Edition : 1st
Language : English
ISBN-13 : 9781783282340
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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 Mex$85 each
Feature tick icon Exclusive print discounts
$279.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 Mex$85 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total Mex$ 2,687.97
Learning Embedded Linux using the Yocto Project
Mex$1004.99
Embedded Linux Projects Using Yocto Project Cookbook
Mex$1128.99
Embedded Linux Development with Yocto Project
Mex$553.99
Total Mex$ 2,687.97 Stars icon
Banner background image

Table of Contents

16 Chapters
1. Meeting the Yocto Project Chevron down icon Chevron up icon
2. Baking Our Poky-based System Chevron down icon Chevron up icon
3. Using Hob to Bake an Image Chevron down icon Chevron up icon
4. Grasping the BitBake Tool Chevron down icon Chevron up icon
5. Detailing the Temporary Build Directory Chevron down icon Chevron up icon
6. Assimilating Packaging Support Chevron down icon Chevron up icon
7. Diving into BitBake Metadata Chevron down icon Chevron up icon
8. Developing with the Yocto Project Chevron down icon Chevron up icon
9. Debugging with the Yocto Project Chevron down icon Chevron up icon
10. Exploring External Layers Chevron down icon Chevron up icon
11. Creating Custom Layers Chevron down icon Chevron up icon
12. Customizing Existing Recipes Chevron down icon Chevron up icon
13. Achieving GPL Compliance Chevron down icon Chevron up icon
14. Booting Our Custom Embedded Linux Chevron down icon Chevron up icon
A. References Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.9
(20 Ratings)
5 star 40%
4 star 20%
3 star 35%
2 star 0%
1 star 5%
Filter icon Filter
Top Reviews

Filter reviews by




Rikard Söderström Aug 27, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
It is a nice book, mostly a subset of the manual. Personally I bought it mostly to endorse the authors, since I think they do a great job. I am going to use this book for a competence group I am having at work. The Yocto project itself fulfills the individual members expectations on the outcome of the course. So this book will be a nice asset for them.I recommend this book for educational purposes and as a quick reference during development.
Amazon Verified review Amazon
John Tilghman May 12, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good book, would buy again.
Amazon Verified review Amazon
ALAN E BROWN Oct 21, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Comprehensive and informative
Amazon Verified review Amazon
Igor Mar 03, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great Yocto boot camp manual. Gets you started and working in 15 minutes
Amazon Verified review Amazon
Rogerio Pimentel da Silva Aug 22, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very nice book! It's clear, easy to understand. It has everything to start working with Yocto.
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.