-
Notifications
You must be signed in to change notification settings - Fork 108
Building Soletta for Intel® Galileo and Intel® Galileo Gen2
This page is intended to provide instructions about how to build and run Soletta™ Framework on the Intel® Galileo and Intel® Galileo Gen2 boards.
If instead you prefer to just use a pre-built image, please check this page.
- Yocto SDK for Galileo installed in the host computer, There are two SDK options:
-
Galileo Official SDK:
- Allows you to use (and test) Soletta without the need of a custom Galileo image SD card
- Instructions on how to create Galileo SDK can be found [here] (http://download.intel.com/support/processors/quark/sb/quark_bsp_buildandswuserguide_329687_006.pdf)
- The SDK must fulfill all build requirements
-
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).
-
Galileo Official SDK:
- Know how to send files to Galileo board
- Know how to connect to Galileo's linux terminal
As the first step, you need to fetch Soletta framework's source code. It can be done by either cloning the git repository or downloading a tar.gz from a specific tag:
[host]$ git clone git://github.com/solettaproject/soletta
or for example v1_beta10:
[host]$ wget https://github.com/solettaproject/soletta/archive/v1_beta10.tar.gz
Then, inside the Soletta project's directory, be sure to run the following commands:
[host]$ git submodule init && git submodule update
This will make git fetch the source code of the submodules. It is needed to enable some features, like the JavaScript nodetype.
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
Now is necessary to change Soletta project'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: Ensure that linux-micro is selected.
Save the changes and exit the configuration menu.
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
).
Inside Soletta project'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.
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.
Unfortunately, a extra steps is needed in order to fulfil Soletta project's build requirements.
Soletta use several tools written in Python 3 during a 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. We have two options for this: unset the environment variable after the SDK setup or remove the line that set the variable in the SDK setup script.
[host]$ unset PYTHONHOME
It's recommended to create either a function or script to reproduce this step after the SDK environment setup.
Apply the following change to <SDK_INSTALL_PATH>/environment-setup-i586-poky-linux-uclibc
- export PYTHONHOME=<SDK_INSTALL_PATH>/sysroots/x86_64-pokysdk-linux/usr