3  Yocto Build Host Software

The build host tools need to be setup before the server can be built.

The yumapro layer is designed to work with the Yocto 2.3 release (Pyro) or later.

The “pyro” and “master” branches of the Poky project have been tested with the meta-yumapro layer.

 

The following diagram shows the directories that the user is expected to setup (in blue) and the directories that the supplied software will add.

 

Image1

 

Directory

Description

poky

Yocto installation of poky build system

build

Root of all build directories

conf

Build configuration directory.  Edit local.conf and bblayers.conf

tmp

Root of all bitbake generated build files

meta-*

Several opensource layer directories

meta-yumapro

Root of the yumapro layer bitbake files

recipes-server

Root directory for all yumapro server recipes

netconfd-pro

Root directory of all netconfd-pro recipes (IoT and SDN)

 

The netconfd-pro-iot and netconfd-pro-sdn recipes are designed to integrate with certain open source recipes, in order to automatically produce a system image with a running system, upon first boot.

The following recipes are used by the yumapro server recipes:

 

3.1  Setup Yocto Linux

These instructions do not override the Yocto documentation.

This document is not a yocto tutorial. Refer to the Yocto documentation for details on using the Yocto and bitbake software.

 

Yocto 2.3 Quick Start Guide:

http://www.yoctoproject.org/docs/2.3/yocto-project-qs/yocto-project-qs.html

 

Yocto 2.3 Mega Manual:

http://www.yoctoproject.org/docs/2.3/mega-manual/mega-manual.html

 

Yocto 2.3 Developer Manual:

http://www.yoctoproject.org/docs/2.3.1/dev-manual/dev-manual.html

 

Building your own recipe:

https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles

 

Bitbake User Manual:

http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#bitbake-user-manual-command

 

3.1.1  Install Yocto

Follow the instructions in the Yocto Quick Start guide.

Example Ubuntu Install.

 

 

1a) install dependencies

  > sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \

     build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \

     xz-utils debianutils iputils-ping libsdl1.2-dev xterm

 

1b) Install poky

   > git clone git://git.yoctoproject.org/poky

   > cd poky

   [Should be on branch ‘master’]

 

1c) add meta-webserver

   > git clone git://git.openembedded.org/meta-openembedded

 

 

3.1.2  Setup Build Configuration

Starting in the 'poky' directory, source the environment file to enable bitbake.

Then cd to the “conf” directory and edit the configuration files.

 

 > source oe-init-build-env

 build> cd conf

 build/conf>

 

 

Edit local.conf:

  1. Enable a target platform. The default is the i586 architecture on the qemu86 virtual target. Refer to the Yocto Quick start guide to enable different targets and board support packages (BSPs).

  2. Add the netconfd-pro server recipe to the image. Choose either netconfd-pro-iot or netconfd-pro-sdn, but not both. Example for netconfd-pro-sdn:

     


    IMAGE_INSTALL_append = " netconfd-pro-sdn"

     

 

Edit bblayers.conf:

  1. Enable layers needed to build the desired Yocto Linux system variants. The following example shows the layers needed for all variants of the netconfd-pro server. The file locations will be different depending on your Yocto installation location.

     


BBLAYERS ?= " \

  /home/andy/swdev/poky/meta \

  /home/andy/swdev/poky/meta-poky \

  /home/andy/swdev/poky/meta-yocto-bsp \

  /home/andy/swdev/poky/meta-openembedded/meta-oe \

  /home/andy/swdev/poky/meta-openembedded/meta-python \

  /home/andy/swdev/poky/meta-openembedded/meta-networking \

  /home/andy/swdev/poky/meta-openembedded/meta-webserver \

  /home/andy/swdev/poky/meta-yumapro \

"

 

 

3.2  meta-yumapro Layer

The meta-yumapro tarball contains “yumapro” layer files required to build, install, and integrate a multi-protocol server for Yocto Linux.

3.2.1  Installation

Tarball Naming Conventions

The filename structure of the tarball file is as follows:

 

 

meta-yumapro_version.gz

 

 

Example Filename:

 

 

       meta-yumapro_17.10-2.tar.gz

 

 

Extract to the poky Directory

The files need to be extracted to the poky directory so subtrees can be integrated into the build environment for the server.

 

Extraction Example:

 

    > cd poky

    > tar xvf meta-yumapro_17.10-2.tar.gz

 

    Creates a directory named meta-yumapro in the current directory.

 

 

3.2.2  Configuration

The only recipes supported at this time are “netconfd-pro-iot” and “netconfd-pro-sdn”. The configuration files for these recipes are located in the directory poky/meta-yumapro/recipes-server/netconfd-pro. There are several features that can be enabled or disabled by uncommenting or commenting a set of directives.

The set of recipe files: