You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

The Yocto Project is a set of tools that helps to create customized Linux systems. This is a short description of how to prepare the host computer and how to create a project with yocto.

Used source files


The following description was tested with the source files listed in this table:

ComponentSourceVersion/Git branchCommit ID
Oracle VM VirtualBoxhttps://www.virtualbox.org/6.1.26---
Ubuntu 20.04 LTShttps://releases.ubuntu.com/20.04/20.04.3 LTS---
Yoctohttps://git.yoctoproject.org/cgit/cgit.cgi/poky/dunfellb47125666fe44e491ce9a4ecadd1875bec9891db
meta-alterahttps://github.com/kraj/meta-altera.gitdunfell237cd5ecd28491dbcff16d8d64662d3b56ac30df

Build Host


Yocto Project is supported in many Linux Distributions, this descriptions refers to Ubuntu 20.04 LTS. Information and requirements for other distributions can be found in the Yocto Project Reference Manual.

General requirements

This requirements are generally needed for Yocto Project in Ubuntu 20.04:

  • free disk space: at least 50 GB
  • required packages: 

    sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio \
                     python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 \
                     libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev

(optional) VM with supported Linux OS

If you do not have installed Linux OS on your host computer, you can optionally run a VM with a supported Linux OS:

    • e.g. with OracleVM:

      • VM Setup:

        • RAM: >= 8 GB

        • CPU:  >= 4

        • HDD: 200 GB dynamically

          • ubuntu-20.04-desktop-amd64.iso

          • install vm guest additions

        • Network: network bridge

        • optional: add shared folder, enable drag and drop

      • Note the general requirements

Install Yocto Project


  1. Create and navigate to the yocto directory:

    mkdir yocto && cd yocto
  2. Clone the Yocto Project sources:

    git clone -b dunfell https://git.yoctoproject.org/git/poky

Create a project for an Intel FPGA device


The following steps are required to create an image for the Intel FPGA devices:

  1. For Intel FPGA devices you need the meta-layer 'meta-altera'. Run following command to clone this meta-layer from github into the 'poky' folder:

    cd poky
    git clone -b dunfell https://github.com/kraj/meta-altera.git
  2. Run the oe-init-build-env script to initialize the environment:

    source oe-init-build-env
  3. Add meta-altera layer to /yocto/poky/build/conf/bblayers.conf:

    bitbake-layers add-layer ../meta-altera
  4. Modify the /yocto/poky/build/conf/local.conf file:
    1. Remove default configuration of the MACHINE variable and set it to a supported machine (see meta-altera for more information) of meta-altera layer e.g 'cyclone5':

      sed -i /MACHINE\ \?\?=\ \"qemux86-64\"/d conf/local.conf
      echo "MACHINE = \"cyclone5\"" >> conf/local.conf
    2. Set kernel version for meta-altera:

      echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-altera-lts"' >> conf/local.conf
      echo 'PREFERRED_VERSION_linux-altera = "5.4%"' >> conf/local.conf
  5. Build the image:

    bitbake core-image-minimal

    The first run of this command can take several hours.

    The generated files such as the u-boot file, kernel file or the complete Image are stored in /yocto/poky/build/tmp/deploy/images.

References


  1. Yocto Project Reference Manual
  2. Yocto Project Quick Build
  3. OpenEmbedded Layer Index


Table of contents


  • No labels