Skip to content

Galileo and Galileo Gen2 Instructions

Murilo Belluzzo edited this page Sep 18, 2015 · 7 revisions

Pre-requisites

  • Yocto SDK for Galileo installed in the host computer, There are two SDK options:
    • Galileo Official SDK:
    • Soletta Custom Image (see meta-soletta):
      • The advantage is that Soletta will be already installed in the image accompanying the SDK. So this instructions are only needed if you want to override the installation (which is good when developing Soletta itself).
  • Know how to send files to Galileo board
  • Know how to connect to Galileo's linux terminal

Compiling Soletta

Once the SDK is installed, it's time to setup a terminal to point to the right tools and paths needed to cross-compile Soletta.

[host]$ source <SDK_PATH>/environment-setup-i586-poky-linux-uclibc

If the official SDK is being used, follow the steps found here before proceed.

[host]$ export TARGETCC=$CC
[host]$ export TARGETAR=$AR
[host]$ unset PKG_CONFIG_PATH

Galileo Configuration

Now is necessary to change Soletta's options to match Galileo restrictions.
To access the configuration menu:

[host]$ make menuconfig

Because of the environment changes made by SDK, this may fail. If so, open a new terminal and make just this step on it.

Go to Core library --> Target platform
If linux-micro is selected, select dummy instead.

Optional: Remove unnecessary Pin Multiplexers

  • Go to Core Library --> Pin Multiplexer and leave only your board selected.

Save the changes and exit the configuration menu.

Building

Now a simple make will build Soletta:

[host]$ make

You can use -j option to compile faster. Check make's manual for more info (man make).

Installing

Inside Soletta's directory. First, install soletta in a temporary path:

[host]$ make install DESTDIR=<TMP_PATH>

Pack everything:

[host]$ cd <TMP_PATH>
[host]$ tar cvf soletta.tar *

Copy soletta.tar to Galileo root dir and connect to Galileo. Then:

[root@galileo]$ cd /
[root@galileo]$ tar xvf soletta.tar

And Soletta should be successfully installed!

Important: If you are using the official SDK and didn't boot from a SD card image, the installation won't persist if you turn off/reboot your board.

Running 'simple.fbp' sample

To make sure that the installation is ok, copy the sample found in <SOLETTA_SRC_DIR>/src/samples/flow/basics/simple.fbp to Galileo and try to execute:

[root@galileo]$ sol-fbp-runner simple.fbp

And check if the output is displayed without errors.

References

Appendix

Galileo's official SDK tricks

Unfortunately, a few extra steps are needed in order to fulfil Soletta's build requirements. A detailed explanation about each change can be found in the sections bellow.

[host]$ unset PYTHONHOME

It's recommended to create either a function or script to reproduce those steps instead of permanently apply the changes to <SDK_INSTALL_PATH>/environment-setup-i586-poky-linux-uclibc.

Modify 'PYTHONHOME'

Soletta use several tools written in Python 3 during a sort of pre-build stage and Galileo official SDK setup the environment to use Python 2.7.3 that won't work with Soletta tools. To fix this, we will modify PYTHONHOME so the Python installed in the host computer is used instead of the one provided by the SDK:

- export PYTHONHOME=<SDK_INSTALL_PATH>/sysroots/x86_64-pokysdk-linux/usr