Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By : Alex Gonzalez
Book Image

Embedded Linux Projects Using Yocto Project Cookbook

By: Alex Gonzalez

Overview of this book

Table of Contents (13 chapters)
Embedded Linux Projects Using Yocto Project Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

The Linux kernel is at the heart of a large number of embedded products being designed today. Over the last 10 years, this operating system has developed from dominating the server market to being the most used operating system in embedded systems, even those with real-time requirements. On the way, Linux has evolved, and the embedded industry has realized it has some key and unique characteristics:

  • Linux is quick to adapt to new technologies and it's the place where innovation happens first

  • It is robust, and the development community is quick to react to problems

  • It is secure, and vulnerabilities are discovered and dealt with in a much quicker way than in competing proprietary products

  • It is open, which means your company is able to own, modify, and understand the technology

  • Finally, Linux is free

All of these make it a very compelling choice for embedded development.

But at the same time, an embedded Linux product is not only the Linux kernel. Companies need to build an embedded system over the operating system, and that's where embedded Linux was finding it difficult to make its place—until Yocto arrived.

The Yocto Project brings all the benefits of Linux into the development of embedded systems. It provides a standard build system that allows you to develop embedded products in a quick, reliable, and controlled way. Just as Linux has its strong points for embedded development, Yocto has its own too:

  • Yocto is secure, as it uses recent sources and provides the means to quickly apply security vulnerabilities to your products

  • It is robust, as it is used by a large community, which is quick to react to problems

  • It is open, so your company can own the technology, understand it, and make it fit for specific needs

  • It is free

With the Yocto Project's 6-month stable release process, package management updates, and flexibility, you will be able to focus on your embedded application, knowing that you are building it on top of a trusted system. You will speed up your development cycles and produce outstanding products.

But Yocto is a new technology, and developers need to adapt to it. This books aims to provide a practical guide for readers with basic knowledge of Linux and Yocto to develop a production-ready industrial system based on the ARM architecture.

What this book covers

Chapter 1, The Build System, describes the use of the Poky build system and extends it with the Freescale BSP community layer. It also describes common build system configurations and features used to optimize the building of target images.

Chapter 2, The BSP Layer, guides you through the customization of the BSP for your own product. It then explains how to configure, modify, build, and debug the U-Boot bootloader, the Linux kernel, and its device tree.

Chapter 3, The Software Layer, describes the process of creating a new software layer to hold new applications, services, or modifications to existing packages, as well as discussing a release process for license compliance.

Chapter 4, Application Development, starts with toolchains and the Application Development Toolkit (ADT), and deals with application development in detail, including development environments such as Eclipse and Qt creator.

Chapter 5, Debugging, Tracing, and Profiling, discusses debugging tools and techniques, and explores the tracing functionalities offered by the Linux kernel, along with some of the user-space-tracing and profiling tools that make use of them.

What you need for this book

This book assumes some basic working knowledge with GNU/Linux systems; applications such as the bash shell and derivatives; as well as standard tools such as grep, patch, diff, and so on. The examples have been tested with an Ubuntu 14.04 LTS system, but any Linux distribution supported by the Yocto Project can be used.

This is not meant to be an introductory book to the Yocto project, and reading an introductory book, such as Embedded Linux Development with Yocto Project by Otavio Salvador and Daiane Angolini, also from Packt Publishing, is recommended.

This book is structured to follow the usual development workflow of an embedded Linux product, but chapters or even single recipes can be read independently.

The recipes take a practical hands-on approach using a Freescale i.MX6-based system, the wandboard-quad, as base hardware. However, any other piece of i.MX-based hardware can be used to follow the examples.

Who this book is for

This book is the ideal way for embedded developers learning about embedded Linux and the Yocto Project to become proficient and broaden their knowledge with examples that are immediately applicable to embedded developments.

Experienced embedded Yocto developers will find new insights into working methodologies and ARM-specific development competence.

Sections

In this book, you will find several headings that appear frequently (Getting ready, How to do it, How it works, There's more, and See also).

To give clear instructions on how to complete a recipe, we use these sections:

Getting ready

This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.

How to do it…

This section contains the steps required to follow the recipe.

How it works…

This section usually consists of a detailed explanation of what happened in the previous section.

There's more…

This section consists of additional information about the recipe in order to make you more knowledgeable about the recipe.

See also

This section provides helpful links to other useful information for the recipe.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "You can add a list of packages to exclude from cleaning by adding them to the RM_WORK_EXCLUDE variable."

A block of code is set as follows:

SRC_URI = "file://helloworld.c"

S = "${WORKDIR}"

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

SRC_URI = "file://helloworld.c"
DEPENDS = "lttng-ust"

S = "${WORKDIR}"

Any command-line input or output is written as follows:

$ ls sources/meta-fsl*/conf/machine/*.conf

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Build the project by navigating to Project | Build Project."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

The example code in the book can be accessed through several GitHub repositories at https://github.com/yoctocookbook. Follow the instructions on GitHub to obtain a copy of the source in your computer.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.