compile.php

Compiling BOSP

Before starting the compilation you should have a complete and updated local repository of the BOSP source trees. This can be easily done by following the steps described in Download BOSP.

Configuration

The first time you build you have to “bootstrap” the building system. This bootstrap process is required to identify all the compilation modules which are available in you local installation. Each time you should add an application or external library to you BOSP installation you are required to bootstrap before to proceed with a build configuration.

To bootstrap the building system, simply move into the BOSP working directory and issue the commdand:

$ make bootstrap

Starting form version 0.8 BOSP makes use of the KConfig tool to define a build configuration. This tools provides a user interface to define, among others, these options:

  • Target platform
  • Resource allocation policy
  • Platform supports
  • Installation path
  • Build flavor: either DEBUG or RELEASE mode

To start this configuration utility, from within the BOSP working directory and issue the command:

$ make menuconfig

This should open the familiar interface where you can set any compile-time option. By pressing 'H' you can see the help text of the currently highlighted option.

The BOSP Configuration Utility

Compilation

After the BOSP has been configured, to run the compilation simply run:

  $ make

This command starts the compilation and installation, in the proper order, of all the BOSP components. Please be patient, especially the first compilation run requires to build a lot of external components! Successive runs should be faster.

Each step of the compilation of a BarbequeRTRM related component (e.g. the framework itself and the contributed codes), provides a detailed report on how it is compiled and where the installation procedure will deploy the generated files. This is for example the summary of the default BarbequeRTRM build:

-- =====[ BarbequeRTRM - Building System Configuration ]===========================
-- Version............... HEAD-HASH-NOTFOUND
-- Build Flavor.......... Native-Linux (64bit - Debug)
--    Target............. Native platform 
--    CFLAGS............. -march=native
--  CXXFLAGS............. -march=native -std=gnu++11 -Wall -Wno-unused-local-typedefs -DGCC_VERSION="5.4" -fPIC
-- Installation prefix... /home/giuseppe/Development/bosp/out
--    BarbequeRTRM....... <prefix>/sbin
--    Configuration...... <prefix>/etc/bbque/bbque.conf
--    Recipes............ <prefix>/etc/bbque/recipes
--    Plugins............ <prefix>/lib/bbque/plugins
--    Var(RPC-Channel)... /home/giuseppe/Development/bosp/barbeque/../out/var/bbque
--    Headers............ <prefix>/include/bbque
--    RTLib library...... <prefix>/lib/bbque
--    Documentation...... <prefix>/usr/share/bbque
-- Dependencies:
--    Boost library...... /home/giuseppe/Development/bosp/out/lib
-- BOSP Configuration:
--    Base dir........... /home/giuseppe/Development/bosp
--    SySroot............ 
--    CMake Modules...... /home/giuseppe/Development/bosp/out/usr/share/bbque/.cmake

This report shows:

  • the build version (v0.8-rc3-11-gf6434e1) which, for example, should be referenced in bug reports
  • the build type (Release) which could be either Debug or Release
  • the complete path for the installation PREFIX, which specify both where the build system expect to find the required dependencies (e.g. external libraries) and also the root of the installation procedure
  • the specific installation path of each component which refers to the previously defined prefix.

Getting to know the installation process

The BOSP is organized in modules, right now the source tree is composed by these folders:

giuseppe@plutone:~/BOSP$ ls -l
drwxrwxr-x 19 giuseppe giuseppe  4096 mag 16 22:08 barbeque/
drwxrwxr-x  5 giuseppe giuseppe  4096 mag  2 13:54 benchmarks/
-rwxr-xr-x  1 giuseppe giuseppe  3036 apr  5 17:58 bosp*
drwxrwxr-x  6 giuseppe giuseppe  4096 lug 27  2016 build/
-rw-r--r--  1 giuseppe giuseppe   366 apr  5 17:00 CHANGELOG
drwxrwxr-x  4 giuseppe giuseppe  4096 giu  3  2014 contrib/
drwxrwxr-x  8 giuseppe giuseppe  4096 nov  8  2016 deployment/
drwxrwxr-x  6 giuseppe giuseppe  4096 dic 19  2014 external/
lrwxrwxrwx  1 giuseppe giuseppe    18 giu  3  2014 Makefile -> build/core/root.mk
drwxrwxr-x  3 giuseppe giuseppe  4096 feb  8  2016 mpi/
drwxr-xr-x 11 giuseppe giuseppe  4096 mag 16 10:57 out/
-rw-rw-r--  1 giuseppe giuseppe  1444 giu  3  2014 README
drwxrwxr-x  3 giuseppe giuseppe  4096 giu  3  2014 toolchains/

Where the content of the available folders is:

  • barbeque sources of the Barbeque RTRM framework
  • build BOSP building system
  • contrib third party contributed software
  • external sources of dependency libraries
  • out the target installation folder
  • Makefile the main building script

The installation process starts by compiling and installing all the external components, than the BarbequeRTRM and finally the integrated applications and benchmarks. Each component is installed (by default) into the out sub-directory, which will contain executables and libraries generated by the building process. The expected layout of the output folder is this:

  derkling@darkstar:out$ ls -la
  total 40
  drwxr-xr-x 10 derkling derkling 4096 2011-07-20 18:44 .
  drwxr-xr-x  8 derkling derkling 4096 2011-07-20 18:43 ..
  drwxr-xr-x  2 derkling derkling 4096 2011-07-20 18:44 bin
  drwxr-xr-x  3 derkling derkling 4096 2011-07-20 18:43 etc
  drwxr-xr-x  5 derkling derkling 4096 2011-07-20 18:44 include
  drwxr-xr-x  4 derkling derkling 4096 2011-07-20 18:44 lib
  drwxr-xr-x  2 derkling derkling 4096 2011-07-20 18:44 sbin
  drwxr-xr-x  3 derkling derkling 4096 2011-07-20 18:44 share
  drwxr-xr-x  5 derkling derkling 4096 2011-07-20 18:44 usr
  drwxr-xr-x  3 derkling derkling 4096 2011-07-20 18:43 var

These are the main interesting folders:

  • etc/bbque/ the BarbequeRTRM configuration files
  • include/bbque/ the header files required for application development using the RTLib
  • lib/bbque/ the application libraries and the framework plugins
  • sbin/ the BarbequeRTRM executable location
  • var/bbque/ run-time generated BarbequeRTRM files location, (e.g. the logfile)

Once the compilation and installation have completed, before lunching the resource manager you may need to properly configure it. For more details see BarbequeRTRM daemon configuration [TBD].

compile.php.txt · Last modified: 2017/05/16 22:30 by jumanix

Page Tools