Embedded Linux Development Using Yocto Project Cookbook - Second Edition
eBook - ePub

Embedded Linux Development Using Yocto Project Cookbook - Second Edition

Alex Gonzalez, Javier Viguera

Condividi libro
  1. 456 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Embedded Linux Development Using Yocto Project Cookbook - Second Edition

Alex Gonzalez, Javier Viguera

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Over 79 hands-on recipes for professional embedded Linux developers to optimize and boost their Yocto Project know-howAbout This Book• Optimize your Yocto setup to speed up development and debug build issues• Use what is quickly becoming the standard embedded Linux product builder framework—the Yocto Project• Recipe-based implementation of best practices to optimize your Linux systemWho This Book Is ForIf you are an embedded Linux developer with the basic knowledge of Yocto Project, this book is an ideal way to broaden your knowledge with recipes for embedded development.What You Will Learn• Optimize your Yocto Project setup to speed up development and debug build issues• Use Docker containers to build Yocto Project-based systems• Take advantage of the user-friendly Toaster web interface to the Yocto Project build system• Build and debug the Linux kernel and its device trees• Customize your root filesystem with already-supported and new Yocto packages• Optimize your production systems by reducing the size of both the Linux kernel and root filesystems• Explore the mechanisms to increase the root filesystem security• Understand the open source licensing requirements and how to comply with them when cohabiting with proprietary programs• Create recipes, and build and run applications in C, C++, Python, Node.js, and JavaIn DetailThe 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.Style and approachThis recipe-based book will guide you through all the development stages of an embedded Linux product design using the Yocto Project.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Embedded Linux Development Using Yocto Project Cookbook - Second Edition è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Embedded Linux Development Using Yocto Project Cookbook - Second Edition di Alex Gonzalez, Javier Viguera in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Operating Systems. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9781788392921
Edizione
2

Application Development

In this chapter, we will cover the following recipes:
  • Introducing toolchains
  • Preparing an SDK
  • Using the extensible SDK
  • Using the Eclipse IDE
  • Developing GTK+ applications
  • Using the Qt Creator IDE
  • Developing Qt applications
  • Describing workflows for application development
  • Working with GNU make
  • Working with the GNU build system
  • Working with the CMake build system
  • Working with the SCons builder
  • Developing with libraries
  • Working with the Linux framebuffer
  • Using the X Windows system
  • Using Wayland
  • Adding a web browser application
  • Adding Python applications
  • Integrating the Open Java Development Kit
  • Integrating Java applications
  • Integrating Node.js applications
  • Running Docker application containers

Introduction

Dedicated applications are what define an embedded product and Yocto offers helpful application development tools, as well as the functionality to integrate with popular Integrated Development Environments (IDE) such as Eclipse and Qt Creator. It also provides a wide range of utility classes to help in the integration of finished applications into the build system and target images. A normal embedded Linux software development team is logically divided into the following roles:
  • BSP developers in charge of the Board Support Package, which is the bootloader and Linux kernel. This team has the greatest exposure to the hardware. As we have seen in Chapter 2, The BSP layer, BSP development uses primarily the Yocto SDK.
  • Application developers will work on the Linux user space applications that define the product, including user interfaces. Developing applications for embedded Linux is not that different from developing applications for a Linux server or desktop, as the kernel abstracts most of the embedded device particularities. Application developers will also use the Yocto SDK to develop their applications.
  • System integrators who release an SDK for the other teams to use and integrate both the applications and BSP changes into the Yocto build system. They also create the final product images.
In summary, the Yocto SDK is the interface between the Yocto Project, BSP and application developers and allows the work of the different developers to be shared and developed simultaneously. Some teams have the same engineers covering all roles, while some others prefer to specialize. This chapter will introduce the Yocto SDK, an important component on the application development workflow when using the Yocto Project. The SDK contains the cross-compilation toolchain, but also the header files and libraries used to cross-compile root filesystem applications. We will also introduce IDEs and show how they are used to build and debug C and C++ applications on real hardware and will explore application development, including graphical frameworks and Yocto integration, not only for C and C++ but also other languages.

Introducing toolchains

A toolchain is a set of tools, binaries, and libraries used to build applications to run on a computer platform. In Yocto, the default toolchains are based on GNU components with GPL licenses.

Getting ready

A GNU toolchain contains the following components:
  • Assembler (GNU as): This is part of the binutils package
  • Linker (GNU ld): This is also part of the binutils package
  • Compiler (GNU gcc): Latest versions have support for C, C++, Java, Ada, Fortran, Go, and Objective C/C++
  • Debugger (GNU gdb): This is the GNU debugger
  • Binary file tools (objdump, nm, objcopy, readelf, strip, and so on): These are part of the binutils package.
These components are enough to build bare-metal applications, bootloaders like U-Boot, or operating systems like the Linux kernel, as they don't need a C library and they implement the C library functions they need. However, for Linux user space applications, a POSIX-compliant C library is needed. The GNU C library, glibc, is the default C library used in the Yocto Project, and musl, a smaller C library, is a supported alternative popular for resource-constrained devices. On embedded systems, it is not just a toolchain we need, but a cross-compilation toolchain. This is because we build in a host computer but run the resulting binaries on the target, which is usually a different architecture. In reality, there are several types of toolchain, based on the architecture of the machine building the toolchain (build machine), running the toolchain (host machine), and running the binaries built by the toolchain (target machine). The most common combinations are:
  • Native: An example of this is an x86 machine running a toolchain that has also been built on an x86 machine producing binaries to run on an x86 machine. This is common in desktop computers.
  • Cross-compilation: This is the most common on embedded systems; for example, an x86 machine running a toolchain that has also been built on an x86 machine but producing binaries to run on a different architecture, like ARM.
  • Cross-native: This is typically the toolchain running on targets. An example of this is where a toolchain has been built on an x86 machine but runs on ARM and produces binaries for ARM.
  • Canadian: This is rarely seen and is where the build, host, and target machines are all different.
The process of building a cross-compilation toolchain is complex and fault-prone, so automated tools for toolchain building have emerged, like crosstool-NG. The Yocto build system also compiles its own toolchain on every bui...

Indice dei contenuti