Yocto Evaluation

ALERT! Old evaluation from 2016. For current (as of 2022) Yocto efforts Frontend.Yocto

evaluating yocto as frontend operating system requires cross compiling fesa deploy units.

Cross Compiling

for users that need to compile a fesa class / deploy unit

Set environment variables by sourcing configuration file, currently
[handel@asl742]$ source /common/usr/embedded/ffos/fesa/2.1.1/environment-setup-core2-64-ffos-linux

now the cross compiler is in the path, pkgconfig will find configfiles from the sdk, variables like CC are defined.

The code generation of fesa is not part of the SDK. Assuming a fesa deployunit is "synced" and the Makefiles have been created.

The Makefile and the Makefile.dep must be modified

paths to include files of fesa, cmw, zeromq are standard. No need to define them if using the sdk. So Makefile.dep is basicly
DEPENDENT_LINKER_OPTIONS += $(shell pkg-config --libs libxml-2.0)
DEPENDENT_COMPILER_OPTIONS += $(shell pkg-config --cflags libxml-2.0)

In the Makefile the path to the cern buildsystem (part of the sdk) must be modified. So Makefile becomes
FFOS_BASE = /common/usr/embedded/ffos/fesa/2.1.1/sysroots/core2-64-ffos-linux
PARENT_MAKEFILE = $(FFOS_BASE)/opt/cern/buildsystem/Make.class
include $(PARENT_MAKEFILE)

not sure about the Precompile.h paths and if they are required

Software Development Kit

Compiling and packaging the fesa software for yocto. Yocto uses it's own buildsystem called Bitbake. Manual at https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html

The configuration files for bitbake are a strange mix of shell and python syntax.

For fesa a collection of configuration files (a layer) is at https://www-acc.gsi.de/viewvc/view/cscoin/yocto/trunk/meta-fesa/

Cern products are makefile based. To avoiod repetition a base package class is used, see classes/cern.bbclass

Packages (called recipes) are in recipes-extended

notes on recipe

For example the fesa-core package. https://www-acc.gsi.de/viewvc/view/cscoin/yocto/trunk/meta-fesa/recipes-extended/fesa-core/fesa-core_4.0.0.bb?revision=3167&view=markup

Line 1 to 5: define package metadata. Summary, description, homepage, etc. The dollar sign marks variables. ${PN} is the package name, extracted from the filename. In this case fesa-core

Line 7 and 8: every package must have a license, and the license checksum must be definied to detect changes.

Line 10, 11: Where to find the source.

Line 13-16: Other packages that must be build before this.

Line 19: the directory where make will be called

Line 21: Package depends in libxml, this will be used by line 23

Line 23: generate Makefile.dep, set environment variables and call make.

notes on base class

The base class https://www-acc.gsi.de/viewvc/view/cscoin/yocto/trunk/meta-fesa/classes/cern.bbclass?revision=3167&view=markup

Line 20 and 37 to 40: if a recipe defines MAKE_CONF it will be passed to the call of make

Line 23: environment variable passed to make

Line 26 to 34: construct path to Make.parent, pass it as PARENT_MAKEFILE=... to make

line 48 to 73: generate Makefile.dep

the sdk

An SDK can be installed on nearly any linux host and be used to cross compile applications for the frontend. The content of the SDK for fesa development is defined in https://www-acc.gsi.de/viewvc/view/cscoin/yocto/trunk/meta-fesa/recipes-extended/fesa-sdk/fesa-sdk.bb?revision=3255&view=markup

Line 7 to 9: which packages to install that should be runnable on the host. Basicly the cross compiler

Line 20 to 22: which packages to install that would be runnable on the frontend. Basicly the fesa headers and libraries and all it's dependencies like cmw, zeromq, etc.

-- ChristophHandel - 03 Nov 2016
Topic revision: r2 - 29 Nov 2022, ChristophHandel
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback