Book Image

Embedded Linux Development Using Yocto Project Cookbook - Second Edition

By : Alex Gonzalez
Book Image

Embedded Linux Development Using Yocto Project Cookbook - Second Edition

By: Alex Gonzalez

Overview of this book

The Yocto Project has become the de facto distribution build framework for reliable and robust embedded systems with a reduced time to market.You'll get started by working on a build system where you set up Yocto, create a build directory, and learn how to debug it. Then, you'll explore everything about the BSP layer, from creating a custom layer to debugging device tree issues. In addition to this, you’ll learn how to add a new software layer, packages, data, scripts, and configuration files to your system. You will then cover topics based on application development, such as using the Software Development Kit and how to use the Yocto project in various development environments. Toward the end, you will learn how to debug, trace, and profile a running system. This second edition has been updated to include new content based on the latest Yocto release.
Table of Contents (13 chapters)
Title Page
Dedication
Packt Upsell
Foreword
Contributors
Preface
Index

Using LTTng


LTTng is a set of dual licensed GPLv2 and LGPL tracing and profiling tools for both applications and kernels. It produces binary trace files in the production optimized Compact Trace Format (CTF), which can then be analyzed by tools such as babeltrace.

Getting ready

To include the different LTTng tools in your system, add the following to your conf/local.conf file:

IMAGE_INSTALL_append = " lttng-tools lttng-modules lttng-ust" 

They are also part of the tools-profile image feature, so you can also add them with the following:

EXTRA_IMAGE_FEATURES += "tools-profile" 

These are also included in the -sdk images.

The default Wandboard Linux kernel is already configured to use LTTng, but other platforms might need to enable CONFIG_TRACEPOINTS.

The LTTng command-line tool is the main user interface to LTTng. It can be used to trace both the Linux kernel-using the kernel tracing interfaces we have seen in previous recipes—as well as instrumented user space applications.

How to do it...

A kernel...