Book Image

Learning Embedded Linux Using the Yocto Project

By : Alexandru Vaduva, Vaduva Jan Alexandru
Book Image

Learning Embedded Linux Using the Yocto Project

By: Alexandru Vaduva, Vaduva Jan Alexandru

Overview of this book

Table of Contents (20 chapters)
Learning Embedded Linux Using the Yocto Project
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
8
Hob, Toaster, and Autobuilder
9
Wic and Other Tools
Index

Preface

With regard to the Linux environment today, most of the topics explained in this book are already available and are covered in a fair bit of detail, This book also covers a large variety of information and help in creating many viewpoints. Of course, there are some very good books written on various subjects also presented in this book, and here, you will find references to them. The scope of this book, however, is not to present this information all over again, but instead to make a parallel between the traditional methods of interaction with the embedded development process and the methods used by the Yocto Project.

This book also presents the various challenges that you might encounter in embedded Linux and suggests solutions for them. Although this book is intended for developers who are pretty confident of their basic Yocto and Linux skills and are trying to improve them, I am confident that that those of you who have no real experience in this area, could also find some useful information here.

This book has been built around various big subjects, which you will encounter in your embedded Linux journey. Besides this, technical information and a number of exercises are also given to you to ensure that as much information as possible is passed on to you. At the end of this book, you should have a clear picture of the Linux ecosystem.

What this book covers

Chapter 1, Introduction, tries to offer a picture of how an embedded Linux software and hardware architecture looks. It also presents you information on the benefits of Linux and Yocto along with examples. It explains the architecture of the Yocto Project and how it is integrated inside the Linux environment.

Chapter 2, Cross-compiling, offers you the definition of a toolchain, its components, and the way in which it can be obtained. After this, information on the Poky repository is given to you and a comparison is made with the components.

Chapter 3, Bootloaders, gives you information on a boot sequence, U-Boot bootloader, and how it can be built for a specific board. After this, it gives access to the U-Boot recipe from Poky and shows how it is used.

Chapter 4, Linux Kernel, explains the features of the Linux kernel and source code. It gives you information on how to build a kernel source and modules and then moves on to explain the recipes of the Yocto kernel and presents how the same things happen there after that the kernel is booted.

Chapter 5, The Linux Root Filesystem, gives you information on the organization of root file system directories and device drivers. It explains the various filesystems, BusyBox, and what a minimal filesystem should contain. It will show you how BusyBox is compiled inside and outside the Yocto Project and how a root filesystem is obtained using Poky.

Chapter 6, Components of the Yocto Project, offers an overview of the available components of the Yocto Project, most of which are outside Poky. It provides an introduction and a brief presentation of each component. After this chapter, a bunch of these components are explained in more detail.

Chapter 7, ADT Eclipse Plug-ins, shows how to set up the Yocto Project Eclipse IDE, setting it up for cross development and debugging using Qemu, and customizing an image and interacting with different tools.

Chapter 8, Hob, Toaster, and Autobuilder, goes through each one of these tools and explain how each one of them can be used, mentioning their benefits as well.

Chapter 9, Wic and Other Tools, explains how to use another set of tools, very different form the ones mentioned in the previous chapter.

Chapter 10, Real-time, shows the real-time layers of the Yocto Project, their purposes, and added value. Documented information on Preempt-RT, NoHz, userspace RTOS, benchmarking, and other real-time related features are also mentioned.

Chapter 11, Security, explains the Yocto Project's security-related layers, their purposes, and the ways in which they could add value to Poky. Here, you will also be given information about SELinux and other applications, such as bastille, buck-security, nmap and so on.

Chapter 12, Virtualization, explains the virtualization layers of the Yocto Project, their purposes and the ways in which they could add value to Poky. You will also be given information about virtualization-related packages and initiatives.

Chapter 13, CGL and LSB, gives you information on the Carrier Graded Linux (CGL) specifications and requirements as well as the specifications, requirements, and tests of Linux Standard Base (LSB). In the end, a parallel will be made with the support provided by the Yocto Project.

What you need for this book

Before reading this book, prior knowledge of embedded Linux and Yocto would be helpful, though not mandatory. In this book, a number of exercises are available, and to do them, a basic understanding of the GNU/Linux environment would be useful. Also, some of the exercises are for a specific development board and others involve using Qemu. Owning such a board and previous knowledge of Qemu is a plus, but is not mandatory.

Throughout the book, there are chapters with various exercises that require you to already have knowledge of C language, Python, and Shell Script. It would be useful if the reader has experience in these areas, because they are the core technologies used in most Linux projects available today. I hope this information does not discourage you while reading the content of this book content, and that you enjoy it.

Who this book is for

The book is targeted at Yocto and Linux enthusiasts who want to build embedded Linux systems and maybe contribute to the community. Background knowledge should include C programming skills, experience with Linux as a development platform, basic understanding of the software development process. If you've previously read Embedded Linux Development with Yocto Project, Packt Publishing, it would be a plus as well.

Taking a look at technology trends, Linux is the next big thing. It offers access to cutting-edge open source products and more embedded systems are introduced to mankind every day. The Yocto Project is the best choice for any project that involves interaction with embedded devices due to the fact that it provides a rich set of tools to help you to use most of your energy and resources in your product development, instead of reinventing.

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: "A maintainers file offers a list of contributors to a particular board support."

A block of code is set as follows:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo add-apt-repository "deb http://people.linaro.org/~neil.williams/lava jessie main"
sudo apt-get update
  
sudo apt-get install postgresql
sudo apt-get install lava
sudo a2dissite 000-default
sudo a2ensite lava-server.conf
sudo service apache2 restart

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

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
sudo add-apt-repository "deb http://people.linaro.org/~neil.williams/lava jessie main"
sudo apt-get update
  
sudo apt-get install postgresql
sudo apt-get install lava
sudo a2dissite 000-default
sudo a2ensite lava-server.conf
sudo service apache2 restart

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

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"

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: " If this warning message appears, press OK and move further "

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.

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.