Embedded Linux Development Using Yocto Project Cookbook - Second Edition
Alex Gonzalez, Javier Viguera
- 456 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Embedded Linux Development Using Yocto Project Cookbook - Second Edition
Alex Gonzalez, Javier Viguera
About This Book
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.
Frequently asked questions
Information
Application Development
- 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
- 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.
Introducing toolchains
Getting ready
- 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.
- 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.