Building a custom embedded Linux distribution using Yocto Project

Source: Internet
Author: User
Tags yocto linux

Overview

Yocto Project is an open source collaboration project that provides templates, tools, and methodologies to support custom Linux systems for embedded products, regardless of the hardware architecture. I want to tell those who don't understand the name of Yocto, the term yocto is the smallest SI unit. The most a prefix, Yocto said 10^-24.

This article provides step-by-step instructions on how to use Yocto Project's industry standard open Source tool to create a customized Linux operating system for embedded devices and use QEMU to start the operating system in a single virtual machine. Yocto Project is an Open-source project sponsored by the Linux Foundation, funded by large hardware companies and operating system vendors, and provides industry-leading tools, methodologies, and metadata to build Linux systems.

The two major components of Yocto project are maintained by Yocto Project and openembedded projects, which are Bitbake and Openembedded-core, the building engine, which is a set of core matches used to run the build process Square (recipe). All project components are described in the next section.

Yocto Project Introduction

As a collaborative project, Yocto project is sometimes called the "Umbrella" project, which absorbs many different parts of the development process. Throughout Yocto project, these sections are referred to as projects, including build tools, build instruction metadata, libraries, utilities, and graphical user interfaces (GUI) called core formulations.

Poky

Poky is a reference building system for Yocto Project. It contains Bitbake, Openembedded-core, a board Support package (BSP), and any other packages or layers that are consolidated into the build process. Poky This name also refers to the default Linux distribution that is obtained using a reference build system, which can be extremely small (core-image-minimal), or it may be the entire Linux system (Core-image-sato) with a GUI.

You can see the Poky build system as a reference system for the entire project, a working example of a running process. When you download Yocto Project, you actually download instances of these tools, utilities, libraries, tool chains, and metadata that you can use to build your default system. This reference system, as well as the reference distribution it creates, is named Poky. You can also use this as a starting point to create your own distribution, and, of course, you can name this release randomly.

One project that all build systems need is a tool chain: A compiler, assembler, linker, and other binary utilities needed to create binary executables for a given schema. Poky uses the GNU Compiler Collection (GCC), but you can also specify other tool chains. Poky uses a technique called Cross compilation: Building binary executables on one architecture using a tool chain for another (for example, building ARM distributions on a x86 based system). Developers often use cross compilation in embedded system development to take advantage of host system performance.

Meta-data sets

The metadata sets are arranged by layer, so that each layer can provide a separate function for the layer below. The base is Openembedded-core or oe-core, providing the common recipes, classes, and related features necessary to build the project. You can then customize the build by adding a new layer above the Oe-core.

Openembedded-core is maintained jointly by Yocto Project and openembedded projects. The layer that separates Yocto Project from openembedded is the Meta-yocto layer, which provides a Poky distribution configuration and a core set of reference BSP.

The OpenEmbedded project itself is a stand-alone open source project with a recipe (mostly) that can be exchanged with Yocto project, as well as goals similar to Yocto project, but both have different governance and scope.

Board Card support Package

A BSP contains basic packages and drivers for building Linux prerequisites for a particular board or schema. This is typically maintained by the hardware manufacturer that produces the board. A BSP is the interface between the Linux operating system and the hardware that runs it. Note that you can also create a BSP for the virtual machine.

Bitbake

Bitbake is a build engine. It reads recipes and takes packages to keep an eye on them, build them, and incorporate the results into a bootable image. Bitbake is maintained jointly by Yocto Project and openembedded projects.

Hob

To make embedded Linux development easier, Yocto Project offers several different ways to work with graphics. A newer addition to the project is called Hob, which provides an image front-end to the bitbake and build process. The development of both has continued, including community user research.

Open Source License Compliance

Complying with open source licenses is an extremely important part of any Linux development effort. One goal of Yocto Project is to achieve compliance as easily as possible. It is extremely easy to use the Yocto Project tool to create inventories (even build the entire source repository) and filter the build process to exclude packages that use specific licenses. The program uses the Linux Foundation's Open Compliance program, which includes a Software Package Data Exchange? (SPDX?) Specification.

eglibc

Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (GLIBC), designed to run on embedded systems. The goals of EGLIBC include reducing memory footprint, making components configurable, and better supporting cross compilation and cross testing. EGLIBC is part of Yocto Project, but is maintained within its own governance structure.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.