Building the Yocto BSP (DIVELK)

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box
Diva-am335x-overview.png Applies to Diva
Yocto-logo.png Applies to Yocto


As the DIVELK kit is based on Yocto, the implementation of the MVM follows the approach described here. As such, the reading of this section is highly recommended.

History[edit | edit source]

Version Date DIVELK version Notes


Jun 2017 DIVELK 3.0.0
4.0.0 Apr 2018 DIVELK 4.0.0

Quick reference[edit | edit source]

Repository Information
Repository BSP Manifest Yocto BSP Layer
stable branch diva-morty diva-morty
stable tag divelk-4.0.0 divelk-4.0.0
Build targets
Name Description
divelk-image-qt5 QT5.x support
divelk-image-devel minimal for development/debugging image
divelk-image-matrix based on TI matrix GUI rfs

Introduction[edit | edit source]

This is a quickstart guide to build Yocto BSP for DIVA SOM, to rebuild the binaries (U-Boot, Linux kernel, root file system) provided with the DIVELK releases.

For more information regarding the Yocto build system, go to its dedicated category page

Build system prerequisites[edit | edit source]

DIVELK MVM is already configured to build this Yocto version/configuration, however, users typically don't use a VirtualBox VM for Yocto builds for performance reasons.

You can refer to Yocto manual setup section for a list of supported Linux distribution and their configuration to create your own build environment on your favorite distribution.

Building the DIVELK Yocto BSP[edit | edit source]

Toolchain[edit | edit source]

To build DIVELK BSP first you need to download Linaro toolchain from

install it and add it to the PATH.

Initialize the build environment[edit | edit source]

DIVELK Yocto BSP uses git-repo tool to fetch all the required git repositories to build

dvdk@vagrant-ubuntu-trusty-64:~/diva$ curl > repo
dvdk@vagrant-ubuntu-trusty-64:~/diva$ chmod a+x repo
dvdk@vagrant-ubuntu-trusty-64:~/diva$ ./repo init -u -b diva-morty
dvdk@vagrant-ubuntu-trusty-64:~/diva$ ./repo sync

Build the Yocto BSP image[edit | edit source]

Please note that even the basic root file system requires a few hours to build on a mid/hi range desktop (4-6 cores, 8-12 GiB RAM) also depending on your Internet connection speed (all sources are fetched from the network). Nearly 20GiB of disk space is required for the build. Moreover, building inside the DVDK adds some overhead, since the performances of a virtual machine are reduced if compared to the physical hardware. Thus, it's recommended to check the hardware capabilities of the host system and, when building with Yocto is required, developers should consider the following options:

  • migrating the build system to a physical machine
  • assuming that the host system has the required resources, extending the hardware capabilities of the default DVDK (eg: adding more cores and disk space)

Once completed the initialization phase, developers can launch the Yocto image build process with the following commands:

dvdk@vagrant-ubuntu-trusty-64:~/diva$ source
dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake divelk-image-matrix

The resulting files (kernel, devicetree and u-boot binaries, plus .tar.gz root file system) will then be available inside build/tmp/deploy/images/diva.

To build an SDK that can be used with Eclipe Yocto ADT, use a image based SDK, e.g.:

dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake -c populate_sdk divelk-image-devel

Build the QT5 image[edit | edit source]

divelk-image-matrix target already generate a proper RFS with QT5 libraries and examples, based on Weston backend.

On the other side, to build an SDK that can be used with QT Creator to build QT5 applications, use the following target instead of -c populate_sdk:

dvdk@vagrant-ubuntu-trusty-64:~/diva/build$ bitbake meta-toolchain-arago-tisdk

Other images[edit | edit source]

divelk-image-devel: a small image with some useful development and debugging tools
divelk-image-networking: based on divelk-image-devel, add lots of networking tools

Build additional packages[edit | edit source]

To build additional packages the user must first enter the directory where the is placed and source it

And then can run any of the bitbake command.