In this news letter you will learn how to create and install SDK using Yocto Project. Yocto provides a command for building a self-contained SDK. The generated SDK installer contains everything necessary to begin target application development on a host machine. In the build directory, execute bitbake with the “populate_sdk” command for the IoT development imageContinue reading “Create and Install SDK : Yocto Project”
Category Archives: Embedded Linux With Yocto
Create Images from Scratch : Yocto Project
How to Create Images from Scratch : Yocto Project
Features : Yocto Project
Features provide a mechanism for working out which packages should be included in the generated images. Distributions can select which features they want to support through the DISTRO_FEATURES variable, which is set or appended to in a distribution’s configuration file such as poky.conf, poky-tiny.conf, poky-lsb.conf and so forth. Machine features are set in the MACHINE_FEATURES variable, which is set in the machine configuration file and specifies the hardware features for a given machine.
Extending a Core Image : Yocto Projec
Extending a Core Image through Local Configuration and with a Recipe in Yocto Project.
Core Images – Linux Distribution Blueprints : Yocto Project
The OpenEmbedded Core (OE Core) and other Yocto Project layers include several example images. These images offer root filesystem configurations for typical Linux OS stacks. They range from very basic images that just boot a device to a command-line prompt to images that include the X Window System (X11) server and a graphical user interface. These reference images are called the core images because the names of their respective recipes begin with core-image.
You can easily locate the recipes for the core images with the find command from within the installation directory of your build system.
veeresh@efa:~/dev/yocto_iot/poky$ find ./meta*/recipes*/images -name “*.bb” -print
You can look at the core images as Linux distribution blueprints from which you can derive your own distribution by extending them. All core image recipes inherit the core-image class, which itself inherits from image class.
poky/meta/classes/core-image.bbclass
All images set the IMAGE_INSTALL variable to specify what packages are to be installed into the root filesystem. IMAGE_INSTALL is a list of packages and package groups. Package groups are collections of packages. Defining package groups removes the need to potentially list hundreds of single packages in the IMAGE_INSTALL variable.
Image recipes either explicitly set Image_INSTALL or extend its default value provided by the core-image class, which installs the two package groups packagegroup-core-boot and packagegroupbase-extended. The default creates a working root filesystem that boots to the console.
Let’s have a closer look at the various core images:
core-image-minimal: This is the most basic image allowing a device to boot to a Linux command-line login. Login and command-line interpreter are provided by BusyBox.
core-image-minimal-initramfs: This image is essentially the same as core-image-minimal but with a Linux kernel that includes a RAM-based initial root filesystem (initramfs).
core-image-tiny-initramfs: Tiny image capable of booting a device. The kernel includes the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the first ‘init’ program more efficiently. core-image-tiny-initramfs doesn’t actually generate an image but rather generates boot and rootfs artifacts that can subsequently be picked up by external image generation tools such as wic.
core-image-minimal-mtdutils: Based on core-image-minimal, this image also includes user space tools to interact with the memory technology device (MTD) subsystem in the Linux kernel to perform operations on flash memory devices.
core-image-minimal-dev: Based on core-image-minimal, this image also includes all the development packages (header files, etc.) for all the packages installed in the root filesystem. If deployed on the target together with a native target toolchain, it allows software development on the target. Together with a crosstoolchain, it can be used for software development on the development host.
core-image-rt: Based on core-image-minimal, this image target builds the Yocto Project real-time kernel and includes a test suite and tools for real-time applications.
core-image-rt-sdk: In addition to core-image-rt, this image includes the system development kit (SDK) consisting of the development packages for all packages installed; development tools such as compilers, assemblers, and linkers; as well as performance test tools and Linux kernel development packages. This image allows for software development on the target.
core-image-base: Essentially a core-image-minimal, this image also includes middle-ware and application packages to support a variety of hardware such as WiFi, Bluetooth, sound, and serial ports. The target device must include the necessary hardware components, and the Linux kernel must provide the device drivers for them.
core-image-full-cmdline: This minimal image adds typical Linux command-line tools—bash, acl, attr, grep, sed, tar, and many more—to the root filesystem.
core-image-x11: This basic graphical image includes the X11 server and an X11 terminal application.
core-image-sato: This image provides X11 support that includes the OpenedHand Sato user experience for mobile devices. Besides the Sato screen manager, the image also provides several applications using the Sato theme, such as a terminal, editor, file manager, and several games.
core-image-sato-dev: This image is the same as core-image-sato but also includes the development packages for all packages installed in the root filesystem.
core-image-sato-sdk: In addition to core-image-sato-dev, this image includes development tools such as compilers, assemblers, and linkers as well as performance test tools and Linux kernel development packages.
core-image-weston: This image uses Weston instead of X11. Weston is a compositor that uses the Wayland protocol and implementation to exchange data with its clients. This image also includes a Wayland-capable terminal program.
core-image-weston-sdk: In addition to core-image-weston, this image includes the system development kit (SDK) consisting of the development packages for all packages installed; development tools such as compilers, assemblers, and linkers; as well as performance test tools and Linux kernel development packages. This image allows for software development on the target.
core-image-multilib-example: This image is an example of the support of multiple libraries, typically 32-bit support on an otherwise 64-bit system. The image is based on a core image and adds the desired multilib packages to IMAGE_INSTALL.
core-image-testcontroller: A test controller image to be deployed on a target useful for testing other images using the OEQA runtime tests.
core-image-testcontroller-initramfs: This image is essentially the same as core-image-testcontroller but with a Linux kernel that includes a RAM-based initial root filesystem (initramfs).
core-image-ptest-all: Includes ptest packages.
core-image-ptest-fast: Includes ptest packages with fast execution times to allow for more automated QA.
core-image-kernel-dev: A development image that builds the kernel and packages that are sensitive to kernel updates and version changes
build-appliance-image_15.0.0: An image containing the build system that you can boot and run using either VirtualBox, VMware Player or VMware Workstation.
oe-selftest-image: An image used during oe-selftest tests.
wic-image-minimal: An example of partitioned image.
You can easily extend them by adding packages and package groups to IMAGE_INSTALL. Images can only be extended, not shrunk. To build an image with less functionality, you have to start from a smaller core image and add only the packages you need. There is no simple way to remove packages. The majority of them are added through package groups, and you would need to split up the package group if you do not want to install a package included with it. Of course, if you are removing a package, you also have to remove any other packages that depend on it.
Yocto Layers : Yocto Project
Yocto Layers are repositories that contain related metadata (i.e. sets of instructions) that tell the OpenEmbedded build system how to build a target. The Yocto Project Layer Model facilitates collaboration, sharing, customization, and reuse within the Yocto Project development environment. Layers logically separate information for your project. For example, you can use a layer to hold all the configurations for a particular piece of hardware. Isolating hardware-specific configurations allows you to share other metadata by using a different layer where that metadata might be common across several pieces of hardware.
The OpenEmbedded Build System Workflow : Yocto Project
Following is a brief summary of the “workflow”:
Developers specify architecture, policies, patches and configuration details.
The build system fetches and downloads the source code from the specified location. The build system supports standard methods such as tarballs or source code repositories systems such as Git.
Once source code is downloaded, the build system extracts the sources into a local work area where patches are applied and common steps for configuring and compiling the software are run.
The build system then installs the software into a temporary staging area where the binary package format you select (DEB, RPM, or IPK) is used to roll up the software.
Different QA and sanity checks run throughout entire build process.
After the binaries are created, the build system generates a binary package feed that is used to create the final root file image.
The build system generates the file system image and a customized Extensible SDK (eSDK) for application development in parallel.
Building Open Source Software Packages: Yocot Project
If you have built open source software packages for a Linux host system before, you may have noticed that the workflow follows a specific pattern. Some of the steps of this workflow you execute yourself, whereas others are typically carried out through some sort of automation such as Make or other source-to-binary build systems.
Fetch: Obtain the source code.
Extract: Unpack the source code.
Patch: Apply patches for bug fixes and added functionality.
Configure: Prepare the build process according to the environment.
Build: Compile and link.
Install: Copy binaries and auxiliary files to their target directories.
Package: Bundle binaries and auxiliary files for installation on other systems.
Components of Yocto Project: BitBake, Recipes, Classes, Configurations
In this newsleter lets understand components of Yocto Project:
1. BitBake tool
2. Recipes
3. Classes
4. Configurations
What is Poky? : Yocto Project
Poky is a reference system distribution of the Yocto Project, an open-source collaboration project that helps developers create custom Linux-based systems for embedded devices. Poky serves as a foundation for building embedded Linux distributions using the Yocto Project’s tools and infrastructure.