-
Notifications
You must be signed in to change notification settings - Fork 35
Building the SDK
This page acts as a short guide on how to build the SDK using the provided build scripts.
Please note: Your source directory, build and work directories must not have spaces in their names. This is due to a limitation of the GNU Autotools.
Firstly, the source code of the SDK must be downloaded, as demonstrated in Downloading the SDK.
To simplify things you should store the directory into which you downloaded the sources in a variable.
`export EPIPHANY_BUILD_HOME="/path/to/download_directory>"
Where '/path/to/download_directory' is the absolute path to the directory containing the downloaded SDK tree.
Before building the SDK, please make sure you have the required prerequisites installed. These are listed separately for [Linux](Building on Linux), [Windows](Building on Windows) and [OS X](Building on Mac).
In most cases building the toolchain is a case of running the build-toolchain.sh
script from the ${EPIPHANY_BUILD_HOME}/sdk/
directory and waiting for it to complete. This will attempt to install the toolchain into the ${EPIPHANY_BUILD_HOME}/INSTALL
directory. This location can be overridden by specifying a custom installation directory via the --install-dir
parameter as demonstrated below:
./build-toolchain.sh --install-dir /path/to/my/installation
Once begun, a successful build will end with the following message:
**************************************************
The build is complete.
The tools have been installed at: /usr/local/bin
Please ensure that this directory is in your PATH.
**************************************************
Create a directory named ${EPIPHANY_BUILD_HOME}/esdk.{x.y.z}/tools/e-gnu.armv{x}
and move your compiled toolchain to this directory, e.g.
cd $EPIPHANY_BUILD_HOME
mkdir -p esdk.5.13.09.10/tools/e-gnu.armv7l/
mv INSTALL/* ./esdk.5.13.09.10/tools/e-gnu.armv7l/
As before, simply running install-sdk.sh
from the ${EPIPHANY_BUILD_HOME}/sdk/
directory should do the trick. Note that the install-sdk.sh script assumes that the cross toolchain prefix is 'arm-linux-gnueabihf-'. If you are using a different cross toolchain you will need to edit the install-sdk.sh script and change the value of CROSS_PREFIX appropriately for the arm toolchain that is installed.
export PATH=${EPIPHANY_BUILD_HOME}/esdk.5.13.09.10/tools/e-gnu/bin/:$PATH
After this, typing epiphany-elf-gcc --version
or e-gcc --version
should run Epiphany GCC and dump the version information.
If the build has failed, the build log should be checked to see what has caused the error. Usually this is due to a prerequisite package not being installed, so please re-check that you have all the prerequisites installed (please visit the relevant page for your Operating System, Linux, Windows and OS X, for more information). If needed, the SDK forums should be used for support and a bug submitted.