Category: yocto

Yocto Training: Essential Build Packages

build-essential is a metapackage on Debian and Ubuntu that installs the basic tools for compiling software. It typically pulls in:

  • gcc and g++ — C and C++ compilers
  • make — runs build instructions
  • libc6-dev — C library headers and development files
  • dpkg-dev — tools for building Debian packages

chrpath is a small Linux utility for inspecting and changing the RPATH/RUNPATH stored in an ELF executable or shared library. These paths tell the dynamic linker where to look for required shared libraries.

It’s commonly used during packaging to remove or adjust build-time library paths before distributing a program. Use it carefully: changing the path incorrectly can prevent the program from finding its libraries.

chrpath -l ./program # show its RPATH/RUNPATH
chrpath -d ./program # remove it
chrpath -r ‘$ORIGIN/lib’ ./program # set a relative path

cpio is both a command-line utility and a package that provides it. It creates and extracts archive files, often used for backups, packaging, and moving files while preserving metadata.

You may see it in Linux system workflows—for example, in initramfs images used during boot, or in software package archives. It’s similar in purpose to tar, though the archive formats differ.

Create an archive from files under mydir

find mydir -print | cpio -o -v -H newc > mydir.cpio

Extract it into the current directory

cpio -i -v < mydir.cpio

-o creates an archive, -i extracts one, -v lists files as they’re processed, and -H newc selects the commonly used newc archive format.

Yocto Project: A Toolkit for Building Linux Your Way

Embedded devices often need a Linux system shaped around a specific product: its hardware, features, size, and support needs. The Yocto Project helps teams build and maintain those tailored systems from source.

It is an open source collaboration project built around shared tools, software components, configurations, and practices. Its build system supports many hardware architectures and helps teams reuse software across products and platforms.

Layers make customization manageable

The Yocto Project organizes build instructions into layers. A layer groups related information, such as board support, a graphical interface, middleware, or an application. Teams can reuse existing layers and add their own changes on top.

This structure makes it easier to adapt shared components to a product while keeping product-specific work separate. Hardware support, for example, can live in a board support package layer, while application software lives elsewhere.

Recipes tell the build system what to do

A recipe describes how to build a software component. It can specify where to find the source, which patches to apply, what dependencies are needed, and how to configure, compile, and install the software.

Recipes and other build instructions form metadata. The build system reads this metadata to determine what belongs in the final operating system.

BitBake turns instructions into an image

BitBake is the build engine. It reads recipes and configuration, works out dependencies, and schedules the tasks needed to build the requested system. The result can include packages and a bootable filesystem image for a device. Developers can also create a custom software development kit for application work.

A typical build follows this sequence:

  1. Set the target architecture and build configuration.
  2. Fetch source code.
  3. Apply patches and configure and compile components.
  4. Package the software and run build checks.
  5. Assemble the selected packages into a filesystem image.

Poky is a starting point

Poky is the Yocto Project’s reference distribution and a working example of how to build a custom Linux system. It brings together BitBake, OpenEmbedded-Core, and starter metadata. Developers can use it to learn the build process and as a base for their own distribution; it is not a finished product distribution.

A repeatable foundation for embedded Linux

The Yocto Project combines the build system with testing infrastructure and tools for areas such as board support, security analysis, and license compliance. Its layer-based approach helps teams organize changes and maintain software across products and hardware platforms.

For teams building embedded Linux, the key idea is simple: describe the system in recipes, configuration, and layers, then let BitBake assemble those instructions into an image for the target device.

Based on the Yocto Project Technical Overview.