Create a custom Linux Distribution using Yocto

  • 0

Create a custom Linux Distribution using Yocto

Category : Yocto

The Yocto Project is an open source collaboration project that provides templates, tools and methods to help creating a custom Linux-based systems for embedded products regardless of the hardware architecture.

Yocto Project uses Poky as a reference distribution but it can also creates a custom one. The purpose of this article is to show how to create, configure and build an alternative Yocto based embedded Linux Distribution.

Our custom distribution example mydistro extends the basic settings of Poky and uses alternate distro features and configurations such as systemd as init system and ipk as package manager.

A good practice is to isolate the distro configuration into a separate layer meta-mydistro:

First step is to checkout a local copy of the poky project :

Let’s create the corresponding distro layer meta-mydistro using yocto-layer tool:

Now we can define our distro settings by creating a configuration file:

meta-mydistro/conf/distro/mydistro.conf

Settings provided in meta-mydistro/conf/distro/mydistro.conf override similar settings that BitBake finds in the conf/local.conf file in the Build Directory.

To enable meta-mydistro layer we need to add it first to the bblayers.conf :

and fill bblayers.conf.sample with the following:

Then select mydistro as DISTRO either from bitbake or in local.conf :

Point DISTRO variable in local.conf or local.conf.sample to use mydistro :

Finally we are able to build an image using mydistro as distribution:


Leave a Reply