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 SystemTap


SystemTap is a GPLv2 licensed system-wide tool that allows you to gather tracing and profiling data from a running Linux system. The user writes a systemtap script, which is then compiled into a Linux kernel module linked against the same kernel source it is going to run under.

The script sets events and handlers, which are called by the kernel module on the specified events triggering. For this, it uses the kprobes and uprobes (if available) interfaces in the kernel, as we saw in the Using dynamic kernel events recipe before.

Getting ready

To use SystemTap, we need to add it to our target image by adding it specifically, as follows:

IMAGE_INSTALL_append = " systemtap" 

Or we can also add it by using the tools-profile image feature, or an -sdk image.

We will also need an SSH server running on the target. This is already available on the -sdk image; otherwise we can add one to our image with the following:

EXTRA_IMAGE_FEATURES += "ssh-server-openssh" 

We will also need to compile...