Alea Yocto est

We need to build the disk image for the MCV SoM. To do this we have two options given by Aries, the SoM manufacturer. We can use Buildroot or Yocto.

Yocto

We decided to test Yocto first. Tarik Graba advised us to use it and a previous group who works with the same SoM used it too.

This project is a cross-compilation framework based on recipes. Every recipe contains a list of dependencies and a set of instructions (like a real recipe). The interesting point is the sources needed in a recipe can be directly downloaded online. So if some dependencies are missing, they will be automatically downloaded.

Yocto for dummies

As I explained above, Yocto is a framework base on recipes. To build our distribution we will use Bitbake, which is like a cook. When we ask it to compile something, here are the different steps:

  1. Bitbake will check every recipe it needs to build what we want. For each recipe it will:
    • Check the dependencies. If it needs to download sources, it will do it. If to do this recipe, it needs another one, it will do this recipe first.
    • When every dependency is ready, it will realize the recipe. This recipe can contain several steps: patches to apply, compilation, etc… The patches are modifications of source files. They are represented by .patch files. Then, bitbake will build something from the sources to complete the recipe.
  2. Then it finished by building the image.

As I said before, some recipes can depend on other recipes. Those different recipes are classified in layers, according to there dependencies. There are different levels of layers. The lowest level is the base layers with OpenEmbedded-Core and Meta-Openembedded. The other layers depend on both ones. The highest level is the distribution layer like meta-angstrom. Here you can find a list of every layer.

Meta-aries layer and more

Aries Embedded has created its layer for different kinds of SoM. This layer contains recipes which modify the sources and add new things to adapt the distribution to the SoM we will use. You can find it here.

Moreover, we will realize our own recipe to modify some .dts and .dtsi files to specify the different peripherals we will add like the SD Card reader on the SPI bus of the SoM.

Issues with Yocto

My computer runs on Ubuntu 19.10. The problem is, Yocto was only tested on the LTS version of Ubuntu and it didn’t work properly on my computer. So I decided to install a VM with Ubuntu 18.04, the last LTS version of Ubuntu. However, this is a problem because our distribution won’t be able to be compiled on every Linux PCs and this is a problem for the universality and portability of the project.

Moreover, another problem with Yocto is its speed. It is very slow and it takes more than an hour to build a distribution. So, I will maybe also check Buildroot which is lighter than Yocto.

Leave a Reply

Your email address will not be published. Required fields are marked *