Instant Download Embedded Linux Development using Yocto Projects Second Edition Otavio Salvador PDF All Chapters
Instant Download Embedded Linux Development using Yocto Projects Second Edition Otavio Salvador PDF All Chapters
com
https://ebookname.com/product/embedded-linux-development-
using-yocto-projects-second-edition-otavio-salvador/
OR CLICK HERE
DOWLOAD NOW
https://ebookname.com/product/linux-device-drivers-development-
develop-customized-drivers-for-embedded-linux-1st-edition-john-madieu/
ebookname.com
https://ebookname.com/product/using-yocto-project-with-beaglebone-
black-1st-edition-sadiq/
ebookname.com
https://ebookname.com/product/linux-for-embedded-and-real-time-
applications-2nd-edition-doug-abbott/
ebookname.com
https://ebookname.com/product/the-mayan-languages-1st-edition-judith-
aissen/
ebookname.com
The Settlers and the Struggle over the Meaning of Zionism
Gadi Taub
https://ebookname.com/product/the-settlers-and-the-struggle-over-the-
meaning-of-zionism-gadi-taub/
ebookname.com
https://ebookname.com/product/microsoft-office-communications-
server-2007-r2-resource-kit-2-pap-cdr-edition-rui-maximo/
ebookname.com
https://ebookname.com/product/art-by-the-book-painting-manuals-and-
the-leisure-life-in-late-ming-china-1st-edition-j-p-park/
ebookname.com
https://ebookname.com/product/evidence-based-practice-of-critical-
care-expert-consult-online-and-print-1e-1st-edition-clifford-s-
deutschman-md/
ebookname.com
Embedded Linux Development
using Yocto Projects
Second Edition
Otavio Salvador
Daiane Angolini
BIRMINGHAM - MUMBAI
Embedded Linux Development using Yocto
Projects
Second Edition
Copyright © 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the authors, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN: 978-1-78847-046-9
www.packtpub.com
Credits
Production Coordinator
Nilesh Mohite
About the Authors
Otavio Salvador loves technology and started his free software activities in 1999. In 2002, he
founded O.S. Systems, a company focused on embedded system development services and
consultancy worldwide, creating and maintaining customized BSPs and helping companies
with their product development challenges. This resulted in him joining the
OpenEmbedded community in 2008, where he became an active contributor to the
OpenEmbedded project.
Daiane Angolini has been working with embedded Linux since 2008. She has been working
as an application engineer at NXP, acting on internal development, porting custom
applications from Android, and on-site customer support for i.MX architectures in areas
such as Linux kernel, u-boot, Android, Yocto Project, and user space applications. However,
it was on the Yocto Project that she found her place.
About the Reviewer
Radek Dostal is a fan of Linux and has been using it for the last 15 years. During his
exchange studies in the US, he acquired a passion for embedded systems, and combining
Linux with embedded systems has been his bread and butter ever since. Yocto has had a
great impact on Radek's work: he managed to convince his team and managers to switch to
Yocto for an important project, which built a solid foundation for several successful follow-
up projects. Radek likes to contribute to open source projects as part of his work, as well as
during his free time. However, if the weather is good during the weekend, you are most
likely to find him in the mountains.
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com. Did
you know that Packt offers eBook versions of every book published, with PDF and ePub
files available? You can upgrade to the eBook version at www.PacktPub.com and as a print
book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
service@packtpub.com for more details. At www.PacktPub.com, you can also read a
collection of free technical articles, sign up for a range of free newsletters and receive
exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt
books and video courses, as well as industry-leading tools to help you plan your personal
development and advance your career.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial
process. To help us improve, please leave us an honest review on this book's Amazon page
at https://www.amazon.com/dp/178847046X.
If you'd like to join our team of regular reviewers, you can email
us at customerreviews@packtpub.com. We award our regular reviewers with free
eBooks and videos in exchange for their valuable feedback. Help us be relentless in
improving our products!
Table of Contents
Preface 1
Chapter 1: Meeting the Yocto Project 6
What is the Yocto Project? 6
Delineating the Yocto Project 7
Understanding Poky 8
Using BitBake 8
OpenEmbedded-Core 9
Metadata 9
The alliance of the OpenEmbedded Project and the Yocto Project 9
Summary 10
Chapter 2: Baking Our Poky-Based System 11
Configuring a host system 11
Installing Poky on Debian 12
Installing Poky on Fedora 12
Downloading the Poky source code 13
Preparing the build environment 14
Knowing the local.conf file 14
Building a target image 15
Running images in QEMU 16
Summary 18
Chapter 3: Using Toaster to Bake an Image 19
What is Toaster? 19
Installing Toaster 20
Starting Toaster 20
Building an image to QEMU 21
Summary 27
Chapter 4: Grasping the BitBake Tool 28
Understanding the BitBake tool 28
Exploring metadata 29
Parsing metadata 30
Dependencies 31
Preferring and providing recipes 32
Fetching the source code 33
Table of Contents
[ ii ]
Table of Contents
File inclusion 66
Python variable expansion 67
Defining executable metadata 67
Defining Python functions in the global namespace 68
The inheritance system 68
Summary 69
Chapter 8: Developing with the Yocto Project 70
Deciphering the software development kit 70
Working with the Poky SDK 71
Using an image-based SDK 71
Generic SDK – meta-toolchain 73
Using an SDK 73
Developing applications on the target 74
Integrating with Eclipse 75
Summary 76
Chapter 9: Debugging with the Yocto Project 77
Differentiating metadata and application debugging 77
Tracking image, package, and SDK contents 78
Debugging packaging 79
Logging information during task execution 80
Utilizing a development shell 81
Using the GNU Project Debugger for debugging 83
Summary 84
Chapter 10: Exploring External Layers 85
Powering flexibility with layers 85
Detailing the layer's source code 88
Adding meta layers 90
The Yocto Project layer ecosystem 91
Summary 92
Chapter 11: Creating Custom Layers 93
Making a new layer 93
Adding metadata to the layer 95
Creating an image 96
Adding a package recipe 98
Automatically creating a base package recipe using recipetool 99
Adding support to a new machine definition 102
Wrapping an image for your machine 103
[ iii ]
Table of Contents
[ iv ]
Table of Contents
Summary 133
Index 134
[v]
Preface
In the current technology trend, Linux is the next big thing. Linux has consistently released
cutting-edge open source products, and Embedded Systems have been wrought in the
technological portfolio of mankind.
The Yocto Project is in an optimal position to be the choice for your projects, and it provides
a rich set of tools to help you use most of your energy and resources in your product
development, instead of reinventing the wheel.
The usual tasks and requirements of Embedded Linux-based products and development
teams were the guideline for this book’s conception. Being written by active community
members, with a practical and straightforward approach, it is a stepping stone for both your
learning curve and the product’s project.
Chapter 2, Baking Our Poky-Based System, introduces the environment needed for the first
build.
Chapter 3, Using Toaster to Bake an Image, shows the user-friendly web interface that can be
used as a wrapper for configuration and as a build tool.
Chapter 4, Grasping the BitBake Tool, presents the BitBake tool and how it manages the tasks
and its dependencies.
Chapter 5, Detailing the Temporary Build Directory, details the temporary output folder of a
build.
Chapter 6, Assimilating Packaging Support, explains the packaging mechanism used as base
to create and manage all the binary packages.
Chapter 7, Diving into BitBake Metadata, details the BitBake metadata language which will
be used for all the other chapters.
Chapter 8, Developing with the Yocto Project, demonstrates the workflow needed to obtain a
development environment.
Preface
Chapter 9, Debugging with the Yocto Project, shows how to use Poky to generate a debug
environment and how to use it.
Chapter 10, Exploring External Layers, explores one of the most important concepts of the
Yocto Project—the flexibility of using external layers.
Chapter 11, Creating Custom Layers, practices the steps on layers creation.
Chapter 12, Customizing Existing Recipes, presents examples on how to customize the
existing recipes.
Chapter 13, Achieving GPL Compliance, summarizes the tasks and concepts involved for a
copyleft compliance product.
Chapter 14, Booting Our Custom Embedded Linux, uses real hardware machines together
with the Yocto Project’s tools.
In order to understand the big picture of the Yocto Project before going to the technical
concepts detailed in this book, we recommend the open sourced booklet, Heading for the
Yocto Project, found under the Git repository at https://git.io/vFUiI; the content of this
booklet is intended to help newcomers to gain a better understanding of the goals of the
Yocto Project and its potential uses, and it intends to provide an overview of the project,
before diving into the technical details on how things can be done.
A basic understanding of the use of the GNU/Linux environment and Embedded Linux is
required as well as that of the general concepts used in development such as compilation,
debugging, deployment, and installation. Some experience with Shell Script and Python is a
bonus, because these programming languages are core technologies used extensively by the
Yocto Project’s tools.
You shouldn’t take any missing concepts—of those we enumerated above—as a deterrent,
but as something you can learn and at the same time, practice its use, with this book.
However, if you prefer to learn more about those topics, we recommend the book Mastering
Embedded Linux Programming, ISBN: 9781787283282, by Chris Simmonds.
Any concept enumerated above, should not discourage you from reading this book because
these can be learned concurrently.
[2]
Discovering Diverse Content Through
Random Scribd Documents
Act, and accomplish the requisite changes, consistently with the
public sense of fitness and propriety.
This Association, therefore, brings before the country an
efficacious means of obviating, for the future, the necessity or any
approach to the evils of the old system, in accordance with the
general feeling and opinion on the subject, and in strict and active
furtherance of the law as it now stands.
The considerations which the Association desire to lay before the
public arrange themselves under the following general heads:—
The well-known and acknowledged difficulty and danger of the old
process, and the dangerous exposure and risk to property, in
large masses, from the imperfect performance of former
methods.
The harsh, not to say hard and cruel, treatment of the infant
sweeper, from a necessity (in a certain degree, perhaps)
inseparable from the nature of the old process, and the effects
of prescriptive custom, as exercised by unenlightened masters.
The unerring and perfect performance of the Association’s new
Machinery, coupled with its simplicity of construction, its great
effective power, and its ease of management.
The great importance of its certain effect in the immediate extinction
of accidental fire in chimneys.
The great practical economy effected to the public through the
perfect operation of the Machines, and the consequent
incalculable increase of convenience in the domestic
arrangements,—as all the chimneys of a house can be perfectly
swept at one visit, in much less time than is now required; with a
guaranteed security, for the due performance of the specific duty
undertaken, and against injury or loss from carelessness,
mismanagement, or depredation.
The Association has also in view the very important objects of
affording complete relief to the entire class of sweeping adults
and children, by elevating them from their present degraded and
enslaved condition to the rank of well-ordered, decently-
appointed, and justly-paid workmen.
The date of each application for sweeping chimneys in a house, and
of the execution of the order, with the names of the workmen
employed, will be entered in the books of the Association, at
their principal office, 34, Foley-place: thus affording satisfactory
proof, in cases of fire, of the chimneys having been properly
swept, where the cause of fire may be the subject of legal
controversy; and preventing any disposition on the part of the
labourer to commit petty offences, from the absolute certainty of
immediate detection.
The PATENT RAMONEUR ASSOCIATION, to carry out these
great objects, have appointed respectable persons as Agents to
receive orders; and will employ workmen of known good character,
provided with suitable dresses to carry on the operation; giving them
thus a cleaner and more decent appearance, when not absolutely
employed at work, than is at present witnessed; and who, in lieu of
the scanty and precarious pittance hitherto allowed them, will receive
wages of sufficient amount to afford them the comforts and secure to
them the self-respect enjoyed by other mechanical labourers.
The Association beg to inform the Nobility, Gentry, and Public,
that, under these arrangements, on application being made at the
Central Office, a workman and assistant will attend with the Machine,
and, if necessary at the first trial, the Superintendent will himself be
present at the operation. The usual rate charged for each chimney,
under the old system of Machinery, will not be exceeded; and should
it be desired, houses may be contracted for by the year, on the same
terms as heretofore; no extra charge being made for machinery, or
for the greater convenience, cleanliness, and security of property,
afforded by the arrangements of the Association.
W. S. TROTTER, Secretary.
Superintendent, Mr. W. Speller, 30, Berkeley-street West, Edgware-
road.
⁂ In connexion with this establishment, the Association has
introduced a Patent Chimney-pot, which effectually cures the
downward draught, and supersedes the use of “cowls,” which cannot
escape fracture by the Machinery employed in sweeping the
chimneys.
TO THE CLERGY.
CITY EQUITABLE CLOTHING ESTABLISHMENT, FLEET-STREET
(Three Doors from Temple-bar).
G. EVANS respectfully yet fearlessly submits the following SCALE
of CONTRACTS to the careful perusal of gentlemen who have been
accustomed to pay exorbitant prices, and to assure them that the
articles will be of the best materials and workmanship, as he intends
to continue that honest and just principle of doing business which he
has hitherto pursued, and which he is happy to find has given such
general satisfaction. His long experience in cutting has qualified him
to give a good fit, and his matured judgment enables him to select
none but the best materials.
Naval and Military Uniforms strictly to regulation, with a careful
regard to economy. Liveries unusually low, considering the superior
articles invariably supplied. Ladies’ Riding Habits, not to be
surpassed in style, quality, or price. Young Gentlemen’s Clothing at
extremely moderate prices.
A List of Prices forwarded to gentlemen who do not wish to
contract.
TABLE OF CONTRACT.
The “Musical Times” contains original Articles on the Art, in all its
branches, with Criticisms of important Works bearing upon it;
together with notices of the chief Musical Performances in London
and the Provinces. It especially advocates Popular Musical
Education. The rapidly increasing circulation of this Paper, in all parts
of the Kingdom, renders it an important advertising medium. A
composition of one of the celebrated old or modern masters is
presented Monthly to Subscribers (in advance) of Six Months. These
Compositions will consist of Organ Pieces, Madrigals, Glees, Songs,
&c.
Guaranteed Circulation 5,000 Copies.
Scale of Charges for Advertisements:—
1 Praise.
2 Psalm CVII.
3 The Cuckoo.
4 The Village Chimes.
5 Independence.
6 The Traveller.
7 God is everywhere.
8 Temperance.
PART II.
9 Invitation to a Redbreast.
10 Call to Prayer.
11 Stanzas to my Child.
12 Infant’s Prayer.
13 Blowing Bubbles.
14 Super Flumina Babylonis.
15 Prayer.
16 Shepherd Boy.
PART III.
17 The Sea.
18 Contentment.
19 Fraternity.
20 Night Song.
21 Consolation.
22 Hymn.
23 The World we have not seen.
24 Psalm XV.
NEW WORKS
NOW PUBLISHING BY
H. G. CLARKE & CO. 66, OLD BAILEY, LONDON,
Agent for Ireland, S. J. Machen, 8, D’Olier-street, Dublin,
AND SOLD BY ALL BOOKSELLERS.
THE ENGLISH WIFE; A Manual of Home Duties, designed as a Sequel to the
English Maiden. 12mo. cloth, lettered. Price 4s. 6d. Silk, 6s. Morocco, 8s.
Contents.—Bridal Hopes and Joys. Family Arrangements. Domestic and
Social Duties. State of Mind necessary to the due Discharge of Domestic
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com